Pages

Wednesday, July 3, 2019

BACKUP AND MIGRATION FROM ONE ORACLE DATABASE 10G TO ANOTHER DATABASE SYSTEM 10G

BACKUP AND MIGRATION FROM ONE ORACLE DATABASE 10G TO ANOTHER DATABASE SYSTEM 10G

1.FIRST COPY THE RMAN BACKUP OF THE DATABASE WHICH NEEDS TO BE MIGRATED E.G. 10G AND COPY THIS BACKUP TO
BACKUP LOCATION OF OTHER 10G WITH INIT.ORA FILE OF  1ST 10G

2.ON 2ND SYSTEM 10G ,CREATE SERVICE OF  1ST 10G NAMED DB

3.SHUTDOWN 2ND SYSTEM 10G DB AND START IN NOMOUNT STATE

4.START RMAN IN 2ND SYSTEM 10G AND THEN SET DBID TO THAT ONE IN 1ST 10G DB

5.issue restore controlfile command in RMAN

6.mount the db in RMAN

7.show all in RMAN

8.CONFIGURE THE TRUE PARAMETERS ACCORDING TO 2ND SYSTEM 10G DB

9.catalog start with backup

10.copy AND EXECUTE the restore script WITH CHANGES ACCORDING TO NEW LOCATION IN 2ND SYSTEM 10G DB FOR THIS ISSUE :

The Restore Script :
-----------------------------------------------------------------------
run{
set newname for datafile 1 to '/u01/app/oracle/oradata/ned/system01.dbf';
set newname for datafile 2 to '/u01/app/oracle/oradata/ned/undotbs01.dbf';
set newname for datafile 3 to '/u01/app/oracle/oradata/ned/sysaux01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata/ned/users01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata/ned/example01.dbf';
set newname for datafile 6 to '/u01/app/oracle/oradata/ned/ned_test001.ora';
set newname for datafile 7 to '/u01/app/oracle/oradata/ned/csmis001.ora';
set newname for datafile 8 to '/u01/app/oracle/oradata/ned/ebms001.ora';
set newname for datafile 9 to '/u01/app/oracle/oradata/ned/nsms001.ora';
set newname for datafile 10 to '/u01/app/oracle/oradata/ned/tms001.ora';

restore database;
switch datafile all;
recover database;
}


ALTER DATABASE RENAME FILE 'E:\oracle\product\10.2.0\oradata\ned\redo01.log' TO '/u01/app/oracle/oradata/ned/redo01.log' ;

Database altered.

SQL> ALTER DATABASE RENAME FILE 'E:\oracle\product\10.2.0\oradata\ned\redo02.log' TO '/u01/app/oracle/oradata/ned/redo02.log' ;

Database altered.

SQL> ALTER DATABASE RENAME FILE 'E:\oracle\product\10.2.0\oradata\ned\redo03.log' TO '/u01/app/oracle/oradata/ned/redo03.log' ;

-------------------------------------------------------------------------------
report schema;

11.AFTER THE SCRIPT RAN,DELETE THE REDO LOG FILES IN THE ORADATA DIRECTORY AND
 CHANGE THE LOCATION OF REDO LOG FILES .

12.restore the database

13.Now issue Recover database command

14.Issue alter database open command WITH RESETLOGS


15.NOW ISSUE SCRIPTS FROM @$ORACLE_HOME/rdbms/admin/

1.@catalog.sql;
…..
2. @catproc.sql;



16.shutdown immediate;
startup;


check the Database status and it’s in “OPEN” mode

Note: This error usually occurs when  catproc and catalogs doesn’t run properly.

No comments:

Post a Comment