This forum is currently locked. You can't register or post questions at this time. (read more)

RMAN conversion filesystem to ASM

All posts relating to Oracle database administration.

Moderator: Tim...

sivakumarocp
Advisor
Posts: 260
Joined: Sat Jun 27, 2009 3:53 am
Location: India

RMAN conversion filesystem to ASM

Postby sivakumarocp » Mon May 28, 2012 6:26 am

Hi Tim,

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
Regards
Sivakumar.A
www.sivakumardba.com

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: RMAN conversion filesystem to ASM

Postby Tim... » Mon May 28, 2012 6:57 am

Hi.

Why did you restore the controlfile from a backup controlfile, rather than just copying the current controlfile into ASM?

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

sivakumarocp
Advisor
Posts: 260
Joined: Sat Jun 27, 2009 3:53 am
Location: India

Re: RMAN conversion filesystem to ASM

Postby sivakumarocp » Tue May 29, 2012 5:02 pm

The reason why I restored controlfile from backup is to minimize the production downtime. before to downthe database i'll take copy of database with +DATAFILE diskgroup format. by doing this I could minimize the downtime.

Please let me know if I am wrong here.
Regards
Sivakumar.A
www.sivakumardba.com

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: RMAN conversion filesystem to ASM

Postby Tim... » Tue May 29, 2012 7:06 pm

Hi.

I understand copying the datafiles before the switch, but the controlfiles are small and will copy quickly. I would copy them into the correct location, rather than using a backup controlfile.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 7 guests