Determing the position of the last VLF in transaction log before shrinking the log file
sys.dm_db_log_info
Returns Virtual log file (VLF) information of the transaction log. Note all transaction log files are combined in the table output. Each row in the output represents a VLF in the transaction log and provides information…