Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Case where stand-alone 11.2.0.1 reverts to RAC 11.2.0.4

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The database name and instance name of the stand-alone machine are both DB521102. After restoring to RAC, the db_name is DB52110201 and DB52110202, respectively.

After experiments: whether 11.2.0.4 is installed directly or upgraded from 11.2.0.1 to 11.2.0.4, it is exactly the same as below.

1. The stand-alone must be started by spfile, backing up the database (starting with spfile will automatically back up spfile and crontrolfile) and archive logs

Rman > backup databast format'/ u01qqapqqrmanqqfull% U.bak' plus archivelog format'/ u01ActionAccording to rmanque% U.bak'

two。 Copy the backup of a stand-alone machine to the same directory / u01/app/rman of random machine testdb01 in RAC

3. Restore the stand-alone database on RAC's testdb01 machine

ORACLE_SID=DB521102

Rman > startup nomount

Rman > restore spfile to pfile'/ u01ActionApplicationoracleUniplicationproductUniplicate11.2.0OnDbsAction1According to DB521102.ora'

From'/ u01/app/rman/full10pu0tdo_1_1.bak'

The following error will occur in the process of the above startup nomount. Don't worry about it for the time being, it will normally startup to nomount status. After startup, pfile can be defined as the file information in the error report.

Startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file'/ u01qapplash oracle.product11.2.0anddbbin1anddbsandinitDB521102.ora'

4. Modify the newly recovered pfile file on RAC's testdb01 machine, leaving only the following parameter information. The specific value of the parameter refers to the parameter value of the original RAC.

However, some directories must be created manually, such as + DATA/DB521102 and + ARCH/ DB521102 directories in ASM, where local file paths must be created in all RAC servers, such as * .audit _ file_dest='/u01/app/oracle/admin/DB521102/adump' needs to be established in both testdb01 and testdb02

* .audit_file_dest='/u01/app/oracle/admin/DB521102/adump'

* .audit_trail='none'

* .compatible='11.2.0.0.0'

* .control_files='+DATA/DB521102/control01.ctl','+ARCH/DB521102/control02.ctl'

* .db_block_size=8192

* .db_create_file_dest='+DATA'

* .db_domain=''

* .db_name='DB521102'

* .db_recovery_file_dest='+ARCH'

* .db_recovery_file_dest_size=4070572032

* .diagnostic_dest='/u01/app/oracle'

* .dispatchers=' (PROTOCOL=TCP) (SERVICE=DB521102XDB)'

* .memory_target=1656750080

* .log_archive_dest_1='location=+ARCH'

* .log_archive_format='%t_%s_%r.dbf'

* .open_cursors=300

* .processes=150

* .remote_login_passwordfile='EXCLUSIVE'

5. Create Spfile to the ASM directory on RAC's testdb01 machine and close the DUMMY instance

ORACLE_SID= DB521102

SQL > create spfile ='+ DATA/DB521102/spfileDB521102.ora' from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initDB521102.ora'

Sql > shutdown abort

6. Execute on RAC's testdb01 machine

Echo "spfile='+DATA/DB521102/spfileDB521102.ora'" > / u01/app/oracle/product/11.2.0/db_1/dbs/initDB521102.ora

7. ORACLE_SID=DB521102

Startup nomount the database on RAC's testdb01 machine and show parameter spfile to see if the spfile is from ASM

8. Restore the control files of a stand-alone machine on RAC's testdb01 machine

Rman > restore controlfile from'/ u01qqappUniqqr rmanUniqqfull10pu0tdoxing 1percent 1.bak'

9. On RAC's testdb01 machine.

Rman > alter database mount

10. Restore data files on RAC's testdb01 machine

RMAN > run {

Set newname for datafile 1 to'+ DATA/DB521102/system01.dbf'

Set newname for datafile 2 to'+ DATA/DB521102/sysaux01.dbf'

Set newname for datafile 3 to'+ DATA/DB521102/undotbs01.dbf'

Set newname for datafile 4 to'+ DATA/DB521102/users01.dbf'

Set newname for tempfile 1 to'+ DATA/DB521102/temp01.dbf'

Restore database

Switch datafile all

Switch tempfile all

}

11. Register the archive log backup package that was last backed up on the stand-alone on RAC's testdb01 machine

Rman > catalog backuppiece'/ u01max appplash RManThree Arch21pu0tdrilled 1cm 1.bak'

twelve。 The sequence+1 from the recover database to the last archived log on RAC's testdb01 machine

RMAN > recover database until sequence 9

13. Modify the online log path of the stand-alone machine to the ASM path on RAC's testdb01 machine

Alter database rename file'/ oracle/ora11g/oradata/DB521102/redo01.log' to'+ DATA/DB521102/redo01.log'

Alter database rename file'/ oracle/ora11g/oradata/DB521102/redo02.log' to'+ DATA/DB521102/redo02.log'

Alter database rename file'/ oracle/ora11g/oradata/DB521102/redo03.log' to'+ DATA/DB521102/redo03.log'

Alter database rename file'/ oracle/ora11g/oradata/DB521102/redo04.log' to'+ DATA/DB521102/redo04.log'

14. On RAC's testdb01 machine.

Sql > alter database open resetlogs

The following error message appears

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-00704: bootstrap process failure

ORA-39700: database must be opened with UPGRADE option

15. The solution is as follows. The login of the target library is performed as follows (the instance will automatically shutdown after executing catupgrd.sql, and resetlogs is no longer required in the process of direct startup)

ORACLE_SID=DB521102

Sql > startup upgrade

Sql > @ $ORACLE_HOME/rdbms/admin/catupgrd.sql

Sql > startup

16. Modify the parameters on RAC's testdb01 machine, modify the number of instances in the database, name each instance, and make each instance have a separate thread

Alter system set cluster_database=true scope=spfile

Alter system set cluster_database_instances=2 scope=spfile

Alter system set instance_number=1 scope=spfile sid='DB52110201'

Alter system set instance_number=2 scope=spfile sid='DB52110202'

Alter system set thread=1 scope=spfile sid='DB52110201'

Alter system set thread=2 scope=spfile sid='DB52110202'

17. Check the undo tablespace on RAC's testdb01 machine to make sure there is only one undo tablespace

Show parameter undo

18. Create a second undo tablespace on RAC's testdb01 machine

Create undo tablespace undotbs2 datafile'+ DATA/DB521102/undotbs02.dbf' size 512m

19. Modify the parameters on RAC's testdb01 machine so that each instance has an independent undo tablespace

Alter system set undo_tablespace='undotbs1' scope=spfile sid='DB52110201'

Alter system set undo_tablespace='undotbs2' scope=spfile sid='DB52110202'

20. Create an online log group for the second thread on RAC's testdb01 machine

Alter database add logfile thread 2 group 4'+ DATA/DB521102/redo04.log' size 50m

Alter database add logfile thread 2 group 5'+ DATA/DB521102/rede05.log' size 50m

Alter database add logfile thread 2 group 6'+ DATA/DB521102/rede06.log' size 50m

21. Start the second thread on RAC's testdb01 machine

Alter database enable thread 2

twenty-two。 Check whether the archive path is in ASM on RAC's testdb01 machine

Archive log list

23. Shut down the database on RAC's testdb01 machine

ORACLE_SID=DB521102

Sql > Shutdown immediate

24. Close the RAC database on RAC's testdb01 and testdb02 machines

Source / .bash_profile

Sql > Shutdown immediate

25. Reconfigure initialization pfile on all RAC machines, namely testdb01, testdb02

[oracle@testdb01 dbs] $echo "spfile='+DATA/DB521102/spfileDB521102.ora'" > / u01/app/oracle/product/11.2.0/db_1/dbs/initDB52110201.ora

[oracle@testdb02 ~] $echo "spfile='+DATA/DB521102/spfileDB521102.ora'" > / u01/app/oracle/product/11.2.0/db_1/dbs/initDB52110202.ora

twenty-six。 Configure oracle's .bash _ profile on all machines in RAC, namely testdb01 and testdb02, set ORACLE_UNQNAME and ORACLE_SID to new values, and source .bash _ profile

twenty-seven。 Start the database on all RAC machines, namely testdb01 and testdb02, and check on each machine to see if all instance information can be queried

Sql > starup

Sql > select status,instance_number,instance_name,host_name from gv$instance

twenty-eight。 Create password files for their respective instances on all machines of RAC, namely testdb01 and testdb02

Orapwd file='$ORACLE_HOME/dbs/orapwDB5211021' password=123456 entries=5 force=y

Orapwd file='$ORACLE_HOME/dbs/orapwDB5211022' password=123456 entries=5 force=y

twenty-nine。 Join the database to the cluster on a random machine in RAC, such as a testdb01 machine (grid or oracle users can)

Srvctl add database-d DB521102-o $ORACLE_HOME-p + DATA/DB521102/spfileDB521102.ora

Srvctl add instance-d DB521102-I DB52110201-n testdb01

Srvctl add instance-d DB521102-I DB52110202-n testdb02

Srvctl start database-d DB521102

thirty。 Check all the machines in RAC, namely testdb01 and testdb02, to see if there is this database in the cluster.

Srvctl status database-d DB521102

A problem may be encountered carelessly in the process of the above methods, as follows

20160812 after restarting the server at 11:45, srvctl status database-d db521102 shows that it is not running normally. Manual execution of srvctl start database-d db521102 finds the following information. Check initDB5211022.ora and find that the file has been automatically modified and backed up an initDB5211022.ora.bak.testdb02. The directory shown in the backup file is / dbrac/. Of course, the solution is to simply copy the parameter file from the dbrac directory to DB521102 and ok it. I feel that the cause of this mistake may be one of the following two, and the second is personal tendency.

1. In step 26, the path to echo is dbrac at the beginning, and DB is started in RAC, which is later manually modified to DB521102, so after restarting the server, the cluster does not recognize DB521102 but dbrac.

two。 Step 26 echo is mismatched to dbrac, but step 29-p becomes DB521102

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report