BigB BigB - 6 months ago 54
SQL Question

SQL Server 2014 - Incorrect syntax near the keyword 'tran'

I am trying to install a stored procedures. When I run the query I get Incorrect syntax near the keyword 'tran'

The 'tran' keyword is used in

dump tran master with no_log

It would be helpful if anyone help me overcome this issue.


You're getting a syntax error because TRAN isn't a SQL keyword and isn't valid for the syntax of DUMP. See To use DUMP properly, it's either DUMP DATABASE or DUMP TRANSACTION

Note that per the above link, DUMP is flagged as deprecated and only exists for backwards compatibility. It will go away in the future. You should be using BACKUP (probably BACKUP LOG in this case) instead.