dbTalk Databases Forums  

Reinstall SQLServer

microsoft.public.sqlserver.setup microsoft.public.sqlserver.setup


Discuss Reinstall SQLServer in the microsoft.public.sqlserver.setup forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nhat
 
Posts: n/a

Default Reinstall SQLServer - 07-03-2003 , 10:03 AM






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


Reply With Quote
  #2  
Old   
Dinesh.T.K
 
Posts: n/a

Default Re: Reinstall SQLServer - 07-03-2003 , 10:11 AM






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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.