prerequisites:
cloning on the same server
11gR2
No ASM [Automatic Storage Management]
No FRA [Flash Back Recovery Area]
steps:
1. configure the network: Adding new service on listener.ora file and tnsnames.ora so that there is connectivity to the cloned database:
Add new entry on listener.ora file (in red):
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = kloned)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
)
)
Add new entry on tnsnames.ora file (in red):
KLONED =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle1.ehugox.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = kloned.ehugox.com)
)
)
... and check new service can be pinged:
$ tnsping kloned
2.Create a password file for the new database (under $ORACLE_HOME/dbs)
$ orapwd file=orapwkloned password=
3.Create an init.ora file from the source database.
Create the pfile using create pfile from spfile from the source database, thenedit it changing all occurrences of old database name to new name.
4.Create the new admin directory for the new database.
5.Start replication using Snapview clone/snapshot. Start a consistent session of the LUNs holding the database files. It not necessary to ALTER DATABASE BEGIN BACKUP because this EMC solution is storage-based consistency replication.
6. Stop replication using Snapview clone consistent fracture once all the LUNs involved are in a Sync and/or Consistent state.
7. Initiate a single Snapview consistent clone fracture.
8. Archive all unarchived redo logs>
sqlplus /nolog
SQL> connect / as sysdba
SQL> alter system archive log current;
9. export ORACLE_SID=kloned
10. startup nomount
11. Create new control file:
create controlfile set database "kloned" resetlogs
logfile
group 1 '/u01/app/oracle/oradata/kdbsingle1/redo01.log' size 50M,
group 2 '/u01/app/oracle/oradata/kdbsingle1/redo02.log' size 50M,
group 3 '/u01/app/oracle/oradata/kdbsingle1/redo03.log' size 50M
datafile
'/u01/app/oracle/oradata/kdbsingle1/example01.dbf',
'/u01/app/oracle/oradata/kdbsingle1/sysaux01.dbf',
'/u01/app/oracle/oradata/kdbsingle1/system01.dbf',
'/u01/app/oracle/oradata/kdbsingle1/users01.dbf',
'/u01/app/oracle/oradata/kdbsingle1/undotbs01.dbf';
12. Recover database and if everything goes fine open it:
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 1197392 generated at 07/20/2011 18:02:22 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/DBSINGLE1/onlinelog/1_4_753801762.dbf
ORA-00280: change 1197392 for thread 1 is in sequence #4
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;
y eso es todo.....
No comments:
Post a Comment