Nhat,
Since you have the copy of the MDF and LDF files, you can attach the
database by doing sp_attach_db.Its explained in BooksOnLine.Heres an excerpt
of the syntax :
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf',
@filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
sp_attach_db requires that the database was properly detached using
sp_detach_db.Since your system crashed, I assume you couldnt detach it
properly.Anyways sp_attach_db even works otherwise..so try your luck.Another
related command is sp_attach_single_file_db.
One reason why you should always have valid latest database backups.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Nhat" <nhatminhho (AT) yahoo (DOT) com> wrote
Quote:
My system crashed. I need to reinstall Window 200 server.
I don't want to create a database from its backup because
the backup file is kindof old. Is there any way to
reinstall the database from its data file in "programm
files/SQLserver" Folder?
Thanks
Nhat Ho |