This from a MSDN forum:

************************************************************************
*******************************************
ok - in that case, because your database wasn't cleanly shutdown you'll
need to use the last resort (assuming you're using SQL Server 2005)

create a database of equal size to the one you're trying to attach 
shutdown the server 
swap in the old mdf file 
bring up the server and let the database attempt to be recovered and
then go into suspect mode 
put the database into emergency mode with ALTER DATABASE 
run DBCC CHECKDB (dbname, REPAIR_ALLOW_DATA_LOSS) which will rebuild the
log and run full repair
Your database will be available again but you'll have lost data and the
data won't be transactionally consistent - see the following blog posts:

https://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/15/632398.
aspx 
https://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/16/633645.
aspx 
https://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/18/636105.
aspx

If you're on SQL Server 2000, you can still do this but you'll need to
use the undocumented DBCC REBUILD_LOG at your own risk. If you're unsure
about any of this, you should contact Product Support to help you.

Thanks



v/r
 

//SIGNED//

Stephen S. Wolfe, YA2, DAF
6th MDG Data Services Manager
6th MDG Information System Security Officer
Comm (813) 827-9994  DSN 651-9994

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Vince Teachout
Sent: Thursday, August 14, 2008 4:57 PM
To: ProFox Email List
Subject: [NF] MSSQL attach MDF file without LDF file?

   Does anyone know if there is a way to attach a database if you have 
only the MDF file?  Someone sent me the MDF without the LDF.  Thanks.


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to