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的鏈接.此時不能進行備份操作.現在就來解決這個問題.
我們先來看一下sybase目錄中的一個文件
C:/sybase/OCS-15_0/bin 下面的dsedit.exe.雙擊後看到
然後我們在看一下數據庫master對應的系統表中sysservers中
因為我這個是修改過的,如果沒有修改的話,在對應srvname為SYB_BACKUP的那條數據的srvnetname為null.也就是我們要更改這個值.
結合上面的兩個圖片,我們要把這裡寫成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
作者 cuiran