I have taken the log backup and am trying to shrink the log file by running the following command
but it's not working. if any body from the team help me out from this situation,it would be great help for me
USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<TransactionLogName>, 1) GO
IT'S GIVING THE FOLLOWING ERROR
---------------------------------- Server: Msg 8985, Level 16, State 1, Line 1 Could not locate file <TransactionLogName>, in sysfiles. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
BACKUP LOG {database} WITH TRUNCATE_ONLY is a deprecated feature and no longer works.
You need to either perform a regular log backup, or switch to simple recovery model and back to full (note: if doing this, you need to perform a full backup after shrinking the log to reset the log chain so subsequent log backups will work.