Powered By Blogger

Sunday, March 29, 2009

ASM to Non ASM

connected to target database: ORCL (DBID=1185757350)
ASM TO NON ASM
1.
RMAN> run
2> {
3> allocate channel c1 device type disk format='E:\backup\db_%U';
4> backup database;
5> }
released channel: ORA_DISK_1
allocated channel: c1
channel c1: sid=141 devtype=DISK
Starting backup at 08-AUG-08
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=+DBFILES/orcl/datafile/system.263.659715057
input datafile fno=00003 name=+DBFILES/orcl/datafile/sysaux.265.659715107
input datafile fno=00002 name=+DBFILES/orcl/datafile/undotbs1.264.659715093
input datafile fno=00005 name=+DBFILES/orcl/datafile/example.267.659715139
input datafile fno=00004 name=+DBFILES/orcl/datafile/users.266.659715133
channel c1: starting piece 1 at 08-AUG-08
channel c1: finished piece 1 at 08-AUG-08
piece handle=E:\BACKUP\DB_1LJNH6L3_1_1 tag=TAG20080808T124211 comment=NONE
channel c1: backup set complete, elapsed time: 00:01:26
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c1: starting piece 1 at 08-AUG-08
channel c1: finished piece 1 at 08-AUG-08
piece handle=E:\BACKUP\DB_1MJNH6NP_1_1 tag=TAG20080808T124211 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 08-AUG-08
released channel: c1
2. Shutdown Immediate
3.startup Nomount
4.Change the intialization parametres
*alter system set db_create_file_dest=' ' scope=spfile
*alter system set db_create_online_log_dest_1=' ' scope=spfile;
*alter system set control_files='E:/oracle/product/10.2.0/oradata/control01.ctl' scope=spfile;
5.(Optional)
SQL> drop diskgroup 'DBFILES' including contents;
Diskgroup dropped.
5.
run
{
shutdown immediate;
startup nomount
}
RMAN>set DBID=1185757350;
RMAN> run
2> {
3> restore controlfile from "E:\BACKUP\DB_1MJNH6NP_1_1";
4> startup mount;
5> set newname for datafile 1 to 'E:/oracle/product/10.2.0/oradata/system.dbf' ;
6> set newname for datafile 2 to 'E:/oracle/product/10.2.0/oradata/undotbs1.dbf' ;
7> set newname for datafile 3 to 'E:/oracle/product/10.2.0/oradata/sysaux.dbf' ;
8> set newname for datafile 4 to 'E:/oracle/product/10.2.0/oradata/users.dbf' ;
9> set newname for datafile 5 to 'E:/oracle/product/10.2.0/oradata/example.dbf' ;
10> restore database;
11> switch datafile all;
12> recover database until logseq 63;
13> sql"alter database mount";
14> sql"alter database open resetlogs";
15> }

Logfile created automatically in Flash recovery area for the same size and database opened with resetlogs.

No comments:

Post a Comment