oracle shutdown immediate


  1. 關閉監聽
    lsnrctl stop
    對應的LOCAL=NO的進程確認是否需要KILL。
    ps -ef|grep LOCAL=NO|wc -l
    ps -ef|grep LOCAL=NO
  2. 查看有沒有JOB--如有需要確認是否可停掉
    ps -ef|grep ora_j
  3. 查看有沒有事務還未提交的--如有事務未提交確認是否需要等待事務完成
    sqlplus '/ as sysdba'
    select status,instance_name,to_char(startup_time,'yyyy/mm/dd hh24:mi:ss') starttime from gv$instance;
    select open_mode,name from v$database;
  4. 是否有大的查詢在進行
    select count(*) from v$transaction;
    select count(*) from v$session_longops where time_remaining>0;
  5. 是否有大的事務在進行
    select sum(used_ublk) from v$transaction;   ---如果有大量返回,參考本文最後
    select START_TIME,STATUS from v$transaction;
  6. 是否有大事務正在回滾/需要在數據庫OPEN時進行實例恢復
    select * from v$fast_start_transactions;
    select * from v$fast_start_servers;
  7. 手動做幾次檢查點
    alter system checkpoint;
  8. 手動切日誌
    alter system switch logfile;
  9. 關機-此時關機速度會正常,有效減少HANG住之類問題。
    shutdown immediate
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章