DB2数据库备份测试的操作步骤

数据库
今天主要向大家描述的是实现DB2数据库备份测试的操作步骤,以及对其在实际操作中要用到的实际操作代码的描述。

以下的文章主要描述的是DB2数据库备份测试的操作步骤,以及在其实际操作中的值得大家注意的事项与其代码的描述,以下就是文章的主要内容的详细描述,望大家在浏览之后会对其有更深的了解。

开始备份【实例讲解】

DB2, DB2备份

 

1、做一个在线全备操作:

 

[db2inst1@db2 ~]$ db2 backup db sample online to /tmp/db2inst1/sample/off_back include logs  
Backup successful. The timestamp for this backup image is : 20090917061921 
  • 1.
  • 2.

2、创建一个表,并插入数据:

 

db2 => connect to sample  
Database Connection Information  
Database server 
DB2/LINUX 9.1.3  
SQL authorization ID 
DB2INST1 
Local database alias 
SAMPLE 
db2 => insert into sales1 select * from sales  
DB20000I  
The SQL command completed successfully.  
db2 => insert into sales1 select * from sales1  
DB20000I  
The SQL command completed successfully.  
db2 => insert into sales1 select * from sales1  
DB20000I  
The SQL command completed successfully  
db2 => select * from sales1  
SALES_DATE SALES_PERSON  
REGION  
SALES  
12/31/2005 LUCCHESSI  
Ontario-South  
1  
12/31/2005 LEE  
Ontario-South  
3  
12/31/2005 LEE  
Quebec  
1  
12/31/2005 LEE  
Manitoba  
2  
12/31/2005 GOUNOT  
Quebec  
1  
03/29/2006 LUCCHESSI  
Ontario-South  
3  
03/29/2006 LUCCHESSI  
Quebec  
。。。。。。。。。。。  
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.

3、做增量DB2数据库备份:

[db2inst1@db2 ~]$ db2 backup db sample online incremental to /tmp/db2inst1/sample/off_back include logs  
Backup successful. The timestamp for this backup image is : 20090917062532 
  • 1.
  • 2.

4、删除表操作:

 

[db2inst1@db2 off_back]$ db2stop force  
09/17/2009 06:26:47  
0  
0  
SQL1064N  
DB2STOP processing was successful.  
SQL1064N  
DB2STOP processing was successful.  
[db2inst1@db2 off_back]$ db2start  
09/17/2009 06:26:57  
0  
0  
SQL1063N  
DB2START processing was successful.  
SQL1063N  
DB2START processing was successful.  
db2 => connect to sample  
Database Connection Information  
Database server 
DB2/LINUX 9.1.3  
SQL authorization ID 
DB2INST1 
Local database alias 
SAMPLE 
db2 => drop table sales1  
DB20000I  
The SQL command completed successfully.  
db2 => select * from sales1  
SQL0204N  
"DB2INST1.SALES1" is an undefined name.  
SQLSTATE=42704 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.

以上的相关内容就是对DB2数据库备份测试的介绍,望你能有所收获。

【编辑推荐】

  1. 初学者必看的DB2数据库的一些经验总结
  2. 对DB2日志设置参数正确用法的描述
  3. DB2 9打开打开通往 XML 之门的钥匙
  4. DB2 Cube View元数据桥的正确构建方案
  5. DB2数据库和PostgreSQL在开发的异同点有哪些?

     

     

 

责任编辑:佚名 来源: 环球企业家
相关推荐

2010-08-12 09:49:51

优化DB2数据库备份

2010-08-12 09:06:30

DB2数据库自动备份

2010-08-12 17:14:25

DB2备份恢复数据库步

2010-08-12 10:54:21

IBM DB2数据库

2010-08-31 13:06:49

DB2数据库

2010-08-09 16:46:05

DB2备份

2010-08-03 13:56:11

DB2表复制

2010-08-17 09:55:33

DB2备份测试

2010-08-17 16:04:29

DB2数据库

2010-08-12 15:38:36

DB2数据库

2010-08-03 09:32:19

DB2在线备份

2010-08-12 09:33:30

DB2数据库备份

2010-08-02 16:31:42

DB2数据库备份

2010-08-17 15:06:50

DB2 多分区数据库备

2011-05-13 09:59:14

DB2数据库备份

2011-05-16 14:42:12

DB2数据库实用操作

2010-08-03 09:25:02

DB2数据库离线

2010-08-03 09:49:58

DB2恢复数据库

2010-08-26 16:00:31

DB2数据库安装

2010-08-17 13:19:39

DB2数据库备份
点赞
收藏

51CTO技术栈公众号