Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restore of the sql server

Status
Not open for further replies.

lumich

ISP
Jul 19, 2001
3
CN
At first I 'd like to thank Mr.Terry Broadbent
who have made a patient reply, I 'm sorry not to make the question clear enough,here I 'll try again.
my former partner make a full copy of /sql/data folder (containing all the mdf and ldf files,including system database as well as my own ones) rather than using the SQL to do the backup work,then reinstall the WIN2000 SERVER and SQL server (v7) ,now, only the system databases are accessible, but not my own ones,what can I do to recover it.
 
Okay! I think I understand. X-)

First suggestion. [ul][li]Backup master, msdb and model databases.
[li]Stop SQL Server.
[li]Copy the backed up files to the SQL data directory, including the system database files.
[li]Restart SQL Server.[/ul]Hopefully, your databases will now show up.

Second suggestion if first suggestion fails.[ul][li]Use the sp_attach_db stored procedure to recover your databases.

EXEC sp_attach_db @dbname = N'mydatabase',
@filename1 = N'E:\MSSQL\Data\mydb_file.mdf',
@filename2 = N'E:\MSSQL\Data\mydb_log_file.ldf'[/ul]Change the database name, the path and file names for each database.

When you recover this way your logins will probably be broken and will need to be reestablihed. The following article may be helpful.

Fixing broken logins and transferring passwords
Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Hi lumich,
Terry had given the appropriate solution for your problem.

Your problem hopefully should be solved, if you had read the response of your previous question on thread
thread183-108589
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top