Active Database Duplication Method
I write this on Duplicating the primary database on a Different server with same file locations.
Pre-Requirement
Create a source database on one server and then replicate it on another server.
Edit tnsnames.ora on primary server & stand by server.You will have to create static listener.
DB11G is primary server(Source)
DB11G_STBY is the new server.(Target)
DB11G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB11G)
)
)
DB11G_STBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB11G)
)
)
Now You want to create static listeners.
On Source Machine
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DB11G)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DB11G)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
On Target Machine
SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DB11G)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DB11G)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard2)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Then start the listeners on both servers.
then go to rman command.
os > rman target sys/oracle@DB11G AUXILIARY sys/oracle@DB11G_STBY
This will connect to source database from the target database.
I write this on Duplicating the primary database on a Different server with same file locations.
Pre-Requirement
Create a source database on one server and then replicate it on another server.
Edit tnsnames.ora on primary server & stand by server.You will have to create static listener.
DB11G is primary server(Source)
DB11G_STBY is the new server.(Target)
DB11G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB11G)
)
)
DB11G_STBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB11G)
)
)
Now You want to create static listeners.
On Source Machine
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DB11G)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DB11G)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
On Target Machine
SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DB11G)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DB11G)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dguard2)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Then start the listeners on both servers.
then go to rman command.
os > rman target sys/oracle@DB11G AUXILIARY sys/oracle@DB11G_STBY
This will connect to source database from the target database.
DUPLICATE DATABASE TO DB11G FROM ACTIVE DATABASE SPFILE NOFILENAMECHECK;
This will restore the database on target server.Opens with Read write mode
No comments:
Post a Comment