Solved

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

Posted on 2009-05-20
4
529 Views
Last Modified: 2012-05-07
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
Comment
Question by:gkravitz10
4 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 50 total points
ID: 24433167
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
 
LVL 17

Assisted Solution

by:Shanmuga Sundaram
Shanmuga Sundaram earned 40 total points
ID: 24433244
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
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 390 total points
ID: 24433262
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
 
LVL 13

Assisted Solution

by:St3veMax
St3veMax earned 20 total points
ID: 24433472
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Addition to SQL for dynamic fields 6 37
best counters for cpu high usage 3 26
sql server concatenate fields 10 31
VBScript Write Column Headers 3 35
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question