『ORACLE』RAC—控制檔案多重路徑複製

來源:互聯網
上載者:User

標籤:16px   and   restore   style   cluster   sel   file   ram   buffer   

查看當前控制檔案數量及位置、名稱

[email protected] rac1>show parameter control_files;

NAME                                             TYPE           VALUE
--------------------------------------------  ------------  ----------------------------------------------------
control_files                                    string         +DATA/racdb/controlfile/current.260.942339579,

關閉資料庫並將一個節點啟動到nomount

[[email protected] ~]$ srvctl stop database -d racdb
[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:37:51 2017

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

Connected to an idle instance.

[email protected] rac1>startup nomount;
ORACLE instance started.

Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 603982928 bytes
Database Buffers 226492416 bytes
Redo Buffers 2371584 bytes

利用RMAN建立控制檔案

[[email protected] ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Apr 27 23:45:55 2017

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

connected to target database: RACDB (not mounted)

RMAN> restore controlfile to ‘+DATA‘ from ‘+DATA/RACDB/CONTROLFILE/Current.260.942339579‘;

Starting restore at 27-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=RACDB1 device type=DISK

channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17

RMAN> restore controlfile to ‘+DATA‘ from ‘+DATA/RACDB/CONTROLFILE/Current.260.942339579‘;

Starting restore at 27-APR-17
using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy
Finished restore at 27-APR-17

查看已產生的控制檔案

[[email protected] ~]$ asmcmd
ASMCMD> cd DATA/RACDB/CONTROLFILE
ASMCMD> pwd
+DATA/RACDB/CONTROLFILE
ASMCMD> ls
Current.260.942339579
current.269.942446013
current.270.942447435

此時1節點應該在nmount

[email protected] rac1>select inst_id,host_name,status from gv$instance;

INST_ID    HOST_NAME                                                                        STATUS
---------- ---------------------------------------------------------------- ------------
1              rac1                                                                                    OPEN

[email protected] rac1>alter system set control_files=
2 ‘+DATA/RACDB/controlfile/Current.260.942339579‘,
3 ‘+DATA/RACDB/controlfile/current.269.942450435‘,
4 ‘+DATA/RACDB/controlfile/current.270.942450415‘ scope=spfile;

System altered.

[email protected] rac1>shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
[email protected] rac1>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[[email protected] ~]$ srvctl start database -d racdb
[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 27 23:50:46 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] rac1>select inst_id,name from gv$controlfile; 

INST_ID             NAME

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

1                     +DATA/racdb/controlfile/current.260.942339579

1                     +DATA/racdb/controlfile/current.269.942450435

1                     +DATA/racdb/controlfile/current.270.942450415

2                     +DATA/racdb/controlfile/current.260.942339579

2                     +DATA/racdb/controlfile/current.269.942450435  

2                     +DATA/racdb/controlfile/current.270.942450415

6 rows selected.

 

『ORACLE』RAC—控制檔案多重路徑複製

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.