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

11g rac add a control file

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

Share

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

I. Environment

11g rac

Second, demonstration steps

1. View the control file path

SYS@ysdb1 > show parameter control_files

NAME TYPE VALUE

-

Control_files string + DATA1/ysdb/control01.ctl

two。 Close all instances, start one instance to nomount state, and restore a control file

[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. Under nomount, modify the parameter file and restart the database

[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, + DATA1/ysdb/ control03.ctl

SYS@ysdb1 >

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