I was trying to convert one of my database which is running in Filesystem to ASM storage.
I created ASM instance and necessary diskgroups.
- Code: Select all
SQL> select name,total_mb,free_mb from v$asm_diskgroup;
NAME TOTAL_MB FREE_MB
------------------------------ ---------- ----------
DATAFILE 4076 2388
ARCHLOG 1016 900
Below datafiles are in Filesystem.
- Code: Select all
SQL> select name from v$datafile;
NAME
-------------------------------------------------------
/u01/app/oracle/oradata/test/system01.dbf
/u01/app/oracle/oradata/test/sysaux01.dbf
/u01/app/oracle/oradata/test/undotbs01.dbf
/u01/app/oracle/oradata/test/users01.dbf
/u01/app/oracle/oradata/test/example01.dbf
before to being the conversion made changes in necessary parameter.
- Code: Select all
ALTER SYSTEM SET control_files='+DATAFILE','+ARCHLOG' SCOPE=spfile;
ALTER SYSTEM SET db_create_file_dest='+DATAFILE' SCOPE=spfile;
alter database backup controlfile to '/u01/app/oracle/control_bkp';
Then I bounced the database and kept in nomount state.
- Code: Select all
RMAN> restore controlfile from '/u01/app/oracle/control_bkp';
Starting restore at 28-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=135 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATAFILE/test/controlfile/current.256.784467965
output file name=+ARCHLOG/test/controlfile/current.256.784467965
Finished restore at 28-MAY-12
Then I taken copy of full database backup with +DATAFILE diskgroup format.
- Code: Select all
RMAN> backup as copy database format '+DATAFILE';
Starting backup at 28-MAY-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=135 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/test/system01.dbf
output file name=+DATAFILE/test/datafile/system.257.784468069 tag=TAG20120528T114749 RECID=2 STAMP=784468098
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/test/sysaux01.dbf
output file name=+DATAFILE/test/datafile/sysaux.261.784468105 tag=TAG20120528T114749 RECID=3 STAMP=784468116
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/test/example01.dbf
output file name=+DATAFILE/test/datafile/example.258.784468119 tag=TAG20120528T114749 RECID=4 STAMP=784468127
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/test/undotbs01.dbf
output file name=+DATAFILE/test/datafile/undotbs1.260.784468135 tag=TAG20120528T114749 RECID=5 STAMP=784468136
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/test/users01.dbf
output file name=+DATAFILE/test/datafile/users.259.784468139 tag=TAG20120528T114749 RECID=6 STAMP=784468138
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 28-MAY-12
RMAN-06497: WARNING: control file is not current, control file AUTOBACKUP skipped
I am not sure why RMAN throws this error at the end "RMAN-06497: WARNING: control file is not current, control file AUTOBACKUP skipped"
Then I switched database to copy and when i open database with resetlogs its geting failed with below error.
- Code: Select all
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 1048457 generated at 05/28/2012 11:19:43 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/oradata/arch_dest/1_7_784462753.dbf
ORA-00280: change 1048457 for thread 1 is in sequence #7
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/arch_dest/1_7_784462753.dbf
ORA-00308: cannot open archived log
'/u01/app/oracle/oradata/arch_dest/1_7_784462753.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DATAFILE/test/datafile/system.257.784468069'
ORA-01112: media recovery not started
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DATAFILE/test/datafile/system.257.784468069'
SQL>
Please let me know where I did wrong