January 28, 2009 at 3:14 am
I have a job that runs the following code:
backup log "DDT-20071007" with truncate_only
(Please note this is a development server and I am aware of the issues surrounding issuing a truncate only statement.)
It Errors out with the following information:
Incorrect syntax near 'DDT-20071007'. [SQLSTATE 42000] (Error 102) Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. [SQLSTATE 42000]
This code runs fine in the query analyser,but fails when incorporated into a job. It has to have the quotation marks or it fails in the query analyser. There is no issue with permissions, can anyone help?
January 28, 2009 at 3:40 am
In QA the setting "Quoted Identifiers" is by default on.
In SSMS (or EM) this setting is by default off. SO in your job either enbale quoted identifiers or remove the doublequotes.
[font="Verdana"]Markus Bohse[/font]
January 29, 2009 at 7:11 am
You can run this query using brackets as -
backup log [DDT-20071007] with truncate_only
Hope it will work.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply