zoukankan      html  css  js  c++  java
  • 从MDF文件恢复Sql Server2000数据库

    怎样从MDF文件恢复Sql Server2000数据库,通过如下步骤恢复test数据库:

    1.新建同名数据库。

    2.删除其日志文件test_Data.LDF,不删除后边的过程执行通不过。

    3.把test数据设置为脱机。

    4.在查询分析器中以超级用户登入,执行以下存储过程,必须以超级用户登入,这是系统级存储过程。

    EXEC sp_detach_db @dbname = 'test'
    EXEC sp_attach_single_file_db @dbname = 'test', @physname = 'E:\WebDemo\test_Data.MDF'

    5.把test数据设置为联机。

    6.刷新数据库,表出来了,数据完好。

  • 相关阅读:
    bzoj 1977
    bzoj 3389
    bzoj 1064
    codeforces 424D
    codeforces 425C
    codeforces 425D
    codeforces 427E
    codeforces 425E
    codeforces 429D
    codeforces 429E
  • 原文地址:https://www.cnblogs.com/martian6125/p/9631461.html
Copyright © 2011-2022 走看看