Solved

i have a question on mdf /  ldf

Posted on 2003-12-05
8
672 Views
Last Modified: 2010-05-18
i have a data file which is
auto.mdb
auto.ldf

how can i bring the data file into sql server?
0
Comment
Question by:khan2000
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 9886158
Do you mean you have existing files you want to load to sql server?

Just copy them to the server and execute this from query analyzer:

sp_attach_db 'whatyouwanttocallit','path:\auto.mdb','path:\auto.ldf'

Brett
0
 
LVL 8

Expert Comment

by:dishanf
ID: 9887011
0
 
LVL 8

Accepted Solution

by:
dishanf earned 50 total points
ID: 9887014
EXEC sp_attach_db @dbname = N'auto',
   @filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\auto.mdf',
   @filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\auto.ldf'
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9887510
Hi khan2000,


assuming the files are sql server files which where properly detached for there existing server
and that that server is / was at the same patch / version level as the server you are
trying to install them on...

Cheers!
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.

 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9887511
and please maintain your old questions....
9 open questions:
12/06/03 http://www.experts-exchange.com/Q_20817985.html "i have a question on mdf /  ldf"
11/21/03 http://www.experts-exchange.com/Q_20805367.html "free news server nntp"
11/21/03 http://www.experts-exchange.com/Q_20805336.html "difference between sql 6.5 vs 7.0 vs 200..."
11/13/03 http://www.experts-exchange.com/Q_20797256.html "does anybody have mcdba cbt?"
11/11/03 http://www.experts-exchange.com/Q_20794833.html "I NEED very good web sites for..."
10/28/03 http://www.experts-exchange.com/Q_20780872.html "pop account"
10/07/03 http://www.experts-exchange.com/Q_20759897.html "display a status window"
09/22/03 http://www.experts-exchange.com/Q_20745377.html "i need logic pls."
09/12/03 http://www.experts-exchange.com/Q_20737487.html "how do i write code in aspx"
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9895740
Hopefully 'mdb' was a typo. MDB is an Access file (unless of course it was renamed from MDF)

0
 
LVL 34

Expert Comment

by:arbert
ID: 9896424
yes, it was a typo--I'm aware of the difference between and MDB and MDF.....
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9896923
My comment was addressed to the original question.... I figured you would know!  :)
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now