Beruflich Dokumente
Kultur Dokumente
10) lsnrctl start COPY (change listner.ora and put the hostname where it is mounted)
11) ORACLE_SID=PROD;export ORACLE_SID ( This step is optional depending upon how you connect to
target and auxiliary in RMAN)
12) rman trace '/home/oratest/clon_test_15jan08.txt'
13) debug on (Optional)
14) connect target sys/<>@PROD
16) connect auxiliary sys/pwd@COPY
17) CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
18) run {
set until time "to_date('10-SEPT-2009:08:00:00','DD-Mon-YYYY:HH24:MI:SS')";
duplicate target database to 'PSUAT' ;
}
Once the above step is completed, your new instance will be opened automatically by RMAN.
19)
Stop the database using the NORMAL option
Start the database in mount stage.
Change the database to noarchivelog mode.
Shutdown the database.
Startup.
If this restoration has been done on a NAS volume, then you can shutdown the database, unmount the volume
and mount it to the new server. Once you mount the volume on the new server, ensure that you change the
permissions of all the folders.
==============================================================================
2nd Method :To take backup on the drive which is mounted on 10.33.193.10
1) Take the backup on the mount point which is mounted on 10.33.193.10 server.
RUN {
ALLOCATE CHANNEL ch00 TYPE DISK format '/XXXXX/bk_%s_%p_%t.bkp';
BACKUP DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
ALLOCATE CHANNEL ch00 TYPE DISK format '/XXXXX/ctrl_%s_%p_%t.bkp';
BACKUP CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
2) After successful completion of backup,unmount and mount the same on new server. The target database
server should have access to the volume where the production backup
3) Copy the home on new server (e.g. 10.33.193.205) if it doesnot exist.
on new server (e.g. 10.33.193.205 carry following steps)
4) change owner of the folders which in that mountpoint to id of the server where it is mounted
5) keep the home same as prod (this is use to start the new db in nomount stage using prod..can use any home)
6) ORACLE_SID=PROD;export ORACLE_SID (SID which u want to clone to be..here it will be PROD as
we wnt same SID name)
7) change the PATH and LD_LIBRARY_PATH
8) change exising init.ora or copy from new if it doesnot exist.(SID/udump/bdump/cdump/control file
path/iFile path)
9) in ifile change db file convert.
10) sqlplus / as sysdba
11) startup nomount pfile = '$ORACLE_HOME/dbs/initCOPY.ora' (init.ora file created/modified in step8)
12) TNS_ADMIN = '/oracle/10ghome/10.2.0/network/admin/DEV_wninmumfinprod';export TNS_ADMIN
(also change tnsnames.ora and put entry of the instance e.g. PROD)
13) changes entries in listner.ora e.g.
SID_LIST_COPY =
(SID_LIST =
(SID_DESC =
(SID_NAME = COPY)
(ORACLE_HOME = /racbin/testhome/dbhome)
)
)
COPY =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.33.193.10)(PORT = 1524))
)
)
also put PROD (old server) tns entry so that we can connect to old database through RMAN
14) lsnrctl start PROD (change listner.ora and put the hostname where it is mounted)
15) rman trace '/home/oratest/clon_test_15jan08.txt'
16) debug on
17) connect target sys/pwd@PROD (which should connect to old database)
18) sql "alter session set optimizer_mode=RULE";
19) connect auxiliary sys/pwd@PROD (this PROD is on new server...create sys pwd with orapwd)
20) CONFIGURE DEFAULT DEVICE TYPE TO DISK;
If following is not there do following but do with proper guidance only
ln -s /usr/openv/netbackup/bin/libobk.so64.1 libobk.so