
運(yùn)行結(jié)果如下:
successfully detached database 'mytest1'.
dbcc execution completed. if dbcc printed error messages, contact your system administrator.
(3) 在操作系統(tǒng)的文件夾窗口中用剪切或粘貼的方式直接將與數(shù)據(jù)庫相關(guān)的操作系統(tǒng)文件移動(dòng)到e:/ sql data 2000 server 目錄下。即將d:/sql data/mytest_data.mdf 文件和d:/sqldata/mytest_log.ldf 文件移到e:/ sql data 2000
(4) 在sql server query analyzer 中運(yùn)行sp_attach_db 系統(tǒng)存儲(chǔ)過程,附加文件到mytest 數(shù)據(jù)庫。命令語句如下:
exec sp_attach_db @dbname = 'mytest',
@filename1 = 'e:/sql data/mytest_data.mdf',
@filename2 = 'e:/sql data/mytest_log.ldf'
運(yùn)行結(jié)果如下:
successfully attached database 'mytest'.
至此已完成了數(shù)據(jù)庫的移動(dòng)工作,可在enterprise manager 中查看mytest 數(shù)據(jù)庫的信息,也可以在sql server query analyzer 中運(yùn)行系統(tǒng)存儲(chǔ)過程sp_helpdb 來查看移動(dòng)是否成功。
新聞熱點(diǎn)
疑難解答
圖片精選