sp_can_tlog_be_applied (Transact-SQL)
SQL Server 2012
Verifies whether a transaction log backup can be applied to a SQL Server database. sp_can_tlog_be_applied requires that the database be in the Restoring state.
The following example declares a local variable, @MyBitVar, to store the result.
USE master;
GO
DECLARE @MyBitVar BIT;
EXEC sp_can_tlog_be_applied
@backup_file_name =
N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\AdventureWorks2012.bak',
@database_name = N'AdventureWorks2012',
@result = @MyBitVar OUTPUT;
GO
