Is it possible to open a sql server transaction log file with some type of a stream reader object?
I've tried in C# a variety of ways but the database appears to be opening the .ldf file with an explicit lock and even though I only want to read the file it is not possible while the database is running.
Opening the file while the database is closed is not what I'm looking for, I need to be able to read the transaction log in stream. I have a rough sketch of the file layout but right now I'm stuck being able to even attach.
Anyone know of any config options or other methods?
Thanks! -G
You can read the log contents in great detail and at the lowest level by using the fn_dblog function. It requires SQL Server to be online and the database to be ONLINE.