最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

OracleStudy之--OracleRAC重建控制文件

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 16:14:51
文檔

OracleStudy之--OracleRAC重建控制文件

OracleStudy之--OracleRAC重建控制文件:Oracle Study之--Oracle RAC重建控制文件 系統(tǒng)環(huán)境: 操作系統(tǒng): AIX5.3 Cluster: Oracle 10gR2 CRS Oracle: Oracle 10gR2 在RAC環(huán)境下重建控制文件和在單實(shí)例上類似,只是有些步驟需要注意: [oracle@aix211~]$catmkln.shln
推薦度:
導(dǎo)讀OracleStudy之--OracleRAC重建控制文件:Oracle Study之--Oracle RAC重建控制文件 系統(tǒng)環(huán)境: 操作系統(tǒng): AIX5.3 Cluster: Oracle 10gR2 CRS Oracle: Oracle 10gR2 在RAC環(huán)境下重建控制文件和在單實(shí)例上類似,只是有些步驟需要注意: [oracle@aix211~]$catmkln.shln

Oracle Study之--Oracle RAC重建控制文件 系統(tǒng)環(huán)境: 操作系統(tǒng): AIX5.3 Cluster: Oracle 10gR2 CRS Oracle: Oracle 10gR2 在RAC環(huán)境下重建控制文件和在單實(shí)例上類似,只是有些步驟需要注意: [oracle@aix211~]$catmkln.shln-s/dev/rsystem/u01/app/oracle

Oracle Study之--Oracle RAC重建控制文件

系統(tǒng)環(huán)境:

操作系統(tǒng): AIX5.3

Cluster: Oracle 10gR2 CRS

Oracle: Oracle 10gR2


在RAC環(huán)境下重建控制文件和在單實(shí)例上類似,只是有些步驟需要注意:

[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

Database存儲在在RAW上。

1、首先在一個(gè)節(jié)點(diǎn)備份controlfile

[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, 2005, Oracle. All rights reserved.
Connected to:
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、查看控制文件的trace備份(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 50M,
 GROUP 2 '/u01/app/oracle/oradata/prod/log12.log' SIZE 50M,
 GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50M,
 GROUP 4 '/u01/app/oracle/oradata/prod/log22.log' SIZE 50M
-- 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、關(guān)閉database,啟動其中一個(gè)instance到弄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

---創(chuàng)建失敗,原因是在RAC下控制文件時(shí)處于共享(share)模式,需啟動到獨(dú)立(exclusive)模式,才能重建;修改cluster_database 為false,然后重建

重新建立控制文件:

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.

告警日志:
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 50M,
 GROUP 2 '/u01/app/oracle/oradata/prod/log12.log' SIZE 50M,
 GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50M,
 GROUP 4 '/u01/app/oracle/oradata/prod/log22.log' SIZE 50M
-- 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 50M,
 GROUP 2 '/u01/app/oracle/oradata/prod/log12.log' SIZE 50M,
 GROUP 3 '/u01/app/oracle/oradata/prod/log21.log' SIZE 50M,
 GROUP 4 '/u01/app/oracle/oradata/prod/log22.log' SIZE 50M
-- 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、重建成功,啟動到open

SQL> select status from v$instance;
STATUS
------------
MOUNTED

SQL> alter database open;
Database altered.

添加臨時(shí)表空間數(shù)據(jù)文件:
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 100m reuse;
Tablespace altered.
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/temp01.dbf


5、修改cluster_database參數(shù),啟動所有instance

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

啟動所有Instance,如果所有instance啟動成功,則controlfile重建成功。

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

OracleStudy之--OracleRAC重建控制文件

OracleStudy之--OracleRAC重建控制文件:Oracle Study之--Oracle RAC重建控制文件 系統(tǒng)環(huán)境: 操作系統(tǒng): AIX5.3 Cluster: Oracle 10gR2 CRS Oracle: Oracle 10gR2 在RAC環(huán)境下重建控制文件和在單實(shí)例上類似,只是有些步驟需要注意: [oracle@aix211~]$catmkln.shln
推薦度:
標(biāo)簽: 控制 oracle 重建
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top