none
还原数据库报错,这是怎么回事??? RRS feed

答案

  • 或许你可以从下列两个方向来查看问题

    1 确定是否存在D:\ cemsdatabasetest目录是否存在

    2 D:\ cemsdatabasetest\ cemstestdatas.mdf已经存在勾选WITH REPLACE选项


    以上說明若有錯誤請指教,謝謝。
    歡迎參觀我的BLOG - 積沙成塔


    2012年11月7日 12:05
  • Hi,

    It says the files you're trying to restore already exist and it won't let you overwrite them. You can restore the database by using WITH MOVE clause for the affected files.  You can do this using T-SQL or by the restore wizard in SSMS.

    Through SSMS edit the pathname of files where it will restore.

    TSQL Command will be like

    RESTORE DATABASE ABC
       FROM DIsk='X:\ABC.bak'
       WITH MOVE 'ABC_Data' TO 
    'X:\Data\ABC_NewData1.mdf', 
          MOVE 'ABC_Log' 
    TO 'X:\Log\ABC_NewLog1.ldf'

    Give different name to the mdf,ndf and ldf files and try to do  a restore through query analyzer.

    Thanks,
    Amy peng


    Description: Description: TechNet 论坛好帮手立刻免费下载TechNet论坛好帮手

    2012年11月8日 2:27
    版主

全部回复

  • 或许你可以从下列两个方向来查看问题

    1 确定是否存在D:\ cemsdatabasetest目录是否存在

    2 D:\ cemsdatabasetest\ cemstestdatas.mdf已经存在勾选WITH REPLACE选项


    以上說明若有錯誤請指教,謝謝。
    歡迎參觀我的BLOG - 積沙成塔


    2012年11月7日 12:05
  • “is  claimed  by”  这是什么意思???   怎么回事???


    Science and technology is my lover.

    Means the file is for existing db, you can choose to replace it with CEMS or create new file with different name for CEMS. You can get syntax and sample code of 'restore database' in books online.
    2012年11月7日 14:13
  • 因为当前已经存在着“cemstestdatas.mdf”文件了,所以无法还原。

    可以有两个选择:

    1.如果不想覆盖之前的,在还原选型页,Restore as中将文件cemstestdatas.mdf修改为别的,LDF也要做相应的修改。

    2.如果你是要覆盖之前的数据库,就直接用REPLACE选项。 (谨慎如果是正式数据库的话,因为会将之前的数据库覆盖)

    2012年11月8日 1:30
  • Hi,

    It says the files you're trying to restore already exist and it won't let you overwrite them. You can restore the database by using WITH MOVE clause for the affected files.  You can do this using T-SQL or by the restore wizard in SSMS.

    Through SSMS edit the pathname of files where it will restore.

    TSQL Command will be like

    RESTORE DATABASE ABC
       FROM DIsk='X:\ABC.bak'
       WITH MOVE 'ABC_Data' TO 
    'X:\Data\ABC_NewData1.mdf', 
          MOVE 'ABC_Log' 
    TO 'X:\Log\ABC_NewLog1.ldf'

    Give different name to the mdf,ndf and ldf files and try to do  a restore through query analyzer.

    Thanks,
    Amy peng


    Description: Description: TechNet 论坛好帮手立刻免费下载TechNet论坛好帮手

    2012年11月8日 2:27
    版主