oracle+restore+pfile,RAC增加控制文件多路复用

本文详细介绍了在Oracle数据库集群环境中,如何关闭所有节点、启动数据库至nomount状态、使用RMAN恢复控制文件、修改pfile、创建spfile以及重启数据库的过程。操作涉及数据库的关闭、启动、备份恢复及参数文件的管理和更新。
摘要由CSDN通过智能技术生成

1.关闭集群的所有节点:

[oracle@node1 ~]$ srvctl stop database -d MECBS

2.在一个节点启动数据库到nomount状态:

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 14 16:06:10 2014

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

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  484356096 bytes

Fixed Size   2254464 bytes

Variable Size 264243584 bytes

Database Buffers 209715200 bytes

Redo Buffers   8142848 bytes

3.用RMAN restore控制文件:

[oracle@node1 ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Nov 14 16:09:52 2014

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

RMAN> connect target /

connected to target database: MECBS (not mounted)

RMAN> restore controlfile to '+RECO/MECBS/CONTROLFILE/current.160' from '+DATA/mecbs/controlfile/current.260.862339599';

Starting restore at 14-NOV-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=194 instance=MECBS1 device type=DISK

channel ORA_DISK_1: copied control file copy

Finished restore at 14-NOV-14

RMAN> restore controlfile to '+BACK/MECBS/CONTROLFILE/current.360' from '+DATA/mecbs/controlfile/current.260.862339599';

Starting restore at 14-NOV-14

using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy

Finished restore at 14-NOV-14

4.修改pfile文件:

*.control_files='+DATA/mecbs/controlfile/current.260.862339599','+RECO/MECBS/CONTROLFILE/current.285.863626445','+BACK/MECBS/CONTROLFIE/current.265.863626497'

5.关闭数据库,以pfile启动:

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 14 16:25:42 2014

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

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down

SQL> startup pfile='/home/oracle/pfile1114.ora';

ORACLE instance started.

Total System Global Area  484356096 bytes

Fixed Size   2254464 bytes

Variable Size 264243584 bytes

Database Buffers 209715200 bytes

Redo Buffers   8142848 bytes

Database mounted.

Database opened.

创建spfile文件:

SQL> create spfile='+DATA/MECBS/spfileMECBS.ora' from pfile='/home/oracle/pfile1114.ora';

File created.

重启数据库:

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  484356096 bytes

Fixed Size   2254464 bytes

Variable Size 264243584 bytes

Database Buffers 209715200 bytes

Redo Buffers   8142848 bytes

Database mounted.

Database opened.

SQL> show parameter spfile;

NAME    TYPE VALUE

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

spfile    string+DATA/mecbs/spfilemecbs.ora

SQL> select name from v$controlfile;

NAME

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

+DATA/mecbs/controlfile/current.260.862339599

+RECO/mecbs/controlfile/current.285.863626445

+BACK/mecbs/controlfie/current.265.863626497

6.打开其他节点

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值