Where the MDF and LDF detached from the SQL Server at the same time, if they were then you can attach them using the sp_Attach_db system stored procedure. However if they were detached at two different times they there are useless together.
You can attach the MDF file without the LDF File by using the sp_attach_single_file_db system stored procedure. This procedure will attach the database and create a new log file.
Last Wiki Answer Submitted: February 27, 2009 7:14 pm by Denny Cherry64,505 pts.
All Answer Wiki Contributors: Denny Cherry64,505 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
i have different problem ..i m having server 2008 at my office but server 2005 at my place..when i try to attach mdf file of server 2008 to server 2005 it doesnt allow..
is it possible to attach mdf file to the lower version or..:(
No you can not attach a database from a newer edition to an older edition. You will need to purchase the developer edition for your home computer ($50 US) or get the trial edition of SQL Server 2008.
can i attach an mdf and ldf file which was created in sql server 2000 to sql server 2005 enterprise edition?if so please explain me in steps?thanks in advance
Yes, you can always go up, but once you attach to a newer version you will not be able to attach that same database to an older version.
In SQL Management Studio, connect the object explorer to the server, then right click on databases, select all tasks, then attach database. Select the mdf file of the database you wish to attach and then click ok. The database will then be attached to the SQL 2005 instance.
i am currently working on a migration db. i have backup the mdf. and ldf. and same time i have export and import the database to the new server. do i still need to work on the mdf as mention?
i have different problem ..i m having server 2008 at my office but server 2005 at my place..when i try to attach mdf file of server 2008 to server 2005 it doesnt allow..
is it possible to attach mdf file to the lower version or..:(
No you can not attach a database from a newer edition to an older edition. You will need to purchase the developer edition for your home computer ($50 US) or get the trial edition of SQL Server 2008.
can i attach an mdf and ldf file which was created in sql server 2000 to sql server 2005 enterprise edition?if so please explain me in steps?thanks in advance
Yes, you can always go up, but once you attach to a newer version you will not be able to attach that same database to an older version.
In SQL Management Studio, connect the object explorer to the server, then right click on databases, select all tasks, then attach database. Select the mdf file of the database you wish to attach and then click ok. The database will then be attached to the SQL 2005 instance.
i am currently working on a migration db. i have backup the mdf. and ldf. and same time i have export and import the database to the new server. do i still need to work on the mdf as mention?