2017 ANPM

  • 38
  • 0
  • 2017-12-17

小小工程師 第一次Oracle開關機

2017/12/06 今天年度歲修,原先看工作分配為廠商作業,沒想到問一下老闆該由誰做,他竟然說 反正你有寫SOP就你做沒關係,反正廠商在旁邊嘛,突然晴天霹靂好險前幾天SOP有認真寫有認真想,

  1. 停Oracle crontab
  2. 停Root crontab
  3. 關A DB (single node)
    1. Stops a database, its instances, and its services. When the database later restarts, services with AUTOMATIC management start automatically but services with MANUAL management policy must be started manually.
      srvctl stop database -d xxx
  4. 關B DB(RAC)
    1. Stops a database, its instances, and its services. When the database later restarts, services with AUTOMATIC management start automatically but services with MANUAL management policy must be started manually.
      srvctl stop database -d xxxxx
    2.  
  5. OGG停光 結果有個table 我只alter了其中一台 另一台忘了改 起了OGG後抄不過去 才發現我一台RPTDB沒有改 超蠢的
    1. 此次要變更一個已經在抄寫的Table增加欄位
    2. 確認沒有資料進來
    3. Alter Table
    4. Add trandata
    5. Delete trandata
    6. Get current_scn for expdp use
      expdp id/pwd@xxxdatabase TABLES=xxxTable dumpfile=expdp.dmp DIRECTORY=DATA_DUMP_DIR;
      SELECT current_scn FROM V$DATABASE;
    7. Target Server Init data
      impdp targetid/targetpwd DIRECTORY=DATA_DUMP_DIR DUMPFILE=tablespace.dmp TABLESPACES=example;
    8. Replication start after SCN
    9.  
  6. 修理bash shell 避免orachk無法執行 但還是有遇到
  7.  

1.