Open .mdf files [Solved/Closed]

BjornPorgilsson 2 Posts Wednesday May 24, 2017Registration date May 25, 2017 Last seen - May 24, 2017 at 10:49 AM - Latest reply: BjornPorgilsson 2 Posts Wednesday May 24, 2017Registration date May 25, 2017 Last seen
- May 25, 2017 at 02:55 PM
Hello,

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.

See more 

3 replies

Best answer
ac3mark 9361 Posts Monday June 3, 2013Registration dateModeratorStatus May 25, 2018 Last seen - May 24, 2017 at 04:09 PM
3
Thank you
If they are OLF files, wouldn't they be in OLF format? It sounds like you are hacking secured forms. If you are using SQL, then script the OLF file into a table!

Thank you ac3mark 3

has helped 2134 users this month

Best answer
morrishall 1 Posts Thursday May 25, 2017Registration date May 25, 2017 Last seen - Updated by ac3mark on 25/05/17 at 04:11 PM
3
Thank you
You could use a mdf open file tool <REMOVED>
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

Thank you morrishall 3

has helped 2134 users this month

BjornPorgilsson 2 Posts Wednesday May 24, 2017Registration date May 25, 2017 Last seen - May 25, 2017 at 02:55 PM
0
Thank you
Thank you guys for your feedback and help. Thank you!