Oracle 11g backup-based rman duplicate
Backup-based rman duplicate command to create standby database
Prerequisites: ensure the backup of the original database and archive is completely visible to the standby end,
It is assumed that the storage structure of all files, such as the source database and the target database, and log files, are identical;
Configure the master database and the slave database for static listening. The master database is in archive mode, and the force logging
1. Make necessary changes to the primary database.
A. Enable force logging.
B. If there is no password file, create the password file.
C. Create a backup redo log.
D. Modify the parameter file so that it applies to the parameter uard.
2. Make sure that the SQL * net connection is normal.
3. Use the backup file.
A. Create a password file
B. Create an initialization parameter file for the backup database (secondary database)
C. create the desired mount point or folder for the database file
D. Connect to the primary database as its target database to run and create a backup on standby.
DUPLICATE TARGET DATABASE
FOR STANDBY
DORECOVER
SPFILE
# SET DB_FILE_NAME_CONVERT '','' ---- use this parameter for conversion if the data file path is different.
# SET LOG_FILE_NAME_CONVERT '','' ---- use this parameter for conversion if the log file path is different.
# SET SGA_MAX_SIZE 200 M ---- SET the SGA size
# SET SGA_TARGET 125 M
SET "db_unique_name" = "foou" COMMENT ''Is a duplicate''
SET LOG_ARCHIVE_DEST_2 = "service = inst3 ASYNC REGISTER
VALID_FOR = (online_logfile, primary_role )"
SET FAL_SERVER = "inst1" COMMENT "Is primary"
NOFILENAMECHECK;
Key words:
Dorecover: Automatic recover operation after restore is complete
NOFILENAMECHECK: Because the names of all files in the master and slave database environments are the same
How to understand the appeal script content:
Rman automatically copies the spfile from the master database to the slave database, and uses this parameter file to start the instance of the slave database,
Restore necessary data files and archive log files to the standby Database Host, and then perform the recover operation. but does not place it in manual or managed recovery mode;
-------------------------------------- Recommended reading --------------------------------------
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------