Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

Can mdf and ldf files be attached to SQL Server in another system

We received some client mdf and ldf files.  They are on their own different SQL Server installation.  Is there any way to attach these files to our SQL Server.  It obviously will not be listed in Master.  They have either SQL Server 2000 or 2005, I forget which.  We have both versions available.

Thanks for your help
0
gkravitz10
Asked:
gkravitz10
4 Solutions
 
Aneesh RetnakaranDatabase AdministratorCommented:
right click on the database on EM or SSMS, select 'attach', browse and add the files .
If you try to attach a 2005 db to the 2000 server, you will get an error.
0
 
Shanmuga SundaramCommented:
Yes as aneeshattingal said, we can attach database of same versions. Also we can attach the db from old version (2000) in new version (2005). But using new version db in oldversion is tedious. This link will help you.

http://www.c-sharpcorner.com/UploadFile/raj1979/AttachDatabase08252008061546AM/AttachDatabase.aspx
0
 
Tapan PattanaikSenior EngineerCommented:
hi gkravitz10,

                     check these links, your solution is here.

How to: Attach a Database (SQL Server Management Studio):

http://msdn.microsoft.com/en-us/library/ms190209.aspx

How to attach a database in SQL Server 2005:

http://www.c-sharpcorner.com/UploadFile/raj1979/AttachDatabase08252008061546AM/AttachDatabase.aspx

SQL Server 2005: How to Attach (or Reattach) a Database Missing the LDF:

http://www.tech-recipes.com/rx/1867/sql_server_2005_how_to_attach_or_reattach_a_database_missing_the_ldf/

      

Attaching and Detaching Databases:

http://www.mssqlcity.com/Articles/Adm/attach_database.htm

MS SQL Server 2008 Attach Database .MDF File:

http://www.kodyaz.com/articles/sql-server-attach-database-mdf-file.aspx

0
 
St3veMaxCommented:
Please bear in mind that if they are SQL 2000 Databases and you import them into SQL 2005 and you need to send them back; they cannot work again with SQL2000 as they have been upgraded.

Hope this helps.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now