浅谈Sybase的备份与恢复及常见问题解决

 1.1 备份

    首先说一下备份.

    备份的命令是

    dump database 数据库名字 to 路径.

   我们先用命令连接sybase

   isql -U sa -P -S 192.168.1.45:5000

    然后我们输入,却出现了一个一个问题

 
C:/Documents and Settings/Piggy>isql -U sa -P -S 192.168.1.45:5000 
1> Dump database test to 'c:test.dump' 
2> go 
Msg 7205, Level 17, State 2: 
Server 'STANDWINXP', Line 1: 
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE 
boot directory. 
Msg 7205, Level 18, State 3: 
Server 'STANDWINXP', Line 1: 
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE 
boot directory. 
1> 

被告知不能打开SYB_BACKUP的链接.此时不能进行备份操作.现在就来解决这个问题.

,我们要把这里写成STANDWINXP_BS.  然后重启服务器.并且对应的服务必须开启否则会失败.

然后重新备份.

C:/Documents and Settings/Piggy>isql -U sa -P -S 192.168.1.45:5000 
1> use test 
2> go 
1> dump database test to "c:test.dmp" 
2> go 
Backup Server session id is:  12.  Use this value when executing the 
'sp_volchanged' system stored procedure after fulfilling any volume change 
request from the Backup Server. 
Backup Server: 6.28.1.1: Dumpfile name 'test1020907F4A   ' section number 1 
mounted on disk file 'c:test.dmp' 
Backup Server: 4.188.1.1: Database test: 1404 kilobytes (39%) DUMPED. 
Backup Server: 4.188.1.1: Database test: 1726 kilobytes (100%) DUMPED. 
Backup Server: 3.43.1.1: Dump phase number 1 completed. 
Backup Server: 3.43.1.1: Dump phase number 2 completed. 
Backup Server: 3.43.1.1: Dump phase number 3 completed. 
Backup Server: 4.188.1.1: Database test: 1740 kilobytes (100%) DUMPED. 
Backup Server: 3.42.1.1: DUMP is complete (database test). 

 

此时就已经成功了.

 

 

  1.2 恢复

 

   恢复用此命令

   load database JbpmTAStandard from 'c:/JbpmTAStandard.dump'


   恢复后要用命令激活一下:


  isql>online database 数据库名字
  isql>go
 

猜你喜欢

转载自gwm.iteye.com/blog/2054558
今日推荐