DB2 設定歸檔模式

fjzcau發表於2015-03-06

1)設定迴圈歸檔模式
# db2 "update db cfg using LOGARCHMETH1 DISK:/home/db2inst1/archivelog";


2)連線報錯
# db2 connect to sample

SQL1116N  A connection to or activation of database "SAMPLE" cannot be made
because of BACKUP PENDING.  SQLSTATE=57019

3)離線備份    
 # db2 backup db  sample to "/disk2/db2_data/"

Backup successful. The timestamp for this backup image is : 20130722050810

4)再次連線 成功
# db2 connect to sample

   Database Connection Information

Database server        = DB2/LINUXX8664 9.7.0
SQL authorization ID   = DB2INST1
Local database alias   = SAMPLE


引數 FAILARCHPATH 故障轉移日誌歸檔路徑,當 LOGARCHMETH1 指定的歸檔路徑無效時,歸檔到 FAILARCHPATH 指定的路徑。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22661144/viewspace-1450993/,如需轉載,請註明出處,否則將追究法律責任。

相關文章