0

I am using MS SQL and have logs that are in .mdf and .ldf format. It took us a while but we figured out how to get our new settings correct and coming in w3c format. The olf files are still .mdf and I need to know what I can do to open them and view them. I have no database experience and want to know if there is a program I can use to do so. I have tried MSDEtoText.vbs and were unsuccessful running the script. Any suggestions will be greatly appreciated.

3
Contributors
3
Replies
14
Views
3 Months
Discussion Span
Last Post by Bjorn_1
0

You could use a mdf open file tool.
But before if you don't have the ldf file, you can use this SQL command:
sp_attach_single_file_db @dbname= 'databasename', @physname= 'C:\Users\Blake\Documents\Databases\databasefile.mdf'
or you can:
CREATE DATABASE TestDb ON
(FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDb.mdf')
FOR ATTACH_REBUILD_LOG
GO

0

Thank you all for your advice! I'm appreciative for your responses and help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.