问题
I'm trying to track down why a db query got screwed in SQL Server (just the one time).
dbcc log(mydb,2)
is not filterable by date(?). And the ldf file I can't access directly without going through 2 layers of bureaucracy
Any suggestions? Other than installing some 3rd party proprietary log file viewer.
回答1:
You may apply ORDER BY, WHERE et al usual SQL (is not it filtering language?) to
SELECT * FROM fn_dblog(null,null)
It is undocumented (not in BOL) feature but google gives a plethora of articles on it and its use
来源:https://stackoverflow.com/questions/3675338/sql-server-transaction-log-dbcc-not-really-useful-ldf-file-not-accessible-don