您的位置:首页 > 其它

RAC增加控制文件多路复用

2014-11-14 16:42 316 查看
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.打开其他节点  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: