Oracle Study-Oracle RAC reconstruction Control File

Source: Internet
Author: User

Oracle Study-Oracle RAC reconstruction Control File

System Environment:
Operating System: AIX5.3

Cluster: Oracle 10gR2 CRS
Oracle: Oracle 10gR2

Rebuild the control file in the RAC environment is similar to that in a single instance, but note the following steps:
[Oracle @ aix211 ~] $ Cat mkln. sh
Ln-s/dev/rsystem/u01/app/oracle/oradata/prod/system01.dbf
Ln-s/dev/rsysaux/u01/app/oracle/oradata/prod/sysaux01.dbf
Ln-s/dev/rusers/u01/app/oracle/oradata/prod/users01.dbf
Ln-s/dev/rundotbs1/u01/app/oracle/oradata/prod/undotbs01.dbf
Ln-s/dev/rundotbs2/u01/app/oracle/oradata/prod/undotbs02.dbf
Ln-s/dev/rtemp/u01/app/oracle/oradata/prod/temp01.dbf
Ln-s/dev/rcontrol1_1/u01/app/oracle/oradata/prod/control01.ctl
Ln-s/dev/rcontrol2_2/u01/app/oracle/oradata/prod/control02.ctl
Ln-s/dev/rcontrol3_3/u01/app/oracle/oradata/prod/control03.ctl
Ln-s/dev/rredo1_1/u01/app/oracle/oradata/prod/log11.log
Ln-s/dev/rredo1_2/u01/app/oracle/oradata/prod/log12.log
Ln-s/dev/rredo2_1/u01/app/oracle/oradata/prod/log21.log
Ln-s/dev/rredo2_2/u01/app/oracle/oradata/prod/log22.log
Ln-s/dev/rindex/u01/app/oracle/oradata/prod/index01.dbf
Ln-s/dev/rspfile/u01/app/oracle/oradata/prod/spfile01
Ln-s/dev/rexample/u01/app/oracle/oradata/prod/example01.dbf

The Database is stored in 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 2015
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select status from v $ instance;
STATUS
------------
OPEN
SQL> alter database backup controlfile to trace;
Database altered.

2. View trace backup of control files (udump)
Create controlfile reuse database "PROD" NORESETLOGS NOARCHIVELOG
# MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/app/oracle/oradata/prod/log11.log' SIZE 50 M,
GROUP 2'/u01/app/oracle/oradata/prod/log12.log 'SIZE 50 M,
GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50 M,
GROUP 4'/u01/app/oracle/oradata/prod/log22.log 'SIZE 50 M
-- STANDBY LOGFILE
DATAFILE
'/U01/app/oracle/oradata/prod/system01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs01.dbf ',
'/U01/app/oracle/oradata/prod/sysaux01.dbf ',
'/U01/app/oracle/oradata/prod/users01.dbf ',
'/U01/app/oracle/oradata/prod/example01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs02.dbf'
Character set ZHS16GBK
;

3. Close the database, start one of the instances to mount
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 2022832 bytes
Variable Size 184549968 bytes
Database Buffers 423624704 bytes
Redo Buffers 2170880 bytes

SQL> @/home/oracle/cr_ctr. SQL
Create controlfile reuse database "PROD" NORESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: create controlfile failed
ORA-12720: operation requires database is in EXCLUSIVE mode
SQL> show parameter cluster
NAME TYPE VALUE
-----------------------------------------------------------------------------
Cluster_database boolean TRUE
Cluster_database_instances integer 2
Cluster_interconnects string

--- Creation failed because the control file under RAC is in share mode and needs to be started to exclusive mode before reconstruction; Modify cluster_database to false and then recreate


Recreate the control file:
SQL> alter system set cluster_database = false scope = spfile;
System altered.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 2022832 bytes
Variable Size 184549968 bytes
Database Buffers 423624704 bytes
Redo Buffers 2170880 bytes

SQL> show parameter cluster
NAME TYPE VALUE
-----------------------------------------------------------------------------
Cluster_database boolean FALSE
Cluster_database_instances integer 1
Cluster_interconnects string

SQL> @/home/oracle/cr_ctr. SQL
Control file created.

Alarm log:
Alter. log:
Mon Mar 23 16:41:00 2015
Create controlfile reuse database "PROD" NORESETLOGS NOARCHIVELOG
# MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/app/oracle/oradata/prod/log11.log' SIZE 50 M,
GROUP 2'/u01/app/oracle/oradata/prod/log12.log 'SIZE 50 M,
GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50 M,
GROUP 4'/u01/app/oracle/oradata/prod/log22.log 'SIZE 50 M
-- STANDBY LOGFILE
DATAFILE
'/U01/app/oracle/oradata/prod/system01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs01.dbf ',
'/U01/app/oracle/oradata/prod/sysaux01.dbf ',
'/U01/app/oracle/oradata/prod/users01.dbf ',
'/U01/app/oracle/oradata/prod/example01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs02.dbf'
Character set ZHS16GBK
Mon Mar 23 16:41:00 2015
WARNING: Default Temporary Tablespace not specified in create database command
Default Temporary Tablespace will be necessary for a locally managed database in future release
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/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 1
Mon Mar 23 16:41:05 2015
Successful mount of redo thread 1, with mount id 286981148
Mon Mar 23 16:41:05 2015
Completed: create controlfile reuse database "PROD" NORESETLOGS NOARCHIVELOG
# MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/app/oracle/oradata/prod/log11.log' SIZE 50 M,
GROUP 2'/u01/app/oracle/oradata/prod/log12.log 'SIZE 50 M,
GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50 M,
GROUP 4'/u01/app/oracle/oradata/prod/log22.log 'SIZE 50 M
-- STANDBY LOGFILE
DATAFILE
'/U01/app/oracle/oradata/prod/system01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs01.dbf ',
'/U01/app/oracle/oradata/prod/sysaux01.dbf ',
'/U01/app/oracle/oradata/prod/users01.dbf ',
'/U01/app/oracle/oradata/prod/example01.dbf ',
'/U01/app/oracle/oradata/prod/undotbs02.dbf'
Character set ZHS16GBK

4. Rebuild successful, start to open
SQL> select status from v $ instance;
STATUS
------------
MOUNTED

SQL> alter database open;
Database altered.

Add a temporary tablespace data file:
SQL> select name from v $ tempfile;
No rows selected

SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
UNDOTBS2
EXAMPLE
7 rows selected.

SQL> alter tablespace temp add
2 tempfile '/u01/app/oracle/oradata/prod/temp01.dbf' size 100 m reuse;
Tablespace altered.
SQL> select name from v $ tempfile;
NAME
--------------------------------------------------------------------------------
/U01/app/oracle/oradata/prod/temp01.dbf

5. Modify the cluster_database parameter to start all instances.
SQL> alter system set cluster_database = true scope = spfile;
System altered.

Start all instances. If all instances are started successfully, controlfile is rebuilt successfully.

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.