Oracle 10g ASM 控制檔案多工

來源:互聯網
上載者:User

1> 檢查資料庫,查看控制檔案存放路徑
 SQL> startup
 Oracle instance started.
 
Total System Global Area  230686720 bytes
 Fixed Size      1218676 bytes
 Variable Size    71305100 bytes
 Database Buffers  155189248 bytes
 Redo Buffers      2973696 bytes
 Database mounted.
 Database opened.
 SQL> show parameter control;
 
NAME        TYPE  VALUE
 ------------------------------------ ----------- ------------------------------
 control_file_record_keep_time      integer  7
 control_files        string  +DATA/oradb/controlfile/backup
        .259.762002877                  //控制檔案名稱
 
SQL> shutdown immediate;                    //關閉資料庫
 Database closed.
 Database dismounted.
 ORACLE instance shut down.
 SQL> startup nomount;                      //開啟資料庫至nomount狀態
 ORACLE instance started.
 
Total System Global Area  230686720 bytes
 Fixed Size      1218676 bytes
 Variable Size    71305100 bytes
 Database Buffers  155189248 bytes
 Redo Buffers      2973696 bytes
 SQL>
SQL> exit 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
 With the Partitioning, OLAP and Data Mining options
 [oracle@node1 ~]$ rman target /                    //進入RMAN
 
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Sep 16 16:36:09 2011
 Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 connected to target database: oradb (not mounted)
 RMAN> restore controlfile to '+data/oradb/controlfile/backup.259.762002875' from '+data/oradb/controlfile/backup.259.762002877'; //利用資料庫當前的控制檔案,建立一個新的控制檔案
 
Starting restore at 16-SEP-11
 using target database control file instead of recovery catalog
 allocated channel: ORA_DISK_1
 channel ORA_DISK_1: sid=156 devtype=DISK
 channel ORA_DISK_1: copied control file copy
 Finished restore at 16-SEP-11
 Recovery Manager complete.
 RMAN> exit
 [oracle@node1 ~]$ export ORACLE_SID=+ASM
 [oracle@node1 ~]$ asmcmd                              //進入ASM執行個體命令
 ASMCMD> +data/oradb/controlfile
 ASMCMD> ls -ltr                                          //查看新建立的控制檔案名稱
 Type        Redund  Striped  Time            Sys  Name
 CONTROLFILE  HIGH    FINE    SEP 16 16:00:00  Y    backup.259.762002877
 CONTROLFILE  HIGH    FINE    SEP 16 16:00:00  Y    backup.265.762021421
 ASMCMD> exit
 
[oracle@node1 ~]$ export ORACLE_SID=oradb
 [oracle@node1 ~]$ sqlplus / as sysdba                //進入資料庫
 
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Sep 16 16:38:30 2011
 Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 Connected to:
 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
 With the Partitioning, OLAP and Data Mining options
 
SQL> create pfile='/u01/oracle/product/10g/dbs/oradb.ora' from spfile;  //建立資料庫的pfile 參數檔案
 File created.
 
SQL> shutdown immediate;                                                //關閉資料庫
 ORA-01507: database not mounted
 ORACLE instance shut down.
 SQL> exit

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.