Create the directories where datafiles will be
restored. Set up the OFA structure on new host and copy the init.ora, config.ora
files. Create the link in ORACLE_HOME/dbs directory for init.ora file.
Add entry in /etc/oratab and /etc/ORACLE.PROFILE for the database. Change
init.ora and config.ora to reflect new directories. If link is not created
then startup_pfile parameter should be specified to give the location of
parameter file to be used Create a password file for this new instance
and specify password for internal. Create symbolic link for the old online
redo log directory to point to new online redo log directory.
Rman scipt should be as folows for latest database
backup restore.
Unix Shell Script:
#!/bin/ksh
today=`date +%y%m%d%H%M`
export ORACLE_SID=TEST804
export ORACLE_HOME=/oracle/app/oracle/product/8.0.4
export PATH=/users/oracle/bin:/oracle/app/oracle/bin:/oracle/app/oracle/product/8.0.4/bin:/usr/bin:/usr/bin/X11:/usr/dt/bin:/usr/local/bin:.
export NLS_LANG=american
export NLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'
svrmgrl << EOF
connect internal
startup nomount restrict
EOF
rman target internal/sys rcvcat rman/rman@rcat1
cmdfile restore_test804.txt
svrmgrl << EOF
connect internal
shutdown
EOF
Following points need to be taken note of:
Following points should be noted in this script:
List copy of ‘filename’;
Or
Using following query on catalog database
Select name,cdf_key
from rc_datafile_copy where db_name=upper(‘&database_name’);
And then remove it from the catalog using
Change datafilecopy primary_key uncatalog;
Quick Links:
Got a Question?
Do you have
an Oracle Question?
Oracle Books
Oracle Certification,
Database Administration, SQL, Application, Programming Reference Books
Best regards,
Oracle Database, SQL,
Application, Programming Tips
All the site contents are Copyright © www.sap-img.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies.
The site www.sap-img.com is not affiliated with or endorsed
by any company listed at this site.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.sap-img.com or the content authors.