Dbcc Log. There exist several useful DBCC log commands which are used to analyze provide information about database etc Description about some of the log commands is mentioned below DBCC LOGINFO The command is being used for overviewing the structure of log The command provides you with an information about virtual log files that are inside your transaction log For executing this command type DBCC LOGINFO in query window and press Enter As an output a tabular window will appear.
With the help of Virtual Log Files (VLFs) potions of the Log file is marked as Active Recoverable Reusable & Unused The number of VLFs can go into hundreds (but not advisable) When a log file grows and when it is shrunk it is always in units of VLFs We can observe the virtual log file using SQL Server DBCC LOGINFO statement.
SQL Server fn_dblog() Function Details and Example
INSERT INTO tblLogMon (DatabaseNameLogSize_MBLogSpaceUsedStatus) EXEC ('DBCC SQLPERF (LOGSPACE)') SELECT * FROM tblLogMon The added RecordStamp column makes it useful to track the time as this can be useful to highlight when a log fills as evidence that the drive may need to be grown (see later in this tip).
DBCC CHECKDB (TransactSQL) SQL Server Microsoft Docs
The TransactSQL programming language provides DBCC statements that act as Database Console Commands for SQL Server Database Console Command statements are grouped into the following categories Table 1 Command category Perform Maintenance Maintenance tasks on a database index or filegroup Miscellaneous.
DBCC LOG Command to Find Transaction Log Detail In SQL Server
DBCC LOG lets you view the commands in the Transaction Log file and can provide essential information about changes to data in the SQL Server database.
Useful Dbcc Log Commands
DBCC (TransactSQL) SQL Server Microsoft Docs
SQL Server DBCC Virtual Log LOGINFO – Observing
Useful DBCC log commands SQL Shack
DBCC CHECKDB attempts to recover the database using regular logbased recovery techniques If because of transaction log corruption database recovery is unsuccessful the transaction log is rebuilt Rebuilding the transaction log may result in the loss of transactional consistency DBCC CHECKDBGO Check the AdventureWorks2012 database without nonclustered indexesDBCC CHECKDB (AdventureWorks2012 NOINDEX)GO.