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

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

在微山等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、网站设计、外贸营销网站建设 网站设计制作按需网站策划,公司网站建设,企业网站建设,品牌网站设计,网络营销推广,成都外贸网站建设公司,微山网站建设费用合理。

开始备份【实例讲解】

DB2, DB2备份

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

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

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

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

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

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

4、删除表操作:

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

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

【编辑推荐】

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

     

网页名称:DB2数据库备份测试的操作步骤
本文来源:http://www.shufengxianlan.com/qtweb/news16/6916.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联