Oracle 11.2.0.4 RAC reverts to single instance

Source: Internet
Author: User
Tags file copy

First, back up the original library

Run{backup database format '/home/oracle/backup/db_%u_%t.bak '; backup current controlfile format '/home/oracle/backup/ Ctl_%u_%t.bak '; backup spfile format '/home/oracle/backup/spfile_%u_%t.bak '; backup archivelog from time ' sysdate-1 ' Format  '/home/oracle/backup/arch_%u_%t.bak ';}

Second, modify the parameter file of the single instance

Copy the backed up files to the same directory as the single instance

db_name=suqlog_archive_dest_1= ' Location=/arch ' pga_aggregate_target=400000000sga_target=800000000control_files= '/oradata/control.ctl '

Start a single instance to Nomount

[Email protected] dbs]$ sqlplus/as sysdbasql*plus:release 11.2.0.4.0 Production on Fri Dec 20:39:56 2014Copyright ( c) 1982, Oracle.  All rights reserved. Connected to an idle instance. Sql> sql> Startup Nomountoracle instance started. Total System Global area  797523968 bytesfixed size    2257472 bytesvariable size  222301632 bytesdatabase Buffers  566231040 bytesredo buffers    6733824 bytes


Iii. Recovery of control files

[[email protected] ~]$ rman target/recovery manager:release 11.2.0.4.0-production on Fri Dec 20:40:14 2014Copy  Right (c) 1982, and Oracle and/or its affiliates. All rights reserved.connected to target Database:suq (not mounted) rman> restore controlfile from '/home/oracle/backup/ Clt_0dpq0ka5_1_1_20141212.bak '; Starting restore at 12-dec-14using target database control file instead of recovery catalogallocated channel:ora_disk_1ch  Annel ora_disk_1:sid=171 device Type=diskchannel ora_disk_1:restoring control FileChannel Ora_disk_1:restore Complete, Elapsed Time:00:00:01output file name=/oradata/control.ctlfinished restore at 12-dec-14rman> sql> startup MountOR ACLE instance started. Total System Global area 797523968 bytesfixed size 2257472 bytesvariable size 222301632 bytesdatabase buffers 566231 040 Bytesredo buffers 6733824 Bytesora-00201:control file version 11.2.0.4.0 incompatible with ORACLE version11.2.0.0. 0ora-00202:control file: '/oradata/controL.ctl ' 

Here is an error, need to add a version of the parameters in the Pfile

Compatible= ' 11.2.0.4.0 '

Sql> Startup Mountoracle instance started. Total System Global area  797523968 bytesfixed size    2257472 bytesvariable size  222301632 bytesdatabase Buffers  566231040 Bytesredo buffers    6733824 bytesdatabase mounted. Sql> exit

Iv. modifying the path of the log file

Alter DATABASE rename file ' +backup/suq/onlinelog/group_1.258.850940549 ' to '/oradata/group_1.258.850940549 '; alter Database rename file ' +backup/suq/onlinelog/group_1.259.850940549 ' to '/oradata/group_1.259.850940549 '; alter Database rename file ' +backup/suq/onlinelog/group_2.260.850940551 ' to '/oradata/group_2.260.850940551 '; alter Database rename file ' +backup/suq/onlinelog/group_2.261.850940551 ' to '/oradata/group_2.261.850940551 '; alter Database rename file ' +backup/suq/onlinelog/group_3.268.850941051 ' to '/oradata/group_3.268.850941051 '; alter Database rename file ' +backup/suq/onlinelog/group_3.269.850941053 ' to '/oradata/group_3.269.850941053 '; alter Database rename file ' +backup/suq/onlinelog/group_4.270.850941053 ' to '/oradata/group_4.270.850941053 ';D atabase Altered. Sql> Database altered. Sql> Database altered. Sql> Database altered. Sql> Database altered. Sql> Database altered. Sql> Database altered. sql> ALTER DATABASE Rename file ' +backup/suq/onlinelog/group_4.271.850941053 ' to '/oradata/group_4.271.850941053 ';D atabase altered. 

Five, restore the data file, you need to specify the SCN number, you can view the list backup, you need to write to the time you can recover to the point

Run{set newname for database to '/oradata/%b ', set until SCN 394762;restore database;switch datafile all;} Executing command:set newnamestarting restore at 12-dec-14allocated channel:ora_disk_1channel ora_disk_1:sid=170 Devic E type=diskchannel ora_disk_1:starting datafile backup set Restorechannel ora_disk_1:specifying datafile (s) to restore F Rom backup setchannel ora_disk_1:restoring datafile 00001 to/oradata/system.262.850940553channel ora_disk_1:restoring DataFile 00002 to/oradata/sysaux.263.850940565channel ora_disk_1:restoring datafile 00003 to/oradata/ Undotbs1.264.850940573channel ora_disk_1:restoring datafile 00004 to/oradata/undotbs2.266.850940597channel ORA_DISK _1:restoring datafile 00005 to/oradata/users.267.853590391channel ora_disk_1:reading from backup Piece/home/oracle/ba Ckup/db_0bpq0k84_1_1_20141212.bakchannel ora_disk_1:piece handle=/home/oracle/backup/db_0bpq0k84_1_1_20141212. Bak tag=tag20141212t194156channel ora_disk_1:restored backup piece 1channel ORa_disk_1:restore complete, elapsed time:00:00:35finished restore @ 12-dec-14datafile 1 switched to datafile Copyinput DataFile copy recid=6 stamp=866148453 file name=/oradata/system.262.850940553datafile 2 switched to datafile Copyinput da Tafile copy recid=7 stamp=866148453 file Name=/oradata/sysaux.263.850940565datafile 3 switched to datafile copyinput data File copy recid=8 stamp=866148453 file Name=/oradata/undotbs1.264.850940573datafile 4 switched to datafile copyinput data File copy recid=9 stamp=866148453 file Name=/oradata/undotbs2.266.850940597datafile 5 switched to datafile copyinput data File copy recid=10 stamp=866148453 file name=/oradata/users.267.853590391rman> [[email protected] oradata]$ ls -ltotal 1765776-rw-r-----1 Oracle oinstall 18497536 Dec 20:48 control.ctl-rw-r-----1 Oracle oinstall 629153792 Dec 1 2 20:47 sysaux.263.850940565-rw-r-----1 Oracle oinstall 734011392 DEC 20:47 system.262.850940553-rw-r-----1 Oracle Oi Nstall 209723392 Dec 20:47 uNDOTBS1.264.850940573-RW-R-----1 Oracle oinstall 209723392 DEC 20:47 undotbs2.266.850940597-rw-r-----1 Oracle Oinsta ll 5251072 Dec 20:46 users.267.853590391[[email protected] oradata]$ sql> select name from V$datafile; NAME--------------------------------------------------------------------------------/oradata/ system.262.850940553/oradata/sysaux.263.850940565/oradata/undotbs1.264.850940573/oradata/ undotbs2.266.850940597/oradata/users.267.853590391

Six, open the database, some follow-up operations

sql> ALTER DATABASE open Resetlogs;database altered. Sql> Select COUNT (*) from TEST.T1;  COUNT (*)----------2sql> ALTER DATABASE disable thread 2;database altered. sql> ALTER DATABASE disable thread 2;database altered. sql> sql> sql> sql> ALTER DATABASE drop logfile group 3;database altered. sql> ALTER DATABASE drop logfile group 4;database altered.



Oracle 11.2.0.4 RAC reverts to single instance

Related Article

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.