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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching database

Status
Not open for further replies.

aspeed

MIS
Apr 5, 2002
11
0
0
US
Is there any way in SQL2000 to attach a database using only the .mdf file with no log files. It gives me an error
saying that it cant find the log file. It has been deleted.
 
Maybe you can first create the database new. Then copy that ldf file to use during the attach? I've never tried this, just an idea.
 
Try the single file attach. Basic syntax.

-- attach database
sp_attach_single_file_db 'MAS_CHM',
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\MAS_CHM.mdf'

Usually, before you can do an attach the file must have been detached from the other server before being copied.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top