一下办法我在7下面成功,2000没有试过在原有目录下面装,然后在建立和原来一样的库,然后用原来的.dbf和.log覆盖就行了

解决方案 »

  1.   

    先把原来DATA目录中数据文件和日志文件备份,然后在新安装的SQL SERVER2000中建立一个数据库,名称要和原来数据库相同,建好后先把服务器关闭,然后把备份的数据文件和日志文件拷贝到DATA目录下覆盖就可以了,我试过很多次了,绝对没有问题。
      

  2.   

    如果有备份文件,用备份文件回复。如果没有,试一下以下帖子的方法(没有把握的方法):
    http://www.csdn.net/expert/topic/750/750008.xml?temp=.1376306
    http://www.csdn.net/expert/topic/669/669006.xml?temp=9.545535E-02
      

  3.   

    sp_attach_db,这个proc可能能帮你
      

  4.   

    sp_attach_db (T-SQL)
    Attaches a database to a server.Syntax
    sp_attach_db [@dbname =] 'dbname',
        [@filename1 =] 'filename_n' [,...16]Arguments
    [@dbname =] 'dbname' 
    Is the name of the database to be attached to the server. The name must be unique. dbname is sysname, with a default of NULL. 
    [@filename1 =] 'filename_n' 
    Is the physical name, including path, of a database file. filename_n is nvarchar(260), with a default of NULL. There can be up to 16 file names specified. The parameter names start at @filename1 and increment to @filename16. The file name list must include at least the primary file, which contains the system tables that point to other files in the database. The list must also include any files that were moved after the database was detached. 
    Return Code Values
    0 (success) or 1 (failure)Result Sets
    NoneRes
    sp_attach_db should only be executed on databases that were previously detached from the database server using an explicit sp_detach_db operation. If more than 16 files must be specified, use CREATE DATABASE with the FOR ATTACH clause.If you attach a database to a server other than the server from which the database was detached, and the detached database was enabled for replication, you should run sp_removedbreplication to remove replication from the database.Permissions
    Only by members of the sysadmin fixed server role can execute sp_attach_db.Examples
    This example attaches two files from pubs to the current server.EXEC sp_attach_db @dbname = N'pubs', 
        @filename1 = N'c:\mssql7\data\pubs.mdf', 
        @filename2 = N'c:\mssql7\data\pubs_log.ldf'  See Also
    CREATE DATABASE sp_helpfile 
    sp_attach_single_file_db sp_removedbreplication 
    sp_detach_db System Stored Procedures 
      
      

  5.   

    先关掉SQL各种服务
    然后用原来的目录直接覆盖新目录
    我试过7.0与2000都行
      

  6.   

    诸位的方法我都试过了,但是我的数据库显示(SUSPECTED),不能登陆,请问是何原因????
      

  7.   

    上面的方法我都试过了,出来的数据库显示SUSPECTED,不能操作,请问什么原因?解决了一定给分!!!
      

  8.   

    sp_attach_db 不行嗎,我式過可以的