RE: How can I attach a SQL2000 database that only has .MDF file

RE: How can I attach a SQL2000 database that only has .MDF file

 

  

Xing,

If you're using EM, you can attach a database without the logfile.

In your case, do you have a logfile or not? If you do, and you cannot use it
to attach, then delete the file or move it to another location.

Then, when you attempt to attach the MDF, you'll be prompted that a new LDF
will be created for you. Click yes and you're done...

-----Original Message-----
From: Michael Sexton (US-IT Contractor)
[mailto:mssqldba-ezmlmshield-x5550580.[Email address protected]
Sent: Monday, January 29, 2007 21:11
To: LazyDBA Discussion
Subject: RE: How can I attach a SQL2000 database that only has .MDF file

Use sp_attach_single_file_db

Mike

-----Original Message-----
From: Jianming Xing
[mailto:mssqldba-ezmlmshield-x46178493.[Email address protected]
Sent: Monday, January 29, 2007 11:56 AM
To: LazyDBA Discussion
Subject: How can I attach a SQL2000 database that only has .MDF file

Hello all,
I have a detached database that has only .MDF file. When I try to attach
it, I got Error 1813. It said "Could not open new database 'XXXX'.
Create database is aborted. Device activation error. The physical file
name XXXX.LDF may be incorrect". We should be able attach a database
that has no .LDF. It supposes to create a new .LDF. But I failed.
Does any pro have experience on attaching only .MDF database?
thank you in advance for any tips.


JIANMING


This e-mail message and any attachments are confidential. They may also
be privileged or otherwise protected by work product immunity. If you
have received this e-mail by mistake, please notify us by reply e-mail,
delete it from your system, and any disclosure, copying or use of its
contents is prohibited. Thank you, www.oceantomo.com.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



MS Sql Server LazyDBA home page