Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Ms-SQL server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-24 : 01:26:53
kottan writes "Can i attach database without LDF only copying MDF to that server and create database using that MDF is it possible?"

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2002-06-24 : 07:09:50
Yes look up sp_attach_single_file_db in BOL....

Peace

Rick

Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-06-24 : 08:17:23
However success can vary depending on whether the database was explicitly detached . You may encounter device activation errors if this is not the case. It is still possible to recover but can take some "fiddling" Basic advice is to always explicitly detach a database that you want to attach to another server.

HTH
Jasper Smith


Go to Top of Page

MakeYourDaddyProud

184 Posts

Posted - 2002-06-24 : 08:27:50
Please be careful. If you are relying on SS recreating an empty LDF (a popular trick to lose colossal log file and retain the data), you will lose your logging info. Look in sysfiles1 first for the filepath of the data you disconnected. This could be useful if you simply want to reattach it after physically deleting the LDF.

Dan

Go to Top of Page
   

- Advertisement -