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

DB2在線備份與重定向恢復,新手不得不看!

數(shù)據(jù)庫
以下的文章主要描述的是DB2在線備份與重定向恢復,以及對其在實際操作中要用到的實際操作代碼的描述,以下就是文章的主要內(nèi)容講述。

以下的文章主要描述的DB2在線備份與重定向恢復,如果你對DB2在線備份與重定向恢復相關(guān)的實際操作有興趣的話,你就可以對以下的文章點擊觀看了,以下就是具體方案的描述,希望在你今后的學習中會有所幫助。

在線在線

 

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

 

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

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

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

 

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

  1. db2 list tablespaces show detail 

3.在本地為原數(shù)據(jù)庫創(chuàng)建相應的表空間容器。進入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)建一個跟數(shù)據(jù)庫服務器上同名的空數(shù)據(jù)庫wdcs: create db wdcs

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

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

此時會提示要求指定存儲容器路徑

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

  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í)行恢復:

  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在線備份,重定向恢復的介紹,望你能有所收獲。

 

【編輯推薦】

  1. DB2數(shù)據(jù)庫備份是否成功的驗證方案描述
  2. 初學者必看的DB2數(shù)據(jù)庫的一些經(jīng)驗總結(jié)
  3. 對DB2日志設(shè)置參數(shù)正確用法的描述
  4. 如何看待IBM DB2 9數(shù)據(jù)服務器的發(fā)展?
  5. DB2數(shù)據(jù)庫和PostgreSQL在開發(fā)的異同點有哪些?
責任編輯:佚名 來源: cnBeta.com
相關(guān)推薦

2010-08-02 11:01:29

DB2 Resotre

2010-08-18 15:01:08

DB2 9安裝方法

2010-08-18 11:36:40

DB2簡史

2010-08-17 11:35:00

2010-08-05 15:48:14

DB2強制優(yōu)化器

2010-08-19 13:36:11

DB2數(shù)據(jù)類型

2010-08-20 09:38:53

DB2 常見問題解答

2010-07-30 17:33:26

2010-08-03 08:46:23

DB2 9.5高可用性

2010-05-18 10:34:29

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

2010-08-17 14:15:11

DB2重定向恢復失敗

2010-05-21 09:40:57

MySQL出錯代碼列表

2010-05-25 09:58:43

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

2010-05-10 13:01:03

OracleDBA面試

2010-05-26 15:58:52

MySQL遠程連接

2010-08-09 15:31:03

2010-07-23 18:39:52

SQL Server游

2010-09-06 16:02:00

DB2

2010-05-26 13:14:22

MySQL錯誤解決方案

2017-05-17 14:46:22

容器DockerLinux
點贊
收藏

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