Oracle Database 控制檔案管理

來源:互聯網
上載者:User

標籤:more   Fix   UI   mount   移動   control   ash   des   val   

移動控制檔案

[[email protected] ~]$ sqlplus / as sysdbaSQL> set line 200SQL> col name for a60SQL> select status,name from v$controlfile;STATUS                NAME--------------------- ------------------------------------------------------------                      /u01/app/oracle/oradata/king/control01.ctl                      /u01/app/oracle/flash_recovery_area/king/control02.ctl


SQL> alter system set control_files='/u01/app/oracle/oradata/king/control01.ctl','/u02/app/oracle/oradata/king/control02.ctl' scope=spfile;


SQL> shutdown immediate                                Database closed.Database dismounted.ORACLE instance shut down.SQL> quit


[[email protected] ~]$ cp /u01/app/oracle/oradata/king/control01.ctl /u02/app/oracle/oradata/king/control02.ctl


[[email protected] ~]$ sqlplus / as sysdbaSQL> startupORACLE instance started.Total System Global Area 1068937216 bytesFixed Size                  2220200 bytesVariable Size             289410904 bytesDatabase Buffers          771751936 bytesRedo Buffers                5554176 bytesDatabase mounted.Database opened.


SQL> set line 200SQL> col name for a60SQL> select status,name from v$controlfile;STATUS                NAME--------------------- ------------------------------------------------------------                      /u01/app/oracle/oradata/king/control01.ctl                      /u02/app/oracle/oradata/king/control02.ctl


SQL> host rm -rf /u01/app/oracle/flash_recovery_area/king/control02.ctl


重建控制檔案

SQL> show parameter user_dump_destNAME                                 TYPE                              VALUE------------------------------------ --------------------------------- ------------------------------user_dump_dest                       string                            /u01/app/oracle/diag/rdbms/kin                                                                       g/king/trace                                                                       SQL> alter session set tracefile_identifier='trace_control';SQL> alter database backup controlfile to trace;[[email protected] ~]$ cd /u01/app/oracle/diag/rdbms/king/king/trace[[email protected] trace]$ more king_ora_20316_trace_control.trc


SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> host rm -rf /u01/app/oracle/oradata/king/control01.ctlSQL> host rm -rf /u01/app/oracle/oradata/king/control02.ctl


SQL> startup nomountORACLE instance started.Total System Global Area 1068937216 bytesFixed Size                  2220200 bytesVariable Size             289410904 bytesDatabase Buffers          771751936 bytesRedo Buffers                5554176 bytesSQL> CREATE CONTROLFILE REUSE DATABASE "KING" NORESETLOGS  ARCHIVELOG        MAXLOGFILES 16        MAXLOGMEMBERS 3        MAXDATAFILES 100        MAXINSTANCES 8        MAXLOGHISTORY 292    LOGFILE      GROUP 1 '/u01/app/oracle/oradata/king/redo01.log'  SIZE 50M BLOCKSIZE 512,      GROUP 2 '/u01/app/oracle/oradata/king/redo02.log'  SIZE 50M BLOCKSIZE 512,      GROUP 3 '/u01/app/oracle/oradata/king/redo03.log'  SIZE 50M BLOCKSIZE 512    -- STANDBY LOGFILE    DATAFILE       '/u01/app/oracle/oradata/king/system01.dbf',       '/u01/app/oracle/oradata/king/sysaux01.dbf',       '/u01/app/oracle/oradata/king/users01.dbf',       '/u01/app/oracle/oradata/king/tpcc01.dbf',       '/u01/app/oracle/oradata/king/tpcc02.dbf',       '/u01/app/oracle/oradata/king/undotbs02.dbf'     CHARACTER SET AL32UTF8;     SQL> shutdown immediateORA-01109: database not openDatabase dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 1068937216 bytesFixed Size                  2220200 bytesVariable Size             289410904 bytesDatabase Buffers          771751936 bytesRedo Buffers                5554176 bytesDatabase mounted.Database opened.


Oracle Database 控制檔案管理

聯繫我們

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