Home > Database > Mysql Tutorial > DB2数据库备份还原

DB2数据库备份还原

WBOY
Release: 2016-06-07 16:46:57
Original
858 people have browsed it

如果是由DB2 9备份的,则from后面的路径写到文件的直接父目录,如果是由DB2 8备份的,则from后面的路径写到DBName.0的直接父目录

db2在线备份命令: db2 connect to DBName user userName using password db2 update db cfg for DBName using logretain on db2 force applications all db2 backup db DBName online tod:/db2bak

可以将上面4条命令写在一个bat文件中,每条命令占一行,在装有DB2数据库的机器上运行bat文件即可。

如果DB2的版本是9,备份出来的文件名称如“DBName.0.DB2.NODE0000.CATN0000.20130220171655.001”

”下的

db2还原命令: db2 restore database DBName fromD:\db2bak taken at 20130227143108 WITHOUT ROLLING FORWARD WITHOUT PROMPTING

 

taken at 20130227143108 WITHOUT ROLLING FORWARD WITHOUT PROMPTING”写入到一个bat文件中,,运行bat文件即可还原。

如果是由DB2 9备份的,则from后面的路径写到文件的直接父目录,如果是由DB2 8备份的,则from后面的路径写到DBName.0的直接父目录。

linux

Related labels:
db2
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template