i have a question on mdf / ldf

i have a data file which is
auto.mdb
auto.ldf

how can i bring the data file into sql server?
LVL 2
khan2000Asked:
Who is Participating?
 
Dishan FernandoConnect With a Mentor Software Engineer / DBACommented:
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
 
arbertCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
LowfatspreadCommented:
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
 
LowfatspreadCommented:
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
 
nmcdermaidCommented:
Hopefully 'mdb' was a typo. MDB is an Access file (unless of course it was renamed from MDF)

0
 
arbertCommented:
yes, it was a typo--I'm aware of the difference between and MDB and MDF.....
0
 
nmcdermaidCommented:
My comment was addressed to the original question.... I figured you would know!  :)
0
All Courses

From novice to tech pro — start learning today.