日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
DB2在線備份,以及重定向恢復(fù)實(shí)戰(zhàn)演習(xí)!

以下的文章主要向大家描述的是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)識(shí),path后面的路徑就是上面第3步建的路徑,標(biāo)識(shí)號(hào)和路徑一一對(duì)應(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)容就是對(duì)DB2在線備份,重定向恢復(fù)的介紹,望你能有所收獲。


網(wǎng)站名稱:DB2在線備份,以及重定向恢復(fù)實(shí)戰(zhàn)演習(xí)!
標(biāo)題來源:http://www.5511xx.com/article/dhcsshj.html