1. 程式人生 > >11g rac 添加一個控制文件

11g rac 添加一個控制文件

11g rac 添加一個控制文件


一、環境

11g rac


二、演示步驟

1. 查看控制文件路徑

[email protected]>show parameter control_files

NAME TYPE VALUE

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

control_files string +DATA1/ysdb/control01.ctl

2. 關閉所有實例,啟動一個實例到

nomount狀態,恢復一個控制文件

[[email protected] 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下,修改參數文件,重啟數據庫

[[email protected] 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

[email protected]>select status from v$instance;

STATUS

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

STARTED

[email protected]>alter system set control_files=‘+data1/ysdb/control01.ctl‘,‘+data1/ysdb/control03.ctl‘ scope=spfile sid=‘*‘;

System altered.

[email protected]>shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

[email protected]>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.

[email protected]>show parameter control_files

NAME TYPE VALUE

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

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

[email protected]>


本文出自 “roidba” 博客,請務必保留此出處http://roidba.blog.51cto.com/12318731/1942643

11g rac 添加一個控制文件