yesterday there is a customer RAC-DG physical standby database, here the general process again enumerated, in order not to involve the disclosure of privacy. The primary parameter has been replaced by the name. The detailed paths are also inconsistent. Because the environment of the client does not agree with the network of the native connection, when the fault cannot be cut various alarm logs and trace subject files. To be roughly written out by Gu.
1. Main Library online changes spfile parameters
ALTER DATABASE force logging;
alter system set log_archive_config= ' dg_config= (DG,DGDG) ';
Alter system set log_archive_dest_1= ' Location=use_db_recovery_file_dest valid_for= (all_logfiles,all_roles) DB_ UNIQUE_NAME=DG ';
Alter system set log_archive_dest_2= ' SERVICE=DGDG lgwr ASYNC valid_for= (online_logfiles,primary_role) db_unique_name= DGDG ';
Alter system set log_archive_dest_state_1= ' ENABLE ';
Alter system set log_archive_dest_state_2= ' ENABLE ';
Alter system set standby_file_management= ' AUTO ';
Alter system set fal_server= ' DGDG ';
Need to restart the number of parameters:
alter system set db_file_name_convert= ' C:\APP\ADMINISTRATOR\ORADATA\DG ', ' +data/dg/datafile ' scope=spfile;
Alter system set log_file_name_convert= ' C:\APP\ADMINISTRATOR\ORADATA\DG ', ' +data/dg/onlinelog ' scope=spfile;
2. Create Pfile
Sql> create Pfile from SPFile;
3. Change the pfile for the standby library
*.__db_cache_size=0
*.__java_pool_size=0
*.__large_pool_size=0
*.__oracle_base= ' C:\app\administrator ' #ORACLE_BASE set from environment
*.__pga_aggregate_target=0
*.__sga_target=0
*.__shared_io_pool_size=0
*.__shared_pool_size=0
*.__streams_pool_size=0
*.audit_file_dest= ' C:\app\administrator\admin\dg\adump '
*.audit_trail= ' DB '
*.cluster_database=false--Description is a single instance database, or startup will error
*.compatible= ' 11.2.0.0.0 '
*.control_files= ' C:\app\administrator\oradata\dg\control01.ctl ', ' C:\app\administrator\oradata\dg\control02.ctl ‘
*.db_block_size=8192
*.db_create_file_dest= ' C:\app\administrator\oradata '
*.db_domain= "
*.db_name= ' DG '
*.db_recovery_file_dest= ' C:\app\administrator\flash_recovery_area '
*.db_recovery_file_dest_size=3908042752
*.diagnostic_dest= ' C:\app\administrator '
*.dispadghers= ' (protocol=tcp) (SERVICE=DGXDB) '
*.fal_server= ' DG '
*.instance_number=1
*.log_archive_config= ' dg_config= (DG,DGDG) '
*.log_archive_dest_1= ' Location=c:\archivelog valid_for= (all_logfiles,all_roles) DB_UNIQUE_NAME=DGDG '
*.log_archive_dest_2= ' SERVICE=DG lgwr ASYNC valid_for= (online_logfiles,primary_role) DB_UNIQUE_NAME=DG '
*.log_archive_dest_state_1= ' ENABLE '
*.log_archive_dest_state_2= ' ENABLE '
*.log_archive_format= ' arc%s_%r.%t '
*.memory_target=8577351680
*.nls_language= ' Simplified Chinese '
*.nls_territory= ' China '
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile= ' Exclusive '
*.standby_file_management= ' AUTO '
*.undo_tablespace= ' UNDOTBS1 '
*.db_file_name_convert= ' +data/dg/datafile ', ' C:\APP\ADMINISTRATOR\ORADATA\DG '
*.log_file_name_convert= ' +data/dg/onlinelog ', ' C:\APP\ADMINISTRATOR\ORADATA\DG '
*.DB_UNIQUE_NAME=DGDG--The copied pfile assumes that this parameter is not set. The default value is DG
4. Change Tnsnamesl.ora
# Tnsnames.ora Network Configuration File:c:\app\administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
DG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Dg-cluster-scan) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = DG)
)
)
DGDG =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = DgP) (HOST = DGDG) (PORT = 1521))
)
(Connect_data =
(service_name = DG)
)
)
5. Change Listener.ora(only for the repository, the main library can not configure static monitoring)
# Listener.ora Network Configuration File:c:\app\administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Global_dbname = DG)
(Oracle_home = C:\app\administrator\product\11.2.0\dbhome_1)
(Sid_name = DG)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = DGDG) (PORT = 1521))
)
Adr_base_listener = C:\app\administrator\product\11.2.0\dbhome_1\log
6. Prepare the library to create related folders
C:\archivelog--Specify a local archive path, the archive logs received by the Repository, and the archive logs that you generate are placed here
C:\app\administrator\admin\dg\adump
C:\app\administrator\admin\dg\dpdump
C:\app\administrator\admin\dg\hdump
C:\app\administrator\admin\dg\pfile
C:\app\administrator\flash_recovery_area
C:\app\administrator\oradata\dg
7. The master repository is fully prepared for Rman
rman> Backup as compressed backupset full database format ' C:\bak\full_%d_%I_%T_%U '
8. Creating a Repository control file for the main library
sql> ALTER DATABASE create standby Controlfile as ' c:\control01.ctl ';
sql> ALTER DATABASE create standby Controlfile as ' c:\control02.ctl ';
9. Copy the backup files, password files, pfile files, Tnsnames.ora, Listener.ora to the repository corresponding location
10. Create an instance of the repository
Oradim-new-sid Dg-startmode Manual-spfile;
11. Start Monitoring
Lsntrctl Start
12. Launch the instance to mount
Set ORACLE_SID=DG
Sqlplus/as SYSDBA
Sql> Startup Mount
13. Recovering a Database
rman> catalog start with ' D:\bak '; --do not specify that the database will not be recovered
rman> Restore Database;
14. Prepare the library to join standby redo logfile
sql> ALTER DATABASE add standby logfile ' C:\app\administrator\oradata\dg\std_05.log ' size 50m;
sql> ALTER DATABASE Add standby logfile ' C:\app\administrator\oradata\dg\std_06.log ' size 50m;
sql> ALTER DATABASE Add standby logfile ' C:\app\administrator\oradata\dg\std_07.log ' size 50m;
sql> ALTER DATABASE Add standby logfile ' C:\app\administrator\oradata\dg\std_08.log ' size 50m;
sql> ALTER DATABASE Add standby logfile ' C:\app\administrator\oradata\dg\std_09.log ' size 50m;
15. Enable Redo Apply
sql> ALTER DATABASE recover managed standby database disconnect from session;
16. Create a spfile (optional) for the standby library
sql> create SPFile from Pfile;
The following records several issues that are encountered during the entire configuration process:
1. Unable to patch with Opatch apply command
Cause:11.2.0.3 The Opatch version number after the default load is 11.2.0.1.7, and the patch 27 I'm going to call needs to be on this version number.
Workaround: overwrite the original Opatch folder after extracting the Opatch installation package for the high version number
2. Standby Alert.log Alarm Prompt Unable to find the control file own active backup path
reason for the occurrence: The RAC Main Library was previously deployed with its own active Rman backup script, which specifies the path to the active backup of the control file itself. But the repository does not have this path
Workaround: go to Rman and change the number of entries to the folder where the repository exists.
3. The parameter setting error causes gap, which causes your own active backup script to stop execution
Cause: before setting a parameter, the log_archive_dest_1 parameters of the main library are set to the local path archive, for example:
Alter system set log_archive_dest_1= ' Location=c:\archivelog valid_for= (all_logfiles,all_roles) DB_UNIQUE_NAME=DG ';
As a RAC. The archive path is local. Other nodes cannot be read. Once the discovery is set to Use_db_recovery_file_dest, those local archive logs become gap and cannot be delivered to the standby repository
Workaround: Manually copy all the missing XXX files to the specified location, and then manually run Rman's own proactive backup script
Note: since Rman has configured redundant 7 copies of its own active backup script, and the DG has been manually run full-database backup, these manual backups are counted within 7 redundancy, in order not to occupy the normal backup quota. Physical removal is recommended after the DG has been built. And then Crossecheck and clean it off.
4. TNS errors are often present in the alert.log of the master and standby repositories
Fatal NI Connect Error 12547
TNS-12547 TNS: Missing connection
NS Secondary Err code:12560
NS Main ERR code:517
TNS-00517 TNS: Missing connection
NT Secondary Err code:54
NT OS Err code:0
reason for the occurrence: Node 2 does not have configuration Tnsnames.ora, which causes the archive log of thread 2 to not be delivered to the repository, which in the same time causes the main library log to pass past, but cannot be applied.
Workaround: Copy the Tnsnames.ora of node 1 directly to Node 2
Note: This is also the biggest cause of gap in the standby application, because the node 2nd log is not available to the repository, although the previous archive log sequence corresponding to the applied column of the property value is yes, but will cause the logs of Node 1 is not applied, Even if the node 1 is cut very many times archive. The applied column will always show no, but the log will be able to pass the past normally.
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
Create RAC-DG for customers some of the problems encountered in the summary