Rman Database Heterogeneous Migration

Source: Internet
Author: User
Tags sqlplus

This article describes how to migrate one library to another server with Rman.

Server A:linux ES4 + oracle9204 (source)
Server B:linux ES4 + oracle9204 (target)

First, create a directory

For the sake of simplicity, establish the same directory structure as a on server B. If for space or other reasons, consider using soft links to achieve the unity of the directory structure.
If this is not possible, you can use the set newname of Rman to achieve the relocation of the data.

[Email protected] ~]$ mkdir-p/data/oradata/gpodb
[Email protected] dbback]$ mkdir-p/data/dbback/gpofullbak
[Email protected] admin]$ mkdir-p/data/admin/gpodb/udump
[Email protected] admin]$ mkdir-p/data/admin/gpodb/bdump
[Email protected] admin]$ mkdir-p/data/admin/gpodb/cdump
[Email protected] admin]$ mkdir-p/data/archivelog/gpodb--Archive


Second, full library backup

[Email protected] gpofullbak]$ export ORACLE_SID=GPODB
[[email protected] gpofullbak]$ Rman target/

Recovery manager:release 9.2.0.4.0-64bit Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

Connected to target Database:gpodb (dbid=1026346035)

Rman> run{
2> CONFIGURE controlfile autobackup on;
3> CONFIGURE controlfile autobackup FORMAT for DEVICE TYPE DISK to '/data/dbback/gpofullbak/%f ';
4> Allocate channel C1 type disk format '/data/dbback/gpofullbak/full_%u ';
5> BACKUP Database tag ' full_gpodb_data ' Filesperset PLUS ARCHIVELOG filesperset DELETE all INPUT;
6> release channel C1;
7>}

Using target database Controlfile instead of recovery catalog
Old RMAN configuration parameters:
CONFIGURE Controlfile autobackup on;
New RMAN configuration parameters:
CONFIGURE Controlfile autobackup on;
New RMAN configuration parameters is successfully stored

Old RMAN configuration parameters:
CONFIGURE controlfile autobackup FORMAT for DEVICE TYPE DISK to '/data/dbback/gpofullbak/%f ';
New RMAN configuration parameters:
CONFIGURE controlfile autobackup FORMAT for DEVICE TYPE DISK to '/data/dbback/gpofullbak/%f ';
New RMAN configuration parameters is successfully stored

Allocated CHANNEL:C1
Channel C1:sid=15 Devtype=disk


Starting backup at 25-4?? -07
Current log Archived
Channel c1:starting Archive Log backupset
Channel c1:specifying archive log (s) in backup set
Input archive log thread=1 sequence=97 recid=68 stamp=620843481
Channel c1:starting piece 1 at 25-4?? -07
Channel c1:finished piece 1 at 25-4?? -07
Piece Handle=/data/dbback/gpofullbak/full_26ig2kep_1_1 Comment=none
Channel C1:backup set complete, elapsed time:00:00:02
Channel c1:deleting archive log (s)
Archive Log filename=/data/archivelog/gpodb/1_97.dbf recid=68 stamp=620843481
Finished backup at 25-4?? -07

Starting backup at 25-4?? -07
Channel c1:starting full datafile backupset
Channel c1:specifying DataFile (s) in Backupset
Input datafile fno=00007 name=/data/oradata/gpodb/ndindex01.dbf
Input datafile fno=00009 name=/data/oradata/gpodb/ndindex03.dbf
Input datafile fno=00011 name=/data/oradata/gpodb/ndindex05.dbf
Input datafile fno=00013 name=/data/oradata/gpodb/ndmain02.dbf
Input datafile fno=00015 name=/data/oradata/gpodb/ndmain04.dbf
Input datafile fno=00017 name=/data/oradata/gpodb/ndmain06.dbf
Input datafile fno=00004 name=/data/oradata/gpodb/indx01.dbf
Input datafile fno=00003 name=/data/oradata/gpodb/drsys01.dbf
Input datafile fno=00005 name=/data/oradata/gpodb/tools01.dbf
Input datafile fno=00002 name=/data/oradata/gpodb/undotbs01.dbf
Channel c1:starting piece 1 at 25-4?? -07
Channel c1:finished piece 1 at 25-4?? -07
Piece Handle=/data/dbback/gpofullbak/full_27ig2ker_1_1 Comment=none
Channel C1:backup set complete, elapsed time:00:05:45
Channel c1:starting full datafile backupset
Channel c1:specifying DataFile (s) in Backupset
Input datafile fno=00006 name=/data/oradata/gpodb/users01.dbf
Input datafile fno=00008 name=/data/oradata/gpodb/ndindex02.dbf
Input datafile fno=00010 name=/data/oradata/gpodb/ndindex04.dbf
Input datafile fno=00012 name=/data/oradata/gpodb/ndmain01.dbf
Input datafile fno=00014 name=/data/oradata/gpodb/ndmain03.dbf
Input datafile fno=00016 name=/data/oradata/gpodb/ndmain05.dbf
Input datafile fno=00001 name=/data/oradata/gpodb/system01.dbf
Channel c1:starting piece 1 at 25-4?? -07
Channel c1:finished piece 1 at 25-4?? -07
Piece Handle=/data/dbback/gpofullbak/full_28ig2kpk_1_1 Comment=none
Channel C1:backup set complete, elapsed time:00:05:35
Finished backup at 25-4?? -07

Starting backup at 25-4?? -07
Current log Archived
Channel c1:starting Archive Log backupset
Channel c1:specifying archive log (s) in backup set
Input archive log thread=1 sequence=98 recid=69 stamp=620844163
Channel c1:starting piece 1 at 25-4?? -07
Channel c1:finished piece 1 at 25-4?? -07
Piece Handle=/data/dbback/gpofullbak/full_29ig2l43_1_1 Comment=none
Channel C1:backup set complete, elapsed time:00:00:02
Channel c1:deleting archive log (s)
Archive Log filename=/data/archivelog/gpodb/1_98.dbf recid=69 stamp=620844163
Finished backup at 25-4?? -07

Starting Control File and SPFILE autobackup at 25-4?? -07
Piece handle=/data/dbback/gpofullbak/c-1026346035-20070425-07 Comment=none
Finished Control File and SPFILE autobackup at 25-4?? -07

Released CHANNEL:C1

Rman> exit


Recovery Manager complete.

--Create SPFile
[Email protected] gpofullbak]$ sqlplus "/as sysdba"

Sql*plus:release 9.2.0.4.0-production on D?? Úèy 4?? 25 10:48:17 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0-64bit Production
With the partitioning option
Jserver Release 9.2.0.4.0-production

Sql> create Pfile from SPFile;

File created.


Iii. Transfer of documents
Put the files in the same directory on Server B.
[Email protected] gpofullbak]$ SCP * 172.25.13.51: ' pwd '
[email protected] ' s password:
c-1026346035-20070425-07 100% 1696KB 1.7mb/s 00:01
Full_26ig2kep_1_1 100% 901KB 900.5kb/s 00:00
Full_27ig2ker_1_1 100% 1591MB 11.0mb/s 02:25
Full_28ig2kpk_1_1 100% 1281MB 11.0mb/s 01:57
Full_29ig2l43_1_1 100% 140KB 139.5kb/s 00:00
[Email protected] dbs]$ SCP initgpodb.ora 172.25.13.51: ' pwd '
[email protected] ' s password:
Initgpodb.ora 100% 1021 1.0kb/s 00:00

[Email protected] dbs]$ SCP orapwgpodb 172.25.13.51: ' pwd '
[email protected] ' s password:
Orapwgpodb 100% 1536 1.5kb/s 00:00


Four, in the B machine recovery

[Email protected] dbback]$ export ORACLE_SID=GPODB
[Email protected] dbback]$ sqlplus "/as sysdba"

Sql*plus:release 9.2.0.4.0-production on D?? Úèy 4?? 25 11:00:50 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

Sql> startup Pfile=?/dbs/[email protected] Nomount
ORACLE instance started.

Total System Global area 2585760448 bytes
Fixed Size 746176 bytes
Variable Size 486539264 bytes
Database buffers 2097152000 bytes
Redo buffers 1323008 bytes

Sql> exit
[[email protected] gpofullbak]$ Rman target/

Recovery manager:release 9.2.0.4.0-64bit Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

Connected to target Database:gpodb (not mounted)

Rman> set dbid=1026346035;

Executing Command:set DBID

rman> restore Controlfile from '/data/dbback/gpofullbak/c-1026346035-20070425-07 ';

Starting restore at 25-4?? -2007 16:57:38

Using target database Controlfile instead of recovery catalog
Allocated Channel:ora_disk_1
Channel Ora_disk_1:sid=12 Devtype=disk
Channel Ora_disk_1:restoring Controlfile
Channel Ora_disk_1:restore Complete
Replicating Controlfile
Input Filename=/data/oradata/gpodb/control01.ctl
Output Filename=/data/oradata/gpodb/control02.ctl
Output Filename=/data/oradata/gpodb/control03.ctl
Finished restore at 25-4?? -2007 16:57:46

Rman> ALTER DATABASE Mount;

Database mounted

rman> restore Database from tag= ' Full_gpodb_data ';

Starting restore at 25-4?? -2007 16:58:39

Using channel Ora_disk_1
Channel ora_disk_1:starting datafile backupset restore
Channel ora_disk_1:specifying DataFile (s) to the restore from backup set
restoring DataFile 00002 to/data/oradata/gpodb/undotbs01.dbf
restoring DataFile 00003 to/data/oradata/gpodb/drsys01.dbf
restoring datafile 00004 to/data/oradata/gpodb/indx01.dbf
restoring DataFile 00005 to/data/oradata/gpodb/tools01.dbf
restoring DataFile 00007 to/data/oradata/gpodb/ndindex01.dbf
restoring DataFile 00009 to/data/oradata/gpodb/ndindex03.dbf
restoring DataFile 00011 to/data/oradata/gpodb/ndindex05.dbf
restoring datafile 00013 to/data/oradata/gpodb/ndmain02.dbf
restoring DataFile 00015 to/data/oradata/gpodb/ndmain04.dbf
restoring DataFile 00017 to/data/oradata/gpodb/ndmain06.dbf
Channel ora_disk_1:restored backup Piece 1
Piece Handle=/data/dbback/gpofullbak/full_27ig2ker_1_1 Tag=full_gpodb_data params=null
Channel Ora_disk_1:restore Complete
Channel ora_disk_1:starting datafile backupset restore
Channel ora_disk_1:specifying DataFile (s) to the restore from backup set
restoring DataFile 00001 to/data/oradata/gpodb/system01.dbf
restoring DataFile 00006 to/data/oradata/gpodb/users01.dbf
restoring DataFile 00008 to/data/oradata/gpodb/ndindex02.dbf
restoring DataFile 00010 to/data/oradata/gpodb/ndindex04.dbf
restoring DataFile 00012 to/data/oradata/gpodb/ndmain01.dbf
restoring DataFile 00014 to/data/oradata/gpodb/ndmain03.dbf
restoring DataFile 00016 to/data/oradata/gpodb/ndmain05.dbf
Channel ora_disk_1:restored backup Piece 1
Piece Handle=/data/dbback/gpofullbak/full_28ig2kpk_1_1 Tag=full_gpodb_data params=null
Channel Ora_disk_1:restore Complete
Finished restore at 25-4?? -2007 17:09:24

rman> Recover database;

Starting recover at 26-4?? -07
Using target database Controlfile instead of recovery catalog
Allocated Channel:ora_disk_1
Channel Ora_disk_1:sid=8 Devtype=disk

Starting Media recovery

Channel ora_disk_1:starting archive log restore to default destination
Channel ora_disk_1:restoring Archive Log
Archive Log thread=1 sequence=98
Channel ora_disk_1:restored backup Piece 1
Piece Handle=/data/dbback/gpofullbak/full_29ig2l43_1_1 tag=tag20070425t164243 params=null
Channel Ora_disk_1:restore Complete
Archive Log filename=/data/archivelog/gpodb/1_98.dbf thread=1 sequence=98
Unable to find archive log
Archive Log thread=1 sequence=99
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE, STACK follows ===============
RMAN-00571: ===========================================================
Rman-03002:failure of recover command at 04/26/2007 09:58:41
Rman-06054:media recovery requesting unknown Log:thread 1 SCN 32837861

rman> ALTER DATABASE open resetlogs;

Database opened

Because the online log is not delivered, it is generally necessary to open the database with Resetlogs.

Rman Database Heterogeneous Migration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.