all groups > sql server (microsoft) > january 2004 >
You're in the

sql server (microsoft)

group:

Reading in mdf/ldf files



Reading in mdf/ldf files charis
1/30/2004 1:21:11 AM
sql server (microsoft): Hello.
I am completely new to SQL server. I have received an mdf and an ldf file
which were extracted from a SQL server. I want to translated them into
Microsoft Access or Microsoft Excel files (for analysis).

I have at my disposal MSSQLServer 7.0, and AccessXP, ExcelXP. Any help will
be appreciated.

kind regards,
charis

Re: Reading in mdf/ldf files mountain man
1/30/2004 12:57:22 PM
[quoted text, click to view]


1) You may need to determine the version of SQL server from which
the mdf and ldf files were generated.

2) Open Query Analyser, Help, TSQL Help and check sp_attach_db

Sample code=

EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf',
@filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'


AddThis Social Bookmark Button