show parameter control_files NAME        &n..."/>
溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

11g rac 添加一個(gè)控制文件

發(fā)布時(shí)間:2020-07-17 01:02:30 來源:網(wǎng)絡(luò) 閱讀:535 作者:roidba 欄目:關(guān)系型數(shù)據(jù)庫


一、環(huán)境

11g rac 


二、演示步驟

1. 查看控制文件路徑

SYS@ysdb1>show parameter control_files

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_files                        string      +DATA1/ysdb/control01.ctl

 

 

2. 關(guān)閉所有實(shí)例,啟動(dòng)一個(gè)實(shí)例到nomount狀態(tài),恢復(fù)一個(gè)控制文件

[oracle@ysdb1 dbs]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jun 28 11:10:03 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: YSDB (DBID=3762312883)

 

RMAN> shutdown immediate;

 

using target database control file instead of recovery catalog

database closed

database dismounted

 

Oracle instance shut down

 

RMAN>

RMAN>

 

RMAN> startup nomount;

connected to target database (not started)

Oracle instance started

Total System Global Area     647204864 bytes

Fixed Size                     2256032 bytes

Variable Size                536871776 bytes

Database Buffers             104857600 bytes

Redo Buffers                   3219456 bytes

 

RMAN> restore controlfile to '+data1/ysdb/control03.ctl' from '+data1/ysdb/control01.ctl';

 

Starting restore at 28-JUN-17

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=34 instance=ysdb1 device type=DISK

 

channel ORA_DISK_1: copied control file copy

Finished restore at 28-JUN-17

 

RMAN>

 

 

3.  nomount下,修改參數(shù)文件,重啟數(shù)據(jù)庫

 

[oracle@ysdb1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 28 11:14:08 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

 

SYS@ysdb1>select status from v$instance;

 

STATUS

------------

STARTED

 

SYS@ysdb1>alter system set control_files='+data1/ysdb/control01.ctl','+data1/ysdb/control03.ctl' scope=spfile sid='*';  

System altered.

 

SYS@ysdb1>shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

 

SYS@ysdb1>startup

ORACLE instance started.

 

Total System Global Area  647204864 bytes

Fixed Size                  2256032 bytes

Variable Size             536871776 bytes

Database Buffers          104857600 bytes

Redo Buffers                3219456 bytes

Database mounted.

Database opened.

SYS@ysdb1>show parameter control_files

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_files                        string      +DATA1/ysdb/control01.ctl, +DA                                                 TA1/ysdb/control03.ctl

SYS@ysdb1>


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI