转:db2 backup 及 restore
两个问题:
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的更多相关文章
- db2 backup export
备份命令: db2 backup db test to /db2data/ 监控备份进度: db2 list utilities show detail <-进度 检测备份文件的有效性: db2 ...
- TFS Express backup and restore
When we setup source control server, we should always make a backup and restore plan for it. This ar ...
- 第一章、关于SQL Server数据库的备份和还原(sp_addumpdevice、backup、Restore)
在sql server数据库中,备份和还原都只能在服务器上进行,备份的数据文件在服务器上,还原的数据文件也只能在服务器上,当在非服务器的机器上启动sql server客户端的时候,也可以通过该客户端来 ...
- [转]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 ...
- Backup and restore of FAST Search for SharePoint 2010
一个同事问我一个问题: 如果FAST Search for SharePoint 2010被full restore到了一个之前的时间点, 那么当FAST Search重新开始一个增量爬网的时候, 会 ...
- SQL Server Database Backup and Restore in C#
SQL Server Database Backup and Restore in C# Syed Noman Ali Shah, 7 Feb 201 ...
- csharp: SQL Server 2005 Database Backup and Restore using C#
1.第一种方式: using SQLDMO;//Microsoft SQLDMO Object Library 8.0 /// <summary> /// 数据库的备份 /// 涂聚文注: ...
- 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 ...
- Backup and Restore MySQL Database using mysqlhotcopy
mysqlhotcopy is a perl script that comes with MySQL installation. This locks the table, flush the ta ...
随机推荐
- JQery w3school学习第一章 标签的隐藏和显示
鄙人初学JQuery,最关键的是JQuery获取标签对象的方式 这一章学习的是点击按钮让所有标签的文字以及标签栏的位置隐藏起来,因为单纯的隐藏文字,还是会有空格和空行的影响 这里最关键的代码就是 $( ...
- Quartz之主方法运行
import static org.quartz.JobBuilder.newJob; import static org.quartz.TriggerBuilder.newTrigger; impo ...
- APC to USB
from :http://www.allpinouts.org/index.php/APC_USB_cable_schematic connector or cable wiring APC part ...
- HTML5实战教程———开发一个简单漂亮的登录页面
最近看过几个基于HTML5开发的移动应用,比如臭名昭著的12036移动客户端就是主要使用HTML5来实现的,虽然还是有点反应迟钝,但已经比较流畅了,相信随着智能手机的配置越来越高性能越来越好,会越来越 ...
- swift语言之多线程操作和操作队列(下)———坚持51天吃掉大象(写技术文章)
欢迎有兴趣的朋友,参与我的美女同事发起的活动<51天吃掉大象>,该美女真的很疯狂,希望和大家一起坚持51天做一件事情,我加入这个队伍,希望坚持51天每天写一篇技术文章.关注她的微信公众号: ...
- 统计文件夹下java代码行数的小程序--主要是学习任务队列的思想
首先感谢czbk的老师,录制的视频,让我们有这么好的学习资料.……—— 统计文件夹java文件的行数,首先想到的肯定是用递归的方法,因为文件夹下面可能包含文件夹,用递归的方法,代码容易写.(这和写简单 ...
- Node.js的简介和安装
一.Node.js的简介和安装 a) 什么是Node.js? Node.js是一个开发平台 让JavaScript运行在服务器端的开发平台 ---简单点说就是用JavaScript写服务器 ...
- 监听Android CTS测试项解决方案(二)
二,监听当前测试项是否是Accelerometer Measurement Test测试项 通过第一种方式介绍的,我们可以得到当前处于活动状态的Activity类似监听CTS测试当前的测试项.但是由于 ...
- BZOJ 3450 Easy
注意细节啊... 和上一道差不多. #include<iostream> #include<cstdio> #include<cstring> #include&l ...
- BZOJ 1816 扑克牌
WA的我怀疑人生.. 发现原来是循环中间就要break掉,不然爆int. 总感觉这题可以直接构造啊.. #include<iostream> #include<cstdio> ...