由于在本机上作的,我还必须手工删除数据库和相关设备
1> drop database test
2> go
1> sp_dropdevice test_dat
2> go
Device dropped.
(return status = 0)
1> sp_dropdevice log_dat
2> go
Device dropped.
(return status = 0)
$ rm test.dat log.dat
5.
$ cp log.dat.bak log.dat
$ cp test.dat.bak test.dat
1> mount database all from "d:\sybase\data\test.manifest"
2> go
Started estimating recovery log boundaries for database 'test'.
Completed estimating recovery log boundaries for database 'test'.
Database 'test' is in QUIESCE DATABASE state. It will recovered as for LOAD
DATABASE and left off line.
Started ANALYSIS pass for database 'test'.
Completed ANALYSIS pass for database 'test'.
Started REDO pass for database 'test'. The total number of log records to
process is 53.
Redo pass of recovery has processed 7 committed and 0 aborted transactions.
Completed REDO pass for database 'test'.
MOUNT DATABASE: Completed recovery of mounted database 'test'.
6.
1>online database test
2>go
Started estimating recovery log boundaries for database 'test'.
Completed estimating recovery log boundaries for database 'test'.
Started ANALYSIS pass for database 'test'.
Completed ANALYSIS pass for database 'test'.
Recovery of database 'test' will undo incomplete nested top actions.
Database 'test' is now online.
2. 真正的mount前,可以preview一下设备的对应关系
1> mount database all from 'd:\sybase\data\test.manifest' with listonly
2> go
'd:\sybase\data\test.dat' = 'test_dat'
'd:\sybase\data\log.dat' = 'log_dat'
4. 设备的更名
如果目标ASE上某个物理设备(分区或文件系统)名已经被使用,你还可以改变
设备的对应关系
mount database all from 'd:\sybase\data\test.manifest' using 'd:\sybase\data\testnew.dat' = 'test_dat'