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

Oracle Study-- Oracle RAC Reconstruction Control File

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Oracle Study-- Oracle RAC Reconstruction Control File

System environment:

Operating system: AIX5.3

Cluster: Oracle 10gR2 CRS

Oracle: Oracle 10gR2

Rebuilding the control file in the RAC environment is similar to that on a single instance, except that there are some steps to note:

[oracle@aix211] $cat mkln.sh ln-s / dev/rsystem / u01/app/oracle/oradata/prod/system01.dbfln-s / dev/rsysaux / u01/app/oracle/oradata/prod/sysaux01.dbfln-s / dev/rusers / u01/app/oracle/oradata/prod/users01.dbfln-s / dev/rundotbs1 / u01/app/oracle/oradata/prod/undotbs01.dbf ln-s / dev/rundotbs2 / u01/app/oracle/oradata/prod/undotbs02.dbfln-s / dev/rtemp / u01/app/oracle/oradata/prod/temp01.dbfln-s / dev/rcontrol1_1 / u01/app/oracle/oradata/prod/control01.ctlln-s / dev/rcontrol2_2 / u01/app/oracle/oradata/prod/control02.ctlln-s / dev/rcontrol3_3 / u01/app/oracle/oradata/prod/control03.ctlln -s / dev/rredo1_1 / u01/app/oracle/oradata/prod/log11.logln-s / dev/rredo1_2 / u01/app/oracle/oradata/prod/log12.logln-s / dev/rredo2_1 / u01/app/oracle/oradata/prod/log21.logln-s / dev/rredo2_2 / u01/app/oracle/oradata/prod/log22.logln-s / dev/rindex / u01/app/oracle/oradata/prod/index01.dbfln-s / dev/rspfile / u01/app/oracle/oradata/prod/spfile01ln-s / dev/rexample / u01/app/oracle/oradata/prod/example01.dbf

Database is stored on RAW.

1. First back up controlfile on a node

[oracle@aix201] $sqlplus'/ as sysdba'SQL*Plus: Release 10.2.0.1.0-Production on Mon Mar 23 16:16:07 2015Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit ProductionWith the Partitioning, Real Application Clusters, OLAP and Data Mining optionsSQL > select status from vastly instanced situation > alter database backup controlfile to trace;Database altered.

2. View the trace backup of control files (udump)

CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 MAXINSTANCES 32 MAXLOGHISTORY 292LOGFILE GROUP 1'/ u01 Log 'SIZE SIZE 50m, GROUP 2' / u01 Log 'SIZE 50m, GROUP 2' / u01 Log 'SIZE 50m, GROUP 3' / u01 Log 'Log' SIZE 50m GROUP 4'/ u01ApplicationoradataLog22.log'oradata 50M-STANDBY LOGFILEDATAFILE'/ u01inaporacleoradataSystem01.dbfills,'/ u01plicatableoradataplicasprodcanundotbs01.dbfills,'/ u01inoracleoradatalead proddebase sysaux01.dbfills,'/ u01apaporacleImoradatalead produss01.dbfills,'/ u01App back to oracleoradatainoradataandprodUniplicationexam01.dbftogether '/ u01/app/oracle/oradata/prod/undotbs02.dbf'CHARACTER SET ZHS16GBK

3. Close database and start one of the instance to get mount.

SQL > startup nomount ORACLE instance started.Total System Global Area 612368384 bytesFixed Size 2022832 bytesVariable Size 184549968 bytesDatabase Buffers 423624704 bytesRedo Buffers 2170880 bytesSQL > @ / home/oracle/cr_ctr.sqlCREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG*ERROR at line 1:ORA-01503: CREATE CONTROLFILE failedORA-12720: operation requires database is in EXCLUSIVE modeSQL > show parameter clusterNAME TYPE VALUE- -failed to create cluster_database boolean TRUEcluster_database_instances integer 2cluster_interconnects string The reason is that you are in share mode when controlling files under RAC, and you need to start to exclusive mode before you can rebuild Change cluster_database to false, and then rebuild

Re-establish the control file:

SQL > alter system set cluster_database = false scope=spfile System altered.SQL > startup nomountORACLE instance started.Total System Global Area 612368384 bytesFixed Size 2022832 bytesVariable Size 184549968 bytesDatabase Buffers 423624704 bytesRedo Buffers 2170880 bytesSQL > show parameter clusterNAME TYPE VALUE -cluster_database boolean FALSEcluster_database_instances integer 1cluster_interconnects stringSQL > @ / home/oracle/cr_ctr.sqlControl file created. Alarm log: alter.log:Mon Mar 23 16:41:00 2015CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 MAXINSTANCES 32 MAXLOGHISTORY 292LOGFILE GROUP 1'/ u01apprdbank GROUP SIZE SIZE 50m, GROUP 2'/ u01apposingoradataLog 12.log' oradata 50m, GROUP 3'/ u01apacleoradata 50m, GROUP 3'/ u01 GROUP 4'/ u01ApplicationoradataLog22.log'oradata 50M-STANDBY LOGFILEDATAFILE'/ u01inaporacleoradataSystem01.dbfills,'/ u01plicatableoradataplicasprodcanundotbs01.dbfills,'/ u01inoracleoradatalead proddebase sysaux01.dbfills,'/ u01apaporacleImoradatalead produss01.dbfills,'/ u01App back to oracleoradatainoradataandprodUniplicationexam01.dbftogether / u01/app/oracle/oradata/prod/undotbs02.dbf'CHARACTER SET ZHS16GBKMon Mar 23 16:41:00 2015WARNING: Default Temporary Tablespace not specified in CREATE DATABASE commandDefault Temporary Tablespace will be necessary for a locally managed database in future releaseWARNING: You are creating/reusing datafile / u01/app/oracle/oradata/prod/control01.ctl.WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.WARNING: You are creating/reusing datafile / u01/app/oracle/oradata/prod/control01.ctl.WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.WARNING: You are creating/reusing datafile / u01/app/oracle/oradata/prod/control02.ctl.WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.WARNING: You are creating/reusing datafile / u01/app/oracle/oradata/prod/control02.ctl.WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.Setting recovery target incarnation to 1Mon Mar 23 16:41:05 2015Successful mount of redo thread 1, with mount id 286981148Mon Mar 23 16:41:05 2015Completed: CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 MAXINSTANCES 32 MAXLOGHISTORY 292LOGFILE GROUP 1'/ u01 GROUP 3'/ u01 apprenticeship SIZE SIZE 50m, GROUP 4'/ u01 Log'oradat 50m,'/ u01Log 'SIZE 50M-STANDBY LOGFILEDATAFILE' / u01Onapplicaloracleoradataplicalprodplication01.dbfills,'/ u01ameapporacleoradatapluses prodsor undotbs01.dbfbrands,'/ u01aporacleinoradataprodSysAuxx01.dbfbrands,'/ u01aporadataprodSysAuxxxxxxxxxxxxxxxxxx,'/ u01apps01.dbf` '/ u01ApplicateoracleUniplicoradata u01/app/oracle/oradata/prod/undotbs02.dbf'CHARACTER SET ZHS16GBK example01.dbfags

4. Rebuilt successfully and start to open

SQL > select status from vastness instance. Status color MOUNTEDSQL > alter database open;Database altered. Add a temporary tablespace data file: SQL > select name from vault tempfileboot no rows selectedSQL > select tablespace_name from dba_tablespaces;TABLESPACE_NAME--SYSTEMUNDOTBS1SYSAUXTEMPUSERSUNDOTBS2EXAMPLE7 rows selected.SQL > alter tablespace temp add 2 tempfile'/ u01 reuse;Tablespace altered.SQL NAME----/u01/app/oracle/oradata/prod/temp01.dbf

5. Modify cluster_database parameters to start all instance

SQL > alter system set cluster_database = true scope=spfile;System altered.

Start all Instance, and if all instance starts successfully, the controlfile rebuild succeeds.

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