Today, we need to create a 24*7 production library of a DG physical standby, requiring the main library can not be shut down, initially thought impossible, and later checked the document, the original through the Rman Duplicate command can be achieved online to create a physical library.
The main repository information is as follows:
Role db_name Db_unique_name Host network connection string
Main Library Jkka Jkka lx32 jkkapri
Standby Jkka jkka2 lx201 Jkkasta
1. Preparation of the main library
1 confirm that the main library is open for archiving and force logging
DG requires that the main library must be open for archiving and force logging, which can be queried by the following statement:
Sys@jkka>select log_mode,force_logging from V$database;
Log_mode for
---------------
archivelog NO
From the above we found that the main library has opened the archive, but did not open force logging, you can open the following statement:
Sys@jkka>alter database force logging;
Database altered.
2) Create the main library password file
The primary repository needs to communicate with each other through a password file, we first create a password file on the main library, and then synchronize it to the repository:
$ orapwd file= $ORACLE _home/dbs/orapwjkka
Confirm Parameter Remote_login_passwordfile to exclusive (default):
Sys@jkka>show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------ -----------------------------------------------------
remote_login_passwordfile string EXCLUSIVE
Re-confirm the SYS user in the password file by v$pwfile_users:
Sys@jkka>select * from V$pwfile_users;
USERNAME sysdb SYSOP sysas
---------------------------------------------
SYS true FALSE