In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. configure the host
1. Set the hostname hostnamectl set-hostname DG2. Configure Network vim / etc/sysconfig/network-scripts/ifcfg-enp0s3
Restart the network card
Systemctl restart network
Test:
Nslookup www.yunxiaochong.com
Restart takes effect
3. Host environment
(1) execute env.sh. Configure the environment, the script is as follows:
Reference: http://blog.itpub.net/69915315/viewspace-2643785/
(2) execute rpm.sh. Install the dependency package with the following script:
Reference: http://blog.itpub.net/69915315/viewspace-2643785/
Second, configure shared storage
Reference: http://blog.itpub.net/69915315/viewspace-2643790
It can be executed by a single node, corresponding to the shared disk group of the main library: DATA, GRIDG. This is just for consistency, there is no mandatory requirement.
Configure remote Desktop
Reference: http://blog.itpub.net/69915315/viewspace-2643299/
Assign and configure remote desktops for two users of oracle grid.
Fourth, install grid
(1) decompress the installation package:
Unzip linuxamd64_12102_grid_1of2.zipunzip linuxamd64_12102_grid_2of2.zip
(2) copy the unzipped installation package to / home/grid directory
Mv grid/ home/grid/
(3) enter the remote desktop of grid and enter the installation.
(4) related problems
Swap size question:
Note: the lack of a 0 above, the space is still not enough, followed by an addition.
Modify the / etc/fstab file and add:
/ opt/image/swap swap swap defaults 0 0
Install missing package
Yum install libaio-devel*
Ignore pdksh
Graphical interface execution foot report error, through the command execution, still report the error, and then directly prompt the command.
5. Install the database software (1) extract the installation package:
Unzip linuxamd64_12102_database_1of2.zip
Unzip linuxamd64_12102_database_2of2.zip
(2) copy the unzipped installation package to / home/oralce directory mv database / home/oracle/ (3) enter the remote desktop of oracle and enter the installation.
Configure shared disk groups
7. Configure static monitoring and TNS1, and configure static monitoring from the library
Here is the listening under grid_home. Please change the grid_home in the file content to the oracle_home path.
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.150) (PORT = 1521)) (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = yun) # CDB # (ORACLE_HOME = / u01/app/11.2/grid) (ORACLE_HOME = / u01/app/oracle/product/11.2/db_1) (SID_NAME = YUNDG)) (SID_DESC = (GLOBAL_DBNAME = xiaochong) # PDB # (ORACLE_HOME = / u01/app/11.2/grid) (ORACLE_HOME = / U01/app/oracle/product/11.2/db_1) (SID_NAME = YUNDG)
2. Configure TNS from master to slave
Configure tnsnames.ora on four nodes of the rac of the master library and one node of the slave library
File path:
/ u01/app/oracle/product/11.2/db_1/network/admin/tnsnames.ora
# # main library YUN = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = www.yunxiaochong.com) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = yun) # # slave library YUNDG = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.8) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = yun)
8. Configure password files
Create a password file in a node in rac:
Orapwd password='Oracle' file=orapwyun1 entries=20
Then, copy it to the other three nodes and the dg node, and change the name to the instance name of each node in orapw+. Such as orapwyun2 orapwYUNDG
Scp orapwyun1 oracle@rac02:/u01/app/oracle/product/11.2/db_1/dbs/
Note: do not create password files on different nodes, or you will report password file inconsistencies.
9. Configuration from the library 1. Set up relevant catalogs
(1) View the data files, log files and control file paths of the main library
(2) from the library, use grid users, enter asmcmd, and set up relevant directories
Control file directory:
Again, create the + GRIDDG/YUM/CONTROLFILE directory.
Establish a log file directory:
+ DATA/YUN/ONLINELOG
+ GRIDDG/YUN/ONLINELOG
Create a data file directory:
+ DATA/YUN/DATAFILE
+ DATA/YUN/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE
+ DATA/YUN/88E906E617243D8FE0536E38A8C04CBC/DATAFILE
+ DATA/YUN/88E906E617243D8FE0536E38A8C04CBC/TEMPFILE
2. Configuration parameter file
Create pfile (create pfile from spfile) from the master library, modify it, and copy it to the slave library
Path: / u01/app/oracle/product/11.2/db_1/dbs/initYUNDG.ora
The contents are as follows:
* .audit_sys_operations=FALSE*.audit_trail='NONE'*.compatible='12.1.0.2.0'*.control_files='/u01/app/oracle/oradate/controlfile/control01.ctl'*.db_block_size=8192*.db_create_file_dest='+DATA'*.db_name='yun'*.db_unique_name='yundg'#*.db_recovery_file_dest='+DATA/'#*.db_recovery_file_dest_size=5535m*.diagnostic_dest='/ U01 _ pluggable_database=true*.fal_client='YUNDG'*.fal_server='YUN'*.log_archive_config='dg_config= _ pluggable_database=true*.fal_client='YUNDG'*.fal_server='YUN'*.log_archive_config='dg_config= (YUNDG)'(SERVICE=yunXDB)'* .enable _ enable (U01) YUN)'* .log _ archive_dest_1='location=+DATA/YUN/ARCHIVELOG valid_for= (all_logfiles,all_roles) db_unique_name=yundg'*.log_archive_dest_2='service=YUN LGWR ASYNC valid_for= (online_logfiles,primary_role) db_unique_name=yun'*.open_cursors=1000*.pga_aggregate_target=681m*.processes=300*.remote_login_passwordfile='exclusive'*.sga_target=2043m*.standby_file_management='AUTO'## comment out the following two parameters Because we configure the slave library with the same directory structure as the master library. # * .log _ file_name_convert='+DATA/YUN/onlinelog','+DATA/YUN/onlinelog'#*.db_file_name_convert='+DATA/YUN/datafile','+DATA/YUN/datafile'
10. Configuration of the main library
The main purpose here is to modify the parameters:
Alter system set log_archive_dest_2='service=YUNDG LGWR ASYNC valid_for= (online_logfiles,primary_role) db_unique_name=yundg' scope=both sid='*';alter system set log_archive_config='dg_config= (YUN,YUNDG) 'scope=both sid='*';alter system set standby_file_management=auto scope=both sid='*';alter system set fal_client=YUN scope=both sid='*';alter system set fal_server=YUNDG scope=both sid='*'
Set up force logging
ALTER DATABASE FORCE LOGGING
11. Copy 1. Rman connects to the master-slave database
Rman target sys/Oracle01@YUN auxiliary sys/Oracle01@YUNDG
2. Execute the copy command
Duplicate target database for standby from active database nofilenamecheck dorecover
Error record 1:
Channel ORA_DISK_1: SID=60 instance=yun1 device type=DISK
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03002: failure of Duplicate Db command at 05/28/2019 13:47:31
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/28/2019 13:47:29
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12543: TNS:destination host unreachable
ORA-17629: Cannot connect to the remote database server
_
The main reason is that the master library cannot be connected to the slave library through tnsname,ora to ensure that sqlplus sys/Oracle01@YUNDG as sysdba can connect.
Error record 2:
Channel ORA_AUX_DISK_1: starting datafile backup set restore
Channel ORA_AUX_DISK_1: using network backup set from service YUN
Channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_AUX_DISK_1: restoring datafile 00001 to + DATA
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03002: failure of Duplicate Db command at 05/28/2019 14:04:07
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-19845: error in backupDatafile while communicating with remote database server
ORA-17628: Oracle error 19602 returned by remote Oracle server
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 1 could not be verified
ORA-19845: error in backupDatafile while communicating with remote database server
ORA-17628: Oracle error 19602 returned by remote Oracle server
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
_
The main reason is that the main database is not archived. Just open the archiving.
SQL > archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 26
Current log sequence 27
XII. Supplementary standby log
Create a standby log on the slave library
Alter database add standby logfile thread 1 group 9 size 50m size 10 size 50m group 11 size 50m alter database add standby logfile thread 2 group 12 size 50m group 13 size 50m group 14 size 50m alter database add standby logfile thread 3 group 15 size 50m group 16 size 50m group 17 size 50m alter database add standby logfile thread 4 group 18 size 50m group 19 size 50m group 20 size 50m
If you want to switch between master and slave, you should also establish a standby red log on the master library.
13. Open the database and enter the recovery state
Alter database open
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
XIV. Testing (brief)
Create users, create tables, insert data, and query data from library synchronization.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.