In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
RAC main library configuration single instance ActiveDataguard
The document structure of this article:
One of the things to pay attention to in the process of configuration here is to look at the alarm logs of rac1, rac2 and dg for a deeper understanding of the configuration process. To configure the dg environment of oracle rac, first restore the data of the master library to the slave database, and then configure some parameters needed by DG on the master and slave database.
Note:
Because DG uses DB_UNIQUE_NAME as the distinguishing database identity, the parameter of the master-slave library must be different to make a distinction. But the database name db_name must be consistent so that it is convenient to switch between master and slave. The Standby library only needs to install the database software, and the large version of the database software that does not need to create the database master-slave library must be consistent, and it must be an enterprise version of the database EE.
Preparation of RAC main library
The main step is that ① modifies the rac main library to archive + forcelogging mode ② uses rman to back up db, archivelog, control file, pfile and password files
The ① RAC main library must be placed in archive mode:
Do it together with the next step
The ② RAC main library must be set to ForceLogging mode:
Alter database force logging
Alter database archivelog;-modify in archive mode
SQL > alter database force logging
Database altered.
SQL > select name, open_mode, log_mode,force_logging from gv$database
NAME OPEN_MODE LOG_MODE FOR
RACDB READ WRITE NOARCHIVELOG YES
RACDB READ WRITE NOARCHIVELOG YES
SQL > exit
[oracle@rac1 ~] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 3 15:30:17 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL > startup mount
ORACLE instance started.
Total System Global Area 784998400 bytes
Fixed Size 2232472 bytes
Variable Size 532680552 bytes
Database Buffers 247463936 bytes
Redo Buffers 2621440 bytes
Database mounted.
SQL > select name, open_mode, log_mode,force_logging from gv$database
NAME OPEN_MODE LOG_MODE FOR
RACDB MOUNTED NOARCHIVELOG YES
SQL > alter database archivelog
Database altered.
SQL > shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL >
SQL > select name, open_mode, log_mode,force_logging from gv$database
NAME OPEN_MODE LOG_MODE FOR
RACDB READ WRITE ARCHIVELOG YES
RACDB READ WRITE ARCHIVELOG YES
SQL >
The main library of ③ RAC executes the complete RMAN:
Run {
Allocate channel c1 type disk
Allocate channel c2 type disk
Allocate channel c3 type disk
Allocate channel c4 type disk
Backup database format'/ rman_backup/FULL_%U.bak'
Backup archivelog all format'/ rman_backup/ARC_%U.bak'
Release channel c1
Release channel c2
Release channel c3
Release channel c4
}
The ④ RAC master library executes the creation of physical standby control files:
Under Rman: backup device type disk format'/ rman_backup/standby_%U.ctl' current controlfile for standby
Or: SQL > alter database create standby controlfile as'/ dats/backup/standby.ctl'
The ⑤ RAC master library creates a physical slave library initialization parameter file:
Create pfile ='/ rman_backup/initphydb.ora' from spfile
SQL > show parameter spfile
NAME TYPE VALUE
-
Spfile string + DATA/racdb/spfileracdb.ora
SQL >
SQL > show parameter cluster_database
NAME TYPE VALUE
-
Cluster_database boolean TRUE
Cluster_database_instances integer 2
SQL >
The ⑥ RAC master library modifies the password file to make the two-node SYS user password consistent:
It is best to copy one of the password files to another node and finally to the dg to ensure that the password files are the same
① FTP main database backup file + control file + parameter file to physical backup server:
Transfer all backup files to the dg library:
-rac1
Scp / rman_backup/*.bak oracle@192.168.59.140:/rman_backup/
Scp / u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwracdb1 oracle@192.168.59.140:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwphydb
Create password file for ② physical slave:
The previous step has been done, so there is no need to create
③ physical slave initialization parameter file modification:
-dg
[oracle@dg rman_backup] $cp initphydb.ora $ORACLE_HOME/dbs/
[oracle@dg rman_backup] $cd $ORACLE_HOME/dbs
This is a more important step. I got the line number out. Of course, there is no previous line number when I write it.
Modify the initialization parameter file of physical slave:
Phydb.__db_cache_size=255852544phydb.__java_pool_size=4194304phydb.__large_pool_size=4194304phydb.__oracle_base='/u01/app/oracle'#ORACLE_BASE environment from setphydb.__pga_aggregate_target=419430400phydb.__sga_target=423624704phydb.__shared_io_pool_size=0phydb.__shared_pool_size=146800640phydb.__streams_pool_size=0*.audit_file_dest='/u01/app/oracle/admin/phydb/adump'*.audit_trail='db'*.cluster_database=false * .compatible='11.2.0.0.0'*.control_files='+DATA/phydb/controlfile/cont.ctl'*.core_dump_dest='/u01/app/oracle/diag/rdbms/phydb/cdump'*.db_block_size=8192*.db_create_file_dest='+DATA'*.db_domain=''*.db_file_name_convert='+DATA/racdb/' '+ DATA/phydb/'*.db_name='racdb'*.db_recovery_file_dest='+FRA'*.db_recovery_file_dest_size=4070572032*.db_unique_name='phydb'*.diagnostic_dest='/u01/app/oracle'*.dispatchers=' (PROTOCOL=TCP) (SERVICE=phydbXDB)' * .fal _ client='phydb'*.fal_server='racdb1','racdb2'*.log_archive_config='dg_config= (racdb Phydb)'* .log _ archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for= (all_logfiles,all_roles) db_unique_name=phydb'*.log_archive_dest_2='service=racdb1 valid_for= (online_logfiles,primary_role) db_unique_name=racdb'*.log_archive_format='ARC_%t_%S_%r.arc'*.log_file_name_convert='+DATA/racdb/' '+ DATA/phydb/'*.memory_target=842006528*.open_cursors=300*.processes=150*.remote_login_passwordfile='exclusive'*.service_names='phydb'*.standby_file_management='auto'*.thread=1*.undo_management='auto'*.undo_tablespace='UNDOTBS1'
[oracle@dg dbs] $mkdir-p / u01/app/oracle/admin/phydb/adump
[oracle@dg dbs] $mkdir-p / u01/app/oracle/diag/rdbms/phydb/cdump
[oracle@dg dbs] $
[grid@dg ~] $asmcmd
ASMCMD > ls
DATA/
FRA/
GRIDDG/
ASMCMD > cd DATA
ASMCMD > ls
ASMCMD > mkdir phydb
ASMCMD > ls
Phydb/
ASMCMD >
④ configures the RAC master library, and the tnsnames.ora file of the physical slave library:
Copy the following to the rac1,rac2 and dg libraries:
Racdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.59.139) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb.lhr.com)
)
)
Racdb1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.59.135) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb.lhr.com)
(INSTANCE_NAME = racdb1)
)
)
Racdb2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.59.136) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb.lhr.com)
(INSTANCE_NAME = racdb2)
)
)
Phydb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.59.140) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = phydb)
)
)
Verify:
Execute on three libraries:
Sqlplus sys/lhr@racdb as sysdba
Sqlplus sys/lhr@racdb1 as sysdba
Sqlplus sys/lhr@racdb2 as sysdba
Ensure that the three libraries can be connected
Create physical backup ① physical backup to start NOMOUNT status:
Startup nomount
② RMAN restores the repository control files:
[oracle@dg dbs] $rman target /
Recovery Manager: Release 11.2.0.3.0-Production on Fri Oct 3 19:06:52 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: RACDB (not mounted)
RMAN > restore standby controlfile from'/ rman_backup/standby_0tpk53jq_1_1.ctl'
Starting restore at 2014-10-03 19:06:55
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=16 device type=DISK
Channel ORA_DISK_1: restoring control file
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Output file name=+DATA/phydb/controlfile/cont.ctl
Finished restore at 2014-10-03 19:07:22
RMAN >
③ MOUNT physical repository:
SQL > alter database mount
④ RMAN restore physical repository:
Run {
Allocate channel c1 type disk
Allocate channel c2 type disk
Allocate channel c3 type disk
Allocate channel c4 type disk
Restore database
Release channel c1
Release channel c2
Release channel c3
Release channel c4
}
RMAN > restore database
Starting restore at 2014-10-03 19:13:48
Starting implicit crosscheck backup at 2014-10-03 19:13:48
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=32 device type=DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 2014-10-03 19:13:49
Starting implicit crosscheck copy at 2014-10-03 19:13:49
Using channel ORA_DISK_1
Finished implicit crosscheck copy at 2014-10-03 19:13:49
Searching for all files in the recovery area
Cataloging files...
No files cataloged
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to + DATA/phydb/datafile/system.256.859849357
Channel ORA_DISK_1: restoring datafile 00004 to + DATA/phydb/datafile/users.259.859849357
Channel ORA_DISK_1: restoring datafile 00005 to + DATA/phydb/datafile/example.264.859849549
Channel ORA_DISK_1: reading from backup piece / rman_backup/FULL_0npk5395_1_1.bak
Channel ORA_DISK_1: piece handle=/rman_backup/FULL_0npk5395_1_1.bak tag=TAG20141003T164524
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:04:23
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00002 to + DATA/phydb/datafile/sysaux.257.859849357
Channel ORA_DISK_1: restoring datafile 00003 to + DATA/phydb/datafile/undotbs1.258.859849357
Channel ORA_DISK_1: restoring datafile 00006 to + DATA/phydb/datafile/undotbs2.265.859849971
Channel ORA_DISK_1: reading from backup piece / rman_backup/FULL_0opk53c4_1_1.bak
Channel ORA_DISK_1: piece handle=/rman_backup/FULL_0opk53c4_1_1.bak tag=TAG20141003T164524
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:01:45
Finished restore at 2014-10-03 19:20:01
RMAN >
Create a standbylogfile on the ⑤ slave:
SQL > select name from v$datafile
2 union
3 select name from v$controlfile
4 union
5 select member from v$logfile
NAME
+ DATA/phydb/controlfile/cont.ctl
+ DATA/phydb/datafile/example.258.860008433
+ DATA/phydb/datafile/sysaux.260.860008695
+ DATA/phydb/datafile/system.257.860008433
+ DATA/phydb/datafile/undotbs1.261.860008697
+ DATA/phydb/datafile/undotbs2.262.860008697
+ DATA/phydb/datafile/users.259.860008435
+ DATA/phydb/onlinelog/group_1.261.859849493
+ DATA/phydb/onlinelog/group_2.262.859849495
+ DATA/phydb/onlinelog/group_3.266.859850179
+ DATA/phydb/onlinelog/group_4.267.859850183
+ FRA/racdb/onlinelog/group_1.257.859849493
+ FRA/racdb/onlinelog/group_2.258.859849495
+ FRA/racdb/onlinelog/group_3.259.859850181
+ FRA/racdb/onlinelog/group_4.260.859850187
15 rows selected.
SQL >
Create a standbylogfile, where the size should be calculated according to the bytes column in the v$log of the main library:
Alter database add standby logfile thread 1 group 5 size 50M, group 6 size 50M, group 7 size 50M
Alter database add standby logfile thread 2 group 8 size 50M, group 9 size 50M, group 10 size 50M
Query after creation:
Select * from v$standby_log
SQL > set linesize 1200
SQL > select * from v$standby_log
GROUP# DBID THREAD# SEQUENCE# BYTES BLOCKSIZE USED ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME LAST_CHANGE# LAST_TIME
5 UNASSIGNED 1 0 52428800 512 0 NO UNASSIGNED
6 UNASSIGNED 1 0 52428800 512 0 NO UNASSIGNED
7 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
8 UNASSIGNED 2 0 52428800 512 0 NO UNASSIGNED
9 UNASSIGNED 2 0 52428800 512 0 NO UNASSIGNED
10 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
6 rows selected.
SQL >
SQL > col member for A50
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_
2 ONLINE + DATA/phydb/onlinelog/group_2.270.860171617 NO
2 ONLINE + FRA/phydb/onlinelog/group_2.294.860171767 YES
1 ONLINE + DATA/phydb/onlinelog/group_1.269.860171391 NO
1 ONLINE + FRA/phydb/onlinelog/group_1.293.860171601 YES
3 ONLINE + DATA/phydb/onlinelog/group_3.271.860171811 NO
3 ONLINE + FRA/phydb/onlinelog/group_3.295.860171893 YES
4 ONLINE + DATA/phydb/onlinelog/group_4.272.860171905 NO
4 ONLINE + FRA/phydb/onlinelog/group_4.296.860172007 YES
5 STANDBY + DATA/phydb/onlinelog/group_5.263.860014755 NO
5 STANDBY + FRA/phydb/onlinelog/group_5.256.860014769 YES
6 STANDBY + DATA/phydb/onlinelog/group_6.264.860014775 NO
6 STANDBY + FRA/phydb/onlinelog/group_6.257.860014789 YES
7 STANDBY + DATA/phydb/onlinelog/group_7.265.860014795 NO
7 STANDBY + FRA/phydb/onlinelog/group_7.258.860014811 YES
8 STANDBY + DATA/phydb/onlinelog/group_8.266.860090543 NO
8 STANDBY + FRA/phydb/onlinelog/group_8.259.860090581 YES
9 STANDBY + DATA/phydb/onlinelog/group_9.267.860090607 NO
9 STANDBY + FRA/phydb/onlinelog/group_9.260.860090659 YES
10 STANDBY + DATA/phydb/onlinelog/group_10.268.860090669 NO
10 STANDBY + FRA/phydb/onlinelog/group_10.261.860090715 YES
20 rows selected.
SQL >
An error may be reported here:
ORA-15041: diskgroup "DATA" space exhausted
That is, the disk is insufficient. Let's search on the Internet. The solution is to add a disk without detailed explanation:
Alter diskgroup DATA add disk'/ dev/raw/raw5'
Parameter adjustment of ⑥ master library:
[oracle@rac2 ~] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 10 15:59:46 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
Data Mining and Real Application Testing options
SQL > show parameter spfile
NAME TYPE VALUE
-
Spfile string + DATA/racdb/spfileracdb.ora
SQL >
-- rac1
Alter system set log_archive_dest_2='service=phydb lgwr sync valid_for= (online_logfiles,primary_role) db_unique_name=phydb' sid='*'
Alter system set log_archive_config='dg_config= (racdb,phydb) 'sid='*'
The result of the configuration:
SQL > show parameter log_archive_dest_2
NAME TYPE VALUE
-
Log_archive_dest_2 string service=phydb lgwr sync valid_
For= (online_logfiles,primary_r
Ole) db_unique_name=phydb
SQL > show parameter log_archive_config
NAME TYPE VALUE
-
Log_archive_config string dg_config= (racdb,phydb)
SQL >
⑦ slave database receives the master database log:
SQL > select sequence#,name,applied from v$archived_log
SEQUENCE# NAME APPLIED
39 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_39.327.860599799 NO
40 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_40.328.860599799 NO
41 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_41.329.860599953 NO
49 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_49.330.860600751 NO
50 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_50.331.860600755 NO
51 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_51.332.860600869 NO
42 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_42.333.860601127 NO
43 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_43.334.860601131 NO
44 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_44.335.860601415 NO
9 rows selected.
SQL >
Here, if the slave database cannot successfully receive the master database log, the following prompt is found in the alert log of the master database:
Check that the primary and standby are using a password file
And remote_login_passwordfile is set to SHARED or EXCLUSIVE
And that the SYS password is same in the password files.
Returning error ORA-16191
PING [ARC2]: Heartbeat failed to connect to standby 'phydb'. Error is 16191.
Process J000 died, see its trace file
Kkjcre1p: unable to spawn jobq slave process
Errors in file / u01/app/oracle/diag/rdbms/racdb/racdb2/trace/racdb2_cjq0_14236.trc:
Process NSS2 died, see its trace file
Process J000 died, see its trace file
Kkjcre1p: unable to spawn jobq slave process
Errors in file / u01/app/oracle/diag/rdbms/racdb/racdb2/trace/racdb2_cjq0_14236.trc:
Error 443 for archive log file 3 to 'phydb'
LGWR: Failed to archive log 3 thread 2 sequence 25
Process O000 died, see its trace file
The user password of this node is inconsistent with the password of the slave database. The best way is to generate a password file, and then copy the password file to other nodes to regenerate the password and sometimes report an error.
-3 nodes
Orapwd file=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwracdb2 password=lhr force=y
⑧ prepares the database to start the application log:
SQL > alter database recover managed standby database using current logfile disconnect from session
Database altered.
In a few minutes:
SQL > select sequence#,name,applied from v$archived_log
SEQUENCE# NAME APPLIED
-
39 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_39.327.860599799 YES
40 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_40.328.860599799 YES
41 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_41.329.860599953 YES
49 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_49.330.860600751 YES
50 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_50.331.860600755 YES
51 + FRA/phydb/archivelog/2014_10_10/thread_1_seq_51.332.860600869 YES
42 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_42.333.860601127 NO
43 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_43.334.860601131 NO
44 + FRA/phydb/archivelog/2014_10_10/thread_2_seq_44.335.860601415 NO
The ⑨ repository is opened in READONLY mode:
Alter database recover managed standby database cancel
Alter database open
Alter database recover managed standby database using current logfile disconnect from session
SQL > col name for A30
SQL > select dbid,name,current_scn,protection_mode,database_role,force_logging,open_mode,switchover_status from v$database
DBID NAME CURRENT_SCN PROTECTION_MODE DATABASE_ROLE FOR OPEN_MODE SWITCHOVER_STATUS
-
857466254 RACDB 1871595 MAXIMUM PERFORMANCE PHYSICAL STANDBY YES READ ONLY WITH APPLY NOT ALLOWED
SQL >
So far, we have successfully configured ActivePhysicalDataguard for the RAC main library!
Other additions 11g rman duplicate commands
Note: in versions prior to 11g, when executing the copy command dupilicate, there must be backup files on the standby library, that is, after the backup on the main database is completed, copy the files to the same directory in the standby database.
But in 11g, everything becomes simple, just add the FROM ACTIVE DATABASE parameter after the copy command.
For example, to implement a file reply to a database, you can execute the command:
$rman target / auxiliary sys/herenit@racheren_standby
RMAN > duplicate target database for standby from active database
If a corresponding file in the original directory has been deleted but exists in the data dictionary, you can use the nofilenamecheck parameter to cancel the check of the file name
RMAN > duplicate target database for standby from active database nofilenamecheck
After the recovery is complete, check the status of the standby database.
SQL > select status from v$instance
STATUS$dEQ5b/C#x22494861-ITPUB personal space T CRAV personal space RMOUNTED
SQL > select open_mode from v$database
OPEN_MODEITPUB personal space FU?tN2FE5v:_wU}-ITPUB personal space 1R_G@5k/kMOUNTED
SQL > select member from v$logfile
SQL > select name from v$datafile
SQL > select name from v$tempfile
Create a standby redo log log
DATA Guard in maximum protection and maximum availability mode, the Standby database must be configured with Standby Redo Log
The standby library is created and configured for Standby Redo Log to receive logs from the main library for recovery.
The main library creates and configures Standby Redo Log so that it can receive logs from the original library (the master after switching) after the master / slave switch.
Note: in order to work properly after switching between master and slave, both master and slave libraries must create a standby redo log
Creation principle: it is recommended that the number of Standby Redologs log groups be determined based on the number of threads in the Primary database (the number of threads here can be understood as the number of nodes in the RAC environment).
There is a recommended formula for reference: (number of log groups per thread + 1) × maximum number of threads.
Using this formula can reduce the possibility that the LGWR process of the Primary database instance will be locked.
The creation principle is the same as the single instance, the size is the same, but the number of log groups is one more than that of the primary database. For example, in my environment, there are 2 nodes, each node has 4 sets of redo, so the number of standby redo log groups to be created now is: (4: 1) * 2: 10
Standby Redologs operates in almost the same way as Online Redologs, except that you need to specify an extra Standby keyword when creating or deleting
SQL > alter database add standby logfile thread 1 group 5'+ ORAFLASH/racheren/onlinelog/group_5.log' size 50m
SQL > alter database add standby logfile thread 2 group 6'+ ORAFLASH/racheren/onlinelog/group_6.log' size 50m
Thread identity is not required on a single instance
SQL > alter database add standby logfile group 6'/ oradata/racheren/onlinelog/group_6.log' size 50m
Delete method:
SQL > alter database drop standby logfile grop 6
Query method:
SQL > select group#,thread#,sequence#,archived,status from v$standby_log
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files
-- to add standby redo log to the slave database, you need to stop MRP first
SQL > alter database recover managed standby database cancel
Test physical standby function test files synchronously view the tablespace information of the main and standby libraries
Select tablespace_name, file_name from dba_data_files
The main library creates a tablespace to check whether the standby database is synchronized.
Create tablespace dg_tbs datafile size 5m
The main library deletes the tablespace to check whether the standby database is synchronized.
Drop tablespace dg_tbs including contents and datafiles
Test data synchronization
The ① main library creates a test table:
② repository view test table synchronization:
Create table tmp_test (id number)
Insert into tmp_test values (1)
Commit
Select * from tmp_test
Test DATAGUARDSWITCHOVER function RAC main library, ActiveDataguard role switch
That is, the rac master database is switched to the physical slave database, and the physical slave database is switched to the rac master library.
The ① main library modifies the related parameters fal_client and fal_server:
First, you need to make sure that the main library starts with spfile, and then
On Rac1:
Alter system set fal_client='rac1' sid='rac1'
On Rac2:
Alter system set fal_client='rac2' sid='rac2'
Alter system set fal_server='phydb' sid='*'
Create standbylogfile for ② master library:
③ main library modifies related parameters standby_file_management, db_file_name_convert, log_filename_convert
④ stop RAC Node 2:
Single instance master database, RAC backup database role switch
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.