How RAC local data files are migrated to ASM-non-archival mode

Source: Internet
Author: User

System environment: Rhel6.2_x64+oracle rac11g Operation process: 1. Non-archive mode sql> archive Log list;database log mode No archive Modeautomati C Archival disabledarchive destination/u01/oracle/app/oracle/11.2.0/db/dbs/archoldest online log s Equence 303086Current Log sequence 303087sql>2. Non-system tablespace (currently a production environment, node RAC1 recognizes local files) sql> set line 180sql> C OL file_name for A60 sql> Col tablespace_name for A15 sql> Select File_name,file_id,online_status,tablespace_name fr Om dba_data_files; file_name file_id online_ Tablespace_name---------------------------                          -----------------------------------------------------------------+data/sdgdorcl/datafile/system.259.848099691 1 SYSTEM system+data/sdgdorcl/datafile/sysaux.260.848099695 2 ONLINE sysaux+dat a/sdgdorcl/datafile/undotbs1.261.848099697 3 ONLINE undotbs1+data/sdgdorcl/datafile/undotbs2.263.8 4809974 Online undotbs2+data/sdgdorcl/datafile/users.264.848099707 5 Online users+data/sdgdorcl/datafile/data01.268.848183595 6 ONLINE Data01+data/sdgdorcl/datafile/nnc_i                   ndex01.269.848183657 7 ONLINE Index01+data/sdgdorcl/datafile/data0101.268.8481835951.ora 8 Online data01+data/sdgdorcl/datafile/data01.271.854940577 9 online DATA01+DATA/SDGDORCL                     /datafile/data0102.268.8481835951.ora ONLINE Data01+data/sdgdorcl/datafile/nnc_index01.20160308.ora ONLINE index01file_name file_id Online_ TABLE Space_name--------------------------------------------------------------------------------------------/u01/ Oracle/app/oracle/11.2.0/db/dbs/data0401.ora ONLINE Data01/u01/oracle/app/oracle/11.2.0/db/dbs/data 0328.ora OnlinE data01+data/sdgdorcl/datafile/data01.274.911612215 ONLINE Data01+data/sdgdorcl/datafile/dat                    a01.275.911612497 ONLINE data01+data/sdgdorcl/datafile/nnc_index01.276.911612519 index01+data/sdgdorcl/datafile/nnc_index01.277.911612529 online index01sql> 3. Dry NET close rac2,rac1sql> shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down. Sql>4. Start the RAC1 mount status sql> startup Mountoracle instance started. Total System Global area 1.7103E+10 bytesfixed size 2245480 bytesvariable size 7381978264 byte Sdatabase buffers 9663676416 Bytesredo buffers 55263232 bytesdatabase mounted. sql>5. Copying data files via the Rman cp command [[[email protected] ora_data]$ rman target/rman> copy datafile '/u01/oracle/app/ Oracle/11.2.0/db/dbs/data0328.ora ' to ' +data '; Starting backup at 13-may-16using target database control file instead of recovery Catalogallocated channel:ora_disk_1channel ora_disk_1:sid=433 INSTANCE=SDGDORCL1 device Type=DISKchannel ORA_DISK_1: Starting datafile copyinput datafile file number=00013 name=/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.oraoutput File name=+data/sdgdorcl/datafile/data01.278.911710731 tag=tag20160513t045849 recid=1 STAMP=911710866channel ORA_ Disk_1:datafile copy complete, elapsed time:00:02:25finished backup at 13-may-16rman> copy datafile '/u01/oracle/app/ Oracle/11.2.0/db/dbs/data0401.ora ' to ' +data '; Starting backup at 13-may-16using Channel Ora_disk_1channel ora_disk_1:starting datafile copyinput datafile file number=0 0012 name=/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.oraoutput File name=+data/sdgdorcl/datafile/ data01.279.911710969 tag=tag20160513t050248 recid=2 stamp=911711045channel ora_disk_1:datafile copy complete, elapsed Time:00:01:25finished Backup at 13-may-16rman> 6. In Sqlplus, boot the database to mount state, rename the data file, and view the information sql> ALTER DATABASE Rename file '/u01/oracle/app/oracle/11.2.0/db/dbs/data0328.ora ' to ' +data/sdgdorcl/datafile/data01.278.911710731 '; sql> ALTER DATABASE rename file '/u01/oracle/app/oracle/11.2.0/db/dbs/data0401.ora ' to ' +data/sdgdorcl/datafile/ data01.279.911710969 '; 7. Start the RAC1,RAC2 #rac1sql> ALTER DATABASE open;database altered. Sql> #RAC2SQL > Startuporacle instance started. Total System Global area 1.7103E+10 bytesfixed size 2245480 bytesvariable size 7381978264 byte Sdatabase buffers 9663676416 Bytesredo buffers 55263232 bytesdatabase mounted. Database opened. Sql> attached: System Data File Migration Step (procedure description): 1. Stop db.2. Move the datafile using Asmcmd.3. Mount the db.4. Rename the datafile.5. Open the db.6. On all RAC nodes still need to bounce the database because it's SYSTEM tablespace, otherwise you'll keep getting Errors ORA-01516 or original error ora-01157:cannot identify/lock data file.

Reference Document: http://blog.itpub.net/29487349/viewspace-1696214/

How RAC local data files are migrated to ASM-non-archival mode

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.