自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

DB2 Online備份的操作方案“盛宴”

數(shù)據(jù)庫(kù)
此文章主要描述的是DB2 Online備份的實(shí)際操作方案,以及對(duì)在DB2 Online備份的實(shí)際操作中的一些細(xì)節(jié)操作的具體描述。

以下的文章主要向大家講述的是DB2 Online備份的實(shí)際操作方案,文章主要是從介紹修改數(shù)據(jù)庫(kù)參數(shù)之修改數(shù)據(jù)庫(kù)online備份的相關(guān)參數(shù)開(kāi)始對(duì)其進(jìn)行說(shuō)明的,以下就是正文的主要內(nèi)容描述。

Online, 方案Online, 方案

 

改數(shù)據(jù)庫(kù)參數(shù)

 

修改數(shù)據(jù)庫(kù)online備份的參數(shù)

  1. db2 update db cfg using logretain recovery  
  2. db2 update db cfg using userexit yes  
  3. db2 update db cfg using trackmod yes  

脫機(jī)DB2 Online備份數(shù)據(jù)庫(kù)

  1. db2 terminate  
  2. db2 backup db qncenter to /home/db2inst1  

2. 修改程序

復(fù)制源程序

  1. cp /home/db2inst1/sqllib/samples/c/ db2uext2.cdisk /home/db2inst1/sqllib/adm/db2uext2.c  
  2. vi /home/db2inst1/sqllib/adm/db2uext2.c  

修改內(nèi)容

  1. define ARCHIVE_PATH "/db2log/"  
  2. define RETRIEVE_PATH "/db2log/"  
  3. define AUDIT_ACTIVE 1  
  4. define ERROR_ACTIVE 1  
  5. define AUDIT_ERROR_PATH "/db2log/"  
  6. define AUDIT_ERROR_ATTR "a"  
  7. define BUFFER_SIZE 32  

編譯

  1. cc -D_INCLUDE_POSIX_SOURCE db2uext2.c -o db2uext2 

3. 配置Archive Log 路徑

建立路徑

  1. su – root  
  2. mkdir /db2log/ QNCENTER/NODE0000  

授予該目錄結(jié)構(gòu)中的每個(gè)目錄遞歸的許可權(quán)

  1. chmod 777 /db2log 

改變屬組

  1. chown -R db2inst1:db2grp1 /db2log 

4. 設(shè)置DB2 Online備份腳本

online全備份

  1. db2 backup db qncenter online to /home/db2inst1/ >`date +%Y%m%d`.bklog 2>&1 

online增量備份

  1. db2 backup db qncenter online incremental delta to /home/db2inst1 >`date +%Y%m%d`.bklog 2>&1 

備份Archive Log

  1. tar zcvf $`date +%Y%m%d`_arc.tar.gz /db2log/CEILING 

5. 數(shù)據(jù)庫(kù)恢復(fù)方案

恢復(fù)Archive Log

tar xvf $`date +%Y%m%d`_arc.tar.gz

恢復(fù)數(shù)據(jù)庫(kù) 必須確保數(shù)據(jù)庫(kù)有一個(gè)全備份

介質(zhì)恢復(fù)

  1. db2 restore db qncenter from /home/db2inst1 taken at Timestamp 

按照Archive Log回滾

  1. db2 rollforward database qncenter to end of logs and stop 

如果是offline備份 有歸檔日志

  1. db2 restore db qncenter from /home/db2inst1 taken at Timestamp  
  2. db2 rollforward database qncenter to end of logs and stop  

offline備份

  1. db2 backup db qncenter to /home/db2inst1/ 

如果是offline備份 沒(méi)有歸檔日志

  1. db2 restore db qncenter from /home/db2inst1 taken at Timestamp without rolling forward  

上述的相關(guān)內(nèi)容就是對(duì)DB2 Online備份方案的描述,希望會(huì)給你帶來(lái)一些幫助在此方面。

【編輯推薦】

  1. 失敗DB2® access 服務(wù)器配置的正確恢復(fù)流程
  2. import 或是 load多個(gè)DB2主從表談何容易?
  3. DB2數(shù)據(jù)庫(kù)備份參數(shù)修改后報(bào)錯(cuò)如何拯救?
  4. 手動(dòng)安裝DB2數(shù)據(jù)庫(kù)的實(shí)現(xiàn)在UNIX操作環(huán)境下
  5. 揭秘DB2 9數(shù)據(jù)庫(kù)需要的內(nèi)存與磁盤條件!
責(zé)任編輯:佚名 來(lái)源: 51cto.com
相關(guān)推薦

2010-08-12 16:10:45

DB2 Online

2010-08-17 09:55:33

DB2備份測(cè)試

2010-08-09 16:46:05

DB2備份

2011-05-11 13:01:07

DB2數(shù)據(jù)恢復(fù)數(shù)據(jù)備份

2010-08-03 09:32:19

DB2在線備份

2011-07-21 09:53:37

IBMDB2

2010-11-03 14:16:29

DB2增量備份

2010-08-12 10:27:21

DB2數(shù)據(jù)庫(kù)備份

2010-11-03 14:57:44

DB2備份所有表

2010-09-01 11:17:29

DB2備份

2010-11-03 14:10:23

DB2在線備份

2010-11-02 10:07:46

DB2數(shù)據(jù)庫(kù)備份

2010-08-06 18:01:13

DB2數(shù)據(jù)備份

2010-08-05 15:17:43

DB2提高IMPORT

2010-08-06 13:45:11

DB2提高IMPORT

2010-08-12 09:59:03

DB2備份恢復(fù)

2010-09-07 15:39:52

DB2創(chuàng)建跨庫(kù)視圖

2010-08-03 13:23:47

DB2自動(dòng)增長(zhǎng)主鍵

2010-08-03 09:44:42

DB2在線增量備份

2010-11-03 14:05:58

DB2離線備份
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)