Oracle資料庫的十種重新啟動步驟

來源:互聯網
上載者:User

  本文詳細的介紹了Oracle資料庫較好的十種重新啟動步驟。

  1. 停應用程式層的各種程式。

  2. 停oralce的監聽進程:

  $lsnrctl stop

  3. 在獨佔的系統使用者下,備份控制檔案:

  SQL>alter database backup controlfile to trace;

  4. 在獨佔的系統使用者下,手工切換重作記錄檔,確保當前已修改過的資料存入檔案:

  SQL>alter system switch logfile;

  5. 在獨佔的系統使用者下,運行下面SQL語句,產生殺資料庫使用者串連的kill_all_session.sql檔案:

  set head off;

  set feedback off;

  set newpage none;

  spool /oracle_backup/bin/kill_all_session.sql

  select 'alter system kill session '''||sid||',

  '||serial#||''';' from v$session where username is not null;

  spool off;

  6. 在獨佔的系統使用者下,執行殺資料庫使用者串連的kill_all_session.sql檔案:

  SQL>@/oracle_backup/bin/kill_all_session.sql

  7. 在獨佔的系統使用者下,用immediate方式關閉資料庫:

  SQL>shutdown immediate;

  或者

  SVRMGRL>shutdown immediate;

  8. 啟動oralce的監聽進程:

  $lsnrctl start

  9. 進入獨佔的系統使用者下,啟動oralce資料庫:

  $sqlplus /nolog

  SQL>connect / as sysdba

  SQL>startup;

  或者:

  $svrmgrl

  SVRMGRL>connect internal;

  SVRMGRL>startup;

 

  10.啟動應用程式層的各種程式。

聯繫我們

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