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

DB2在線備份,以及重定向恢復(fù)實(shí)戰(zhàn)演習(xí)!

數(shù)據(jù)庫
我們今天主要向大家描述的是DB2在線備份,以及重定向恢復(fù)的實(shí)際操作步驟,以及對其在實(shí)際操作中經(jīng)常要遇到的問題的破解。

以下的文章主要向大家描述的是DB2在線備份,以及重定向恢復(fù)的實(shí)際操作步驟,相信如果你掌握了DB2在線備份,以及重定向恢復(fù)的實(shí)際操作步驟,會(huì)在以后的學(xué)習(xí)或是工作中帶來很大的幫助。

目標(biāo):在數(shù)據(jù)庫服務(wù)器上備份,然后將這個(gè)備份重定向恢復(fù)到本機(jī)數(shù)據(jù)庫上。

1.先在數(shù)據(jù)庫服務(wù)器上執(zhí)行如下命令進(jìn)行全盤DB2在線備份(包括日志) (db2 ? backup可以查看backup幫助信息)

 

  1. db2 backup db wdcs online to E:\Allan include logs 時(shí)間戳為20100420093345 


然后將該備份映像拷貝至本機(jī)的C:\temp路徑下

2.在數(shù)據(jù)庫服務(wù)器上執(zhí)行如下命令查看當(dāng)前數(shù)據(jù)庫表空間情況

 

  1. db2 list tablespaces show detail 

3.在本地為原數(shù)據(jù)庫創(chuàng)建相應(yīng)的表空間容器。進(jìn)入cmd窗口執(zhí)行一下命令:

 

  1. mkdir C:\DB2 \NODE0000\wdcs\syscatspace C:\DB2 \NODE0000\wdcs\indexspace1   
  2. C:\DB2 \NODE0000\wdcs\systoolspace C:\DB2 \NODE0000\wdcs\systoolstmpspace  
  3. C:\DB2 \NODE0000\wdcs\tablespace1 C:\DB2 \NODE0000\wdcs\tempspace1 C:\DB2 \NODE0000\wdcs\userspace1  

 

4.在本地創(chuàng)建一個(gè)跟數(shù)據(jù)庫服務(wù)器上同名的空數(shù)據(jù)庫wdcs: create db wdcs

5.開始本機(jī)上執(zhí)行數(shù)據(jù)庫恢復(fù)命令(將日志指定存放的路徑為:

 

  1. C:\db2workspace\wdcs_log)  
  2. db2 restore db wdcs from c:\temp taken at 20100420093345 into wdcs logtarget c:\db2workspace\wdcs_log redirect  

 

此時(shí)會(huì)提示要求指定存儲(chǔ)容器路徑

6.要恢復(fù)的本地?cái)?shù)據(jù)庫表空間指定容器,執(zhí)行下列命令 ( 其中的數(shù)字:0,1,2,3,4,5,6,7,8是源數(shù)據(jù)庫的表空間標(biāo)識,path后面的路徑就是上面第3步建的路徑,標(biāo)識號和路徑一一對應(yīng) ,最后的file "c:\db2workspace\wdcscontainer\dms.dat" 50000;file "c:\db2workspace\wdcscontainer\index.dat" 50000 是重新建立DB2在線備份管理類型的表空間容器)

 

  1. db2 set tablespace containers for 0 using (path "c:\DB2\node0000\wdcs\syscatspace")  
  2. db2 set tablespace containers for 1 using (path "c:\DB2\node0000\wdcs\tempspace1")  
  3. db2 set tablespace containers for 2 using (path "c:\DB2\node0000\wdcs\userspace1")  
  4. db2 set tablespace containers for 3 using (path "c:\DB2\node0000\wdcs\systoolspace")  
  5. db2 set tablespace containers for 4 using (path "c:\DB2\node0000\wdcs\tablespace1")  
  6. db2 set tablespace containers for 5 using (path "c:\DB2\node0000\wdcs\indexspace1")  
  7. db2 set tablespace containers for 6 using (path "c:\DB2\node0000\wdcs\systoolstmpspace")  
  8. db2 set tablespace containers for 7 using (file "c:\db2workspace\wdcscontainer\dms.dat" 50000)  
  9. db2 set tablespace containers for 8 using (file "c:\db2workspace\wdcscontainer\index.dat" 50000) 

7.然后繼續(xù)執(zhí)行恢復(fù):

 

  1. db2 restore db wdcs continue 

8. 最后要執(zhí)行前滾命:


 

  1. db2 rollforward db wdcs to end of logs and stop overflow log path (C:\db2workspace\wdcs_log)  

以上的相關(guān)內(nèi)容就是對DB2在線備份,重定向恢復(fù)的介紹,望你能有所收獲。

【編輯推薦】

  1. 揭秘DB2 9數(shù)據(jù)庫需要的內(nèi)存與磁盤條件!
  2. 手動(dòng)安裝DB2數(shù)據(jù)庫的實(shí)現(xiàn)在UNIX操作環(huán)境下
  3. DB2數(shù)據(jù)庫備份參數(shù)修改后報(bào)錯(cuò)如何拯救?
  4. DB2 V9.7啟用索引壓縮大揭秘
  5. import 或是 load多個(gè)DB2主從表談何容易?
     
責(zé)任編輯:佚名 來源: 計(jì)算機(jī)產(chǎn)品與流通
相關(guān)推薦

2010-08-06 13:26:29

DB2建立databa

2010-08-12 15:16:50

DB2在線備份

2010-08-17 14:15:11

DB2重定向恢復(fù)失敗

2015-10-29 15:06:36

DB2重定向恢復(fù)數(shù)據(jù)

2010-08-12 11:38:21

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

2010-08-03 16:54:10

DB2 9.5

2010-08-17 14:55:33

DB2離線

2010-09-06 16:02:00

DB2

2011-03-25 15:12:42

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

2010-07-22 14:59:24

SQL Server

2010-08-06 09:25:19

重定向恢復(fù)DB2

2010-08-04 13:15:21

2010-08-06 09:07:15

DB2線增量備份

2010-08-20 14:31:32

復(fù)制DB2數(shù)據(jù)庫

2010-08-05 15:32:44

重定向恢復(fù)DB2數(shù)據(jù)庫

2010-11-03 14:10:23

DB2在線備份

2010-09-06 09:37:06

DB2用戶密碼修改

2021-08-02 19:39:51

網(wǎng)絡(luò)測試路由器

2010-08-12 09:18:48

DB2用戶密碼修改

2011-05-11 13:01:07

DB2數(shù)據(jù)恢復(fù)數(shù)據(jù)備份
點(diǎn)贊
收藏

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