天天看点

sybase下移动设备位置

Select * from sysdevices

2 在数据库中更改设备位置

use master

go

sp_configure 'allow updates to system tables',1

update sysdevices set phyname='F:\master.dat' where name='master'

update sysdevices set phyname='F:\sybprocs.dat' where name='sysprocsdev'

update sysdevices set phyname='F:\sybsysdb.dat' where name='systemdbdev'

update sysdevices set phyname='F:\log1.dat' where name='log1'

update sysdevices set phyname='F:\data1.dat' where name='data1'

update sysdevices set phyname='F:\data2.dat' where name='data2'

update sysdevices set phyname='F:\data3.dat' where name='data3'

update sysdevices set phyname='F:\data4.dat' where name='data4'

3停止sybase服务,拷贝sybase所有设备到目标磁盘

E:\data\data1.dat----->F:\data1.dat

E:\data\data2.dat----->F:\data2.dat

E:\data\data3.dat----->F:\data3.dat

E:\data\data4.dat----->F:\data4.dat

E:\data\log1.dat----->F:\log1.dat

E:\master.dat----->F:\master.dat

E:\sybprocs.dat----->F:\sybprocs.dat

E:\sybsysdb.dat----->F:\sybsysdb.dat

4更改sybase安装路径RUN_crm.bat中的-de:\master.dat---->-df:\master.dat

通过上文我们可以灵活拷贝设备来实现数据库的迁移而不惧于目录结构的限制!

本文转自 zhangxuwl 51CTO博客,原文链接:http://blog.51cto.com/jiujian/1046883,如需转载请自行联系原作者