db2 backup 及 restore

2011-06-21 18:12:20|  分类: AIX |举报 |字号 订阅

 
 

两个问题:

db2=>list applications

db2=>db2stop force

db2=>db2start

db2=> backup db bbbank (use tsm)

如果报错的话,可以不要后边的use tsm选项

我这里出现了这种情况,舍弃掉tsm 就好了

1)SQL0970N  The system attempted to write to a read-only file.  SQLSTATE=55009

时间紧迫,也来不及仔细调查是哪个路径的权限不对。

直接以root用户,对dev,home,opt,usr,tmp,var

(强烈不推荐这个人说的直接修改,这种无差别的操作导致的问题,需要你重装操作系统才能解决。

在DB2的操作过程中,需要DB2来进行操作的文件传输,比如用SSH往LINUX服务器硬盘里面拖动拷贝的时候,尽量在

db2inst1的用户下来进行。

chmod 775 *

2)

db2 => RESTORE DATABASE BBBANK FROM '/home/webext/backup' TAKEN AT 20110620175219 INTO BBBANK REDIRECT WITHOUT ROLLING FORWARD
SQL2523W  Warning!  Restoring to an existing database that is different from 
the database on the backup image, but have matching names. The target database 
will be overwritten by the backup version.  The Roll-forward recovery logs 
associated with the target database will be deleted.
Do you want to continue ? (y/n) y
SQL1277W  A redirected restore operation is being performed.  Table space 
configuration can now be viewed and table spaces that do not use automatic 
storage can have their containers reconfigured.
DB20000I  The RESTORE DATABASE command completed successfully.

报错:SQL2538N  Unexpected End of File of Backup Image

解决:文件上传时,选择ASCII方式

不晓得他为什么要选择ASCII方式,我这里就是采取默认的方式Binary。然后也成功了,

ASCII传输貌似比较慢。

db2 => set tablespace containers for 0 using (path '/home/webext/tbs')
SQL20319N  The SET TABLESPACE CONTAINERS command is not allowed on an 
automatic storage table space.  SQLSTATE=55061
db2 => restore database bbbank continue
DB20000I  The RESTORE DATABASE command completed successfully.

参照以下:

A)如果是用原来的备份文件取创建一个新的数据库,要用direct

我并没有用direct,并且我的DB2只有用户db2inst1,并没有建立database,然而也成功了。

B)restore db AAA from /db2_backup taken at 20070617020002 into cisfedb redirect
C) set tablespace containers for 0 using (path 'your path')
...
set tablespace containers for n using (path 'your path')
这个n根据你数据库表空间的个数来定
4)restore db AAA continue

转:db2 backup 及 restore的更多相关文章

  1. db2 backup export

    备份命令: db2 backup db test to /db2data/ 监控备份进度: db2 list utilities show detail <-进度 检测备份文件的有效性: db2 ...

  2. TFS Express backup and restore

    When we setup source control server, we should always make a backup and restore plan for it. This ar ...

  3. 第一章、关于SQL Server数据库的备份和还原(sp_addumpdevice、backup、Restore)

    在sql server数据库中,备份和还原都只能在服务器上进行,备份的数据文件在服务器上,还原的数据文件也只能在服务器上,当在非服务器的机器上启动sql server客户端的时候,也可以通过该客户端来 ...

  4. [转]Configure Network Drive Visible for SQL Server During Backup and Restore Using SSMS

    本文转自:https://mytechmantra.com/LearnSQLServer/Configure-Network-Drive-Visible-for-SQL-Server-During-B ...

  5. Backup and restore of FAST Search for SharePoint 2010

    一个同事问我一个问题: 如果FAST Search for SharePoint 2010被full restore到了一个之前的时间点, 那么当FAST Search重新开始一个增量爬网的时候, 会 ...

  6. SQL Server Database Backup and Restore in C#

    SQL Server Database Backup and Restore in C# Syed Noman Ali Shah,                          7 Feb 201 ...

  7. csharp: SQL Server 2005 Database Backup and Restore using C#

    1.第一种方式: using SQLDMO;//Microsoft SQLDMO Object Library 8.0 /// <summary> /// 数据库的备份 /// 涂聚文注: ...

  8. Experience on Namenode backup and restore --- checkpoint

    Hadoop version: Hadoop 2.2.0.2.0.6.0-0009 Well, We can do this by building Secondary Namenode, Check ...

  9. Backup and Restore MySQL Database using mysqlhotcopy

    mysqlhotcopy is a perl script that comes with MySQL installation. This locks the table, flush the ta ...

随机推荐

  1. Deep Learning In NLP 神经网络与词向量

    0. 词向量是什么 自然语言理解的问题要转化为机器学习的问题,第一步肯定是要找一种方法把这些符号数学化. NLP 中最直观,也是到目前为止最常用的词表示方法是 One-hot Representati ...

  2. VS2013项目配置directx11

    假定你已经安装好了direct11 SDK(官方下的既是最新版本)和VS2013,并在VS2013中建立了一个新工程. 用VS2013打开工程后,点击右键属性,选择VC++目录: 其中在包含目录中添加 ...

  3. 后台获取不规则排列RadioButton组的值

    获取多个RadioButton的值,我们一般会使用服务器控件RadioButtonList: <asp:RadioButtonList ID="rbl" runat=&quo ...

  4. 初识VBS

    做了测试快一年了吧,迫于无奈,要学习自动化的只是,首先想到了QTP,但是QTP的脚本是VBS,所以必须要会VBS. VBS其实就是一门计算机编程语言,但是缺少计算机程序语言中的部分要素,对于事件的描述 ...

  5. python解无忧公主数学题108

    """ python解无忧公主数学题108回文.py 题目来源: http://mp.weixin.qq.com/s?__biz=MzI5ODEwMDQyNw==& ...

  6. xcode 5.0 以上去掉icon高亮方法&iOS5白图标问题

    之前的建议方法是把在xxx.info.plist文件中把 icon already includes gloss and bevel effects 设置YES 在Xcode5下,反复实现不成功,今天 ...

  7. 创建MySQL数据库和表(一)

    一.启动MySQL服务 1.在Windows操作系统的“服务”中启动,找到你安装MySQL的起的服务名称,我本机服务名的是MySQL. 2.在命令行中用命令启动: A.启动MySQL服务:net st ...

  8. PAT 06-2 字符串字母大小写转换

    没什么好说的,记得使用ctype.h就好了,谭浩强那本书就介绍了,再不使用就太对不起他老人家了:有一点小小的地方需要注意一下,&&的优先级比=号高,所以getchar()两边没有括号的 ...

  9. Ubuntu 14.10 下安装Ganglia监控集群

    关于 Ganglia 软件,Ganglia是一个跨平台可扩展的,高性能计算系统下的分布式监控系统,如集群和网格.它是基于分层设计,它使用广泛的技术,如XML数据代表,便携数据传输,RRDtool用于数 ...

  10. openstack 中 log模块分析

    1 . 所在模块,一般在openstack/common/log.py,其实最主要的还是调用了python中的logging模块: 入口函数在 def setup(product_name, vers ...