How to restore the content of the database

xiaoxiao2021-03-06  103

Yesterday helped a friend recovered the SQL Server 7.0 database. Now write the process, share it together: My buddy is copying the data file from others (C: / MSSQL7 / DATA directory) first I used: Re-on a good machine Install SQL Server, establish the same database device (size), and the database stops SQL Server, override the newly established database file with a copy of the database file, and then restart SQL Server. But it is not possible. I guess the key is the same database device (size) that cannot be established. Later, the system stored procedure: sp_attach_db // Additional Database file to server or sp_attach_db_single_file // A single file to the server to the server is: for, for example: exec sp_attach_single_file_db 'pubs', 'E: /DATA/PUBS.MDF' sp_attach_db @ dbname = "conMis2000", @ filename1 = "d: /1/conmis2000_data.mdf", @ filename2 = "d: /1/conmis2000_log.ldf" How to attach Database files to the server (ie: pass * .mdf * ldf Document Repair Database This sees you can also recover the previous data through the log when you find the information. I don't know if the buddy looks like a log recovery: restore log {data_name | @Database_name_var} from

With [Norecovery / Recovery / StandBy_undo_file_name]

[,] [stopt = {data_time | @Data_time_var}

For example: library name Database1_Log requires data for Database1_log Restore data before 2000/6/15 1:00: restroe log database1from Database_logwith recovery, stopt = 'Jun 15, 2000 1:00 AM' References are: (Tsinghua University Press)

转载请注明原文地址:https://www.9cbs.com/read-104079.html

New Post(0)