码迷,mamicode.com
首页 > 数据库 > 详细

DB2同平台迁移数据库

时间:2019-06-27 14:52:58      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:type   bsp   ESS   get   cli   log   str   targe   data   

[appinst@dbsvr1 bakdata]$ db2 backup db EATH online to /tmp/bakdata/ include logs without prompting

Backup successful. The timestamp for this backup image is : 20190611173438

 db2pd -db EATH -tab
Address            TspId ContainNum Type    TotalPgs   UseablePgs PathID     StripeSet  Container 
0x00007F4C860A74A0 0     0          File    32768      32764      0          0          /data/database/appinst/NODE0000/EATH/T0000000/C0000000.CAT
0x00007F4C860A8BC0 1     0          Path    1          1          0          0          /data/database/appinst/NODE0000/EATH/T0000001/C0000000.TMP
0x00007F4C860AC360 2     0          File    49152      49120      0          0          /data/database/appinst/NODE0000/EATH/T0000002/C0000000.LRG
0x00007F4C860ADAE0 3     0          File    8192       8188       0          0          /data/database/appinst/NODE0000/EATH/T0000003/C0000000.LRG
0x00007F4C860AF260 4     0          File    1024       992        0          0          /data/database/appinst/NODE0000/EATH/T0000004/C0000000.LRG
0x00007F4C860B09E0 5     0          File    16384      16368      0          0          /data/database/appinst/NODE0000/EATH/T0000005/C0000000.USR
0x00007F4C860B2100 6     0          Path    1          1          0          0          /data/database/appinst/NODE0000/EATH/T0000006/C0000000.UTM





db2ckbkp -h  EATH.0.appinst.NODE0000.CATN0000.20190611173438.001 | more  

db2 create db EATZ using codeset GBK territory CN

--从EATH恢复到EATZ
mkdir /data/EATZ
[appinst@reportsvr ~]$ db2 create db EATZ using codeset GBK territory CN
DB20000I  The CREATE DATABASE command completed successfully.

[appinst@reportsvr ~]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.9

You can issue database manager commands and SQL statements from the command 
prompt. For example:
    db2 => connect to sample
    db2 => bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG          for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside 
interactive mode, all commands must be prEAixed with db2.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, rEAer to the Online REAerence Manual.

db2 => connect to EATZ

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.9
 SQL authorization ID   = APPINST
 Local database alias   = EATZ


RESTORE DATABASE EATH FROM /tmp/bakdata taken at 20190611173438 on /data/EATZ INTO EATZ LOGTARGET /tmp/bakdata
 
 
 db2pd -util
 
ROLLFORWARD db EATZ TO END OF LOGS AND COMPLETE OVERFLOW LOG PATH (/tmp/bakdata) 
 
 
 

 

DB2同平台迁移数据库

标签:type   bsp   ESS   get   cli   log   str   targe   data   

原文地址:https://www.cnblogs.com/houzhiqing/p/11096854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!