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

對(duì)DB2 多分區(qū)數(shù)據(jù)庫備份的正確理解

數(shù)據(jù)庫
我們今天主要向大家描述的是DB2 多分區(qū)數(shù)據(jù)庫備份的實(shí)際操作步驟的描述,一季度對(duì)其在實(shí)際操作中要用到的實(shí)際操作代碼的描述。

文章主要描述的是DB2 多分區(qū)數(shù)據(jù)庫備份的實(shí)際操作步驟的描述,假如你在實(shí)際操作中遇到其操作的情況,但是你卻不知道對(duì)其如何正確的解決,那么以下的文章對(duì)你而言一定是良師益友。

數(shù)據(jù)庫, 分區(qū)數(shù)據(jù)庫, 分區(qū)

 

編目分區(qū):

 

  1. Catalog database partition number = 0 

這個(gè)就是編目分區(qū)。

 

//斷掉所有的連接。

  1. DB2 force applications all  
  2. DB2_all "<<+0<DB2 backup database sample to d:\data compress"  
  3. DB2_all "<<-0<DB2 backup database sample to d:\data compress"  
  4. DB2_all "<<+0< DB2 restore db sample from d:\data taken at 20090212141538 replace existing "  
  5. DB2_all "<<-0< DB2 restore db sample from d:\data taken at 20090212141630 replace existing"  
  6. -----replace existing  
  7. If a database with the same alias as the target database alias already exists,
    this parameter specifies that the restore utility is to replace the existing database 
    with the restored database.This is useful for scripts that invoke the restore utility,

     

     because the command line processor will not prompt the user to verify deletion of an 
    existing database.If the WITHOUT PROMPTING parameter is specified, it is not necessary to specify REPLACE EXISTING,
    but in this case, the operation will fail if events occur that normally require user intervention.  

為對(duì)分區(qū)數(shù)據(jù)庫的所有分區(qū)進(jìn)行備份操作,我們可利用 DB2_all 的作用。在語句前加上 DB2_all,并將語句引用在 "" 中,可令該語句在一個(gè)實(shí)例中的每個(gè)分區(qū)上被執(zhí)行,而無需分別對(duì)每個(gè)分區(qū)重復(fù)發(fā)出相同的命令。BACKUP 便可通過這種方式實(shí)現(xiàn)對(duì)分區(qū)數(shù)據(jù)庫的操作,但是對(duì)于編目分區(qū)例外。由于 DB2 在備份或恢復(fù)時(shí)要求獨(dú)占編目分區(qū),因此在對(duì)其它分區(qū)進(jìn)行備份操作之前,首先必須先完成該分區(qū)的備份操作。

另外,在 DB2_all 之后的 "" 語句中,我們還可以以下述方式作開頭,以指定命令所作用的分區(qū):

<<+分區(qū)號(hào)< :表示后續(xù)命令作用于該分區(qū)。

<<-分區(qū)號(hào)< :表示后續(xù)命令作用于除該分區(qū)之外的其它分區(qū)。

 

||<<-分區(qū)號(hào)< 或 <<-分區(qū)號(hào); :表示后續(xù)命令作用于除該分區(qū)之外的其它分區(qū),

 

并且是以并行方式進(jìn)行的。

 

綜上所述,對(duì)于分區(qū)數(shù)據(jù)庫的數(shù)據(jù)進(jìn)行備份操作的命令為(以編目分區(qū)號(hào)為 0 舉例):

1. 無需并行DB2 多分區(qū)數(shù)據(jù)庫備份操作的方式:

當(dāng)備份操作不需要使用并行方式時(shí),則不存在先對(duì)編目分區(qū)進(jìn)行操作的問題,此時(shí)可通過一條命令實(shí)現(xiàn)備份操作。

DB2_all "DB2 BACKUP DATABASE <數(shù)據(jù)庫別名> TO <路徑/設(shè)備名>"

2. 使用并行操作的方式:

DB2_all "<<+0< DB2 BACKUP DATABASE <數(shù)據(jù)庫別名> TO <路徑/設(shè)備名>" (windows下)

DB2_all "||<<-0< DB2 BACKUP DATABASE <數(shù)據(jù)庫別名> TO <路徑/設(shè)備名>"

 

 

DB2_all "<<-0<; DB2 BACKUP DATABASE <數(shù)據(jù)庫別名> TO <路徑/設(shè)備名>"

 

即首先對(duì)編目分區(qū) - 0 號(hào)分區(qū)進(jìn)行備份操作,然后再對(duì)除編目分區(qū)之外的其它分區(qū)同時(shí)并行操作,以縮短操作的時(shí)間,這一點(diǎn)體現(xiàn)了分區(qū)數(shù)據(jù)庫的優(yōu)越性。

  1. DB2 force applications all  
  2. DB2_all "<<+0<DB2 connect to churndb;DB2 backup database churndb to /DB2log/DB2buckup compress;DB2 terminate"  
  3. DB2_all "<<-0<DB2 connect to churndb;DB2 backup database churndb to /DB2log/DB2buckup compress;DB2 terminate" 

以上的相關(guān)內(nèi)容就是對(duì)DB2 多分區(qū)數(shù)據(jù)庫備份的介紹,望你能有所收獲。

【編輯推薦】

  1. DB2 back 存檔使用與正確維護(hù)
  2. 快速的import或是load多個(gè)DB2主從表案例描述
  3. DB2數(shù)據(jù)庫確定某個(gè)表的統(tǒng)計(jì)信息的收集時(shí)間的操作
  4. DB2手工添加數(shù)據(jù)庫的實(shí)際操作方案描述
  5. DB2常用函數(shù)與Oracle有什么不同?

 

 

責(zé)任編輯:佚名 來源: IT168
相關(guān)推薦

2010-08-04 16:41:01

2010-08-17 15:06:50

DB2 多分區(qū)數(shù)據(jù)庫備

2010-08-11 17:24:13

DB2數(shù)據(jù)庫優(yōu)化

2010-08-05 09:53:35

2010-08-18 10:04:54

DB2數(shù)據(jù)庫

2010-08-05 15:40:07

DB2快照函數(shù)

2010-07-27 15:33:00

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

2010-08-05 09:14:29

DB2隔離級(jí)別

2010-08-16 11:34:11

IBM DB2 V9.

2010-08-02 08:40:43

DB2數(shù)據(jù)庫性能

2010-11-02 10:16:22

DB2分區(qū)數(shù)據(jù)庫備份

2010-08-17 09:11:42

DB2數(shù)據(jù)庫備份性能

2010-08-02 09:03:16

DB2 admin管理

2010-08-17 15:42:30

DB2 增量備份

2010-08-11 15:04:03

DB2備份

2010-08-02 14:24:55

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

2010-08-11 12:51:12

DB2 多分區(qū)備份

2010-08-31 13:06:49

DB2數(shù)據(jù)庫

2010-08-02 10:11:51

DB2數(shù)據(jù)庫編目

2011-03-15 11:19:45

DB2數(shù)據(jù)庫catalog
點(diǎn)贊
收藏

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