偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

實(shí)現(xiàn)DB2 多分區(qū)備份要用到哪些操作項(xiàng)目?

數(shù)據(jù)庫
我們今天主要向大家講述的是實(shí)現(xiàn)DB2 多分區(qū)備份的實(shí)際操作步驟,以及對其在實(shí)際操作中要用到的操作代碼的具體描述。

以下的文章主要向大家描述的是DB2 多分區(qū)備份的實(shí)際操作步驟,以及對實(shí)現(xiàn)DB2 多分區(qū)備份的實(shí)際操作過程中我們大家要用到的相關(guān)實(shí)際操作代碼的描述,以下就是文章的主要內(nèi)容的詳細(xì)解析。

數(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,  
  8. this parameter specifies that the restore utility is to replace the existing database with the restored database.   
  9. This is useful for scripts that invoke the restore utility,   
  10. because the command line processor will not prompt the user to verify deletion of an existing database.  
  11. If the WITHOUT PROMPTING parameter is specified, it is not necessary to specify REPLACE EXISTING,   
  12. but in this case, the operation will fail if events occur that normally require user intervention.  

為對分區(qū)數(shù)據(jù)庫的所有分區(qū)進(jìn)行DB2 多分區(qū)備份操作,我們可利用 DB2_all 的作用。在語句前加上 DB2_all,并將語句引用在 "" 中,可令該語句在一個(gè)實(shí)例中的每個(gè)分區(qū)上被執(zhí)行,而無需分別對每個(gè)分區(qū)重復(fù)發(fā)出相同的命令。

BACKUP 便可通過這種方式實(shí)現(xiàn)對分區(qū)數(shù)據(jù)庫的操作,但是對于編目分區(qū)例外。由于 DB2 多分區(qū)備份或恢復(fù)時(shí)要求獨(dú)占編目分區(qū),因此在對其它分區(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)行的。

 

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

1. 無需并行操作的方式:

當(dāng)備份操作不需要使用并行方式時(shí),則不存在先對編目分區(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è)備名>"

 

即首先對編目分區(qū) - 0 號(hào)分區(qū)進(jìn)行DB2 多分區(qū)備份操作,然后再對除編目分區(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" 

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

【編輯推薦】

  1. DB2 back 存檔使用與正確維護(hù)
  2. DB2常用函數(shù)與Oracle有什么不同?
  3. 如何輕松實(shí)現(xiàn)DB2自動(dòng)增長主鍵?
  4. DB2數(shù)據(jù)類型的應(yīng)用與內(nèi)置數(shù)據(jù)類型
  5. DB2 V9.7新特征可以給你帶來哪些好處?
責(zé)任編輯:佚名 來源: 百度空間
相關(guān)推薦

2010-08-12 10:08:05

DB2日常備份腳本

2010-08-09 10:36:20

執(zhí)行DB2命令

2010-08-17 13:30:54

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

2010-08-16 13:36:11

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

2010-08-17 15:06:50

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

2010-08-18 14:44:24

JDBC連接DB2實(shí)例

2010-08-12 17:23:20

DB2存儲(chǔ)過程編寫流程

2010-08-16 15:06:15

DB2數(shù)據(jù)類型轉(zhuǎn)換

2010-08-02 17:37:06

DB2建立databa

2010-08-05 16:19:06

DB2建立數(shù)據(jù)庫分區(qū)

2010-08-11 14:19:07

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

2010-08-19 14:31:46

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

2010-11-03 14:10:23

DB2在線備份

2010-11-02 10:16:22

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

2010-08-17 11:03:01

DB2恢復(fù)誤刪除表

2010-08-17 09:48:40

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

2010-08-17 13:37:18

DB2 Online

2010-08-12 09:49:51

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

2010-08-17 09:55:33

DB2備份測試

2010-08-03 09:44:42

DB2在線增量備份
點(diǎn)贊
收藏

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