Solved

I need to attach an unknown pair (.MDF/.LDF) files to SQL Server. I am not familiar with SQL at all. Please give step-by-step instructions, from opening the Enterprise Manager or Query Analyzer

Posted on 2006-11-16
22
209 Views
Last Modified: 2013-12-03
I have read many similar answers to similar questions, but I am so new to SQL that I don't understand the solution, because I don't know where to start from. I know I need to enter some commands, but I don't know how. Please talk me through the entire sequence from opening the Enterprise Manager, each and every option to choose to reach the result of attaching these 2 files to a new database. Then I will want to export this information to an Access database. By the way, I have SQL Server 7 teporarily installed on my desktop computer. I will not need to continue using this database, I only need to view & export the contents.

Thank you,
CombsKC
0
Comment
Question by:CombsKC64
  • 10
  • 10
22 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17962867
1) WHers ur .mdf and .LDF file
2) what do u mean by sayin unknown pair of (.mdf/.LDF) ?
3) Open EM
4) rt click Database --> all tasks -->Attach DB. Give the path of the .mdf file
5) attach as (which name u wanna c the DB)
6) Specify the owner and click OK
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17962882
After Opening EM, do u have ur server registered.
if not register ur DB server first

1)Rt click on the tree left side and click new server registration, that wizard will take u thru the registration process.

once its registered, u will c the server in the tree

expand server and u will c databases.

from there follow steps 4 onwards in the previous post..

0
 

Author Comment

by:CombsKC64
ID: 17963167
1) .mdf and .ldf files are on a local hard drive partition, but were copied from another server.
2) unknown meaning, they are not recognized by the server.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:CombsKC64
ID: 17963183
I have a list of databases in my server tree. I am assuming that it is already registered, correct? Otherwise, how do I know if my server is registered?

When I right click on databases/All Tasks/, there is no option to "attach DB". Only "backup. Restore, Import, Export".
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963201
<<
I have a list of databases in my server tree. I am assuming that it is already registered, correct? Otherwise, how do I know if my server is registered?


Yes its already registered and the databases in the server are shown there.
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963205
the server registered -- is it ur local server ?

if not register ur local server
0
 

Author Comment

by:CombsKC64
ID: 17963236
it is the only server. it is on my desktop computer. I only installed it so I could access the information in these .mdf & .ldf files, and then export that information to access.
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963293
k.. now
rt click Database --> all tasks -->Attach DB. Give the path of the .mdf file
 attach as (which name u wanna c the DB)
 Specify the owner and click OK

afetr this ur database will be listed along with other databases
0
 

Author Comment

by:CombsKC64
ID: 17963314
When I right click on databases-->All Tasks-->, there is NO option to "attach DB". Only "Backup. Restore, Import, Export".
Is there something wrong?
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963325
whic is the version of sql server u r using?
0
 

Author Comment

by:CombsKC64
ID: 17963333
Does it make a difference if I have the "desktop" version or "full" version?
0
 

Author Comment

by:CombsKC64
ID: 17963334
I am currently using the desktop version. I will try to install the full version if that will solve the problem.
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
ID: 17963340
take a look at this link

http://support.microsoft.com/kb/208888
0
 

Author Comment

by:CombsKC64
ID: 17963443
OK, so I have attached the files to a database. Now I need to export the information to MS Access. I go through the export instructions until I get to the "tables to transfer", then it is blank, and there is not active buttons. What do I do to automatically sellect the tables in the database?
0
 

Author Comment

by:CombsKC64
ID: 17963467
Oh sorry, there are no tables in the database. How can I verify that the database has been attached properly?
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963477
Import and Export data (copy objects and data between SQL Server databases)
You can copy a whole database or selectively copy objects and data from the source database to the destination database by using the Data Transformation Services Import and Export Data Wizard.• The source database may be used during the transfer. If the source database is used during the transfer, you may see some blocking when the transfer is in progress.
• When you use the Import and Export Data Wizard, the character set, sort order and collation does not have to be the same between the source server and destination server.
• Because unused space in the source database does not move, the destination database may not have to be as large as the source database. Similarly, if you move only some objects, the destination database may not have to be as large as the source database.
• SQL Server 7.0 Data Transformation Services may not transfer text and image data longer than 64 KB correctly. This problem does not apply to the SQL Server 2000 version of Data Transformation Services.
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17963485
To use the DTS Wizard to transfer your data you can use these steps:

1.
 In SQL Server Enterprise Manager, on the Tools menu, point to Data Transformation Services, and then click Export Data.
 
2.
 In the Choose a Data Source dialog box, select Source,
 
3. In the Choose a Destination dialog box, select Destination
4.
 In the Specify Table Copy or Query dialog box, click Copy tables.
 
5.
 In the Select Source Tables dialog box, click Select All.
 
0
 

Author Comment

by:CombsKC64
ID: 17963547
How can I verify that the database has been attached properly?
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17964564
<< Oh sorry, there are no tables in the database. How can I verify that the database has been attached properly

what does it mean?

did u create a new db

How did u attach the db ?
0
 

Author Comment

by:CombsKC64
ID: 17965722
I attached the DB according to the website you gave me above. Then try to export using the DTS wizard.
How can I verify that the files were attached to the database properly?
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

839 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