SQL Server2K, SP3a. Attempt to run in EM:
BACKUP LOG <database_name> WITH TRUNCATE_ONLY
The error returned is:
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
'WITHTRUNCATE_ONLY'.
The two keywords are concatenated in the error message, as shown above.
Database name works in other statements. Command is straight out of books
online! Have searched web & news groups (1 hit at a pay site).
Many thanks for any info/help.Have you tried running this in Query Analyzer? How are you running it in
EM?
"Mailing Lists" <ml010241@.berkea.com> wrote in message
news:erRGwuOlEHA.896@.TK2MSFTNGP12.phx.gbl...
> SQL Server2K, SP3a. Attempt to run in EM:
> BACKUP LOG <database_name> WITH TRUNCATE_ONLY
> The error returned is:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near
> 'WITHTRUNCATE_ONLY'.
> The two keywords are concatenated in the error message, as shown above.
> Database name works in other statements. Command is straight out of books
> online! Have searched web & news groups (1 hit at a pay site).
> Many thanks for any info/help.
>|||Below is a copy& paste from what I just executed in Query Analyzer:
BACKUP LOG pubs WITH TRUNCATE_ONLY
Can you copy your exact command you executed? Also, try executing it from Query Analyzer.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mailing Lists" <ml010241@.berkea.com> wrote in message news:erRGwuOlEHA.896@.TK2MSFTNGP12.phx.gbl...
> SQL Server2K, SP3a. Attempt to run in EM:
> BACKUP LOG <database_name> WITH TRUNCATE_ONLY
> The error returned is:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
> 'WITHTRUNCATE_ONLY'.
> The two keywords are concatenated in the error message, as shown above.
> Database name works in other statements. Command is straight out of books
> online! Have searched web & news groups (1 hit at a pay site).
> Many thanks for any info/help.
>|||That did the trick (I'm ashamed to say). I considered this earlier but
wrote it off as identical to executing the SQL statement in EM--SQL is SQL,
darn it. :-) To answer your question, open the SQL view on any query and
type away.
Thank you very much!
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:%2305Xx6OlEHA.3816@.TK2MSFTNGP14.phx.gbl...
> Have you tried running this in Query Analyzer? How are you running it in
> EM?
>
> "Mailing Lists" <ml010241@.berkea.com> wrote in message
> news:erRGwuOlEHA.896@.TK2MSFTNGP12.phx.gbl...
> > SQL Server2K, SP3a. Attempt to run in EM:
> >
> > BACKUP LOG <database_name> WITH TRUNCATE_ONLY
> >
> > The error returned is:
> >
> > [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
> near
> > 'WITHTRUNCATE_ONLY'.
> >
> > The two keywords are concatenated in the error message, as shown above.
> > Database name works in other statements. Command is straight out of
books
> > online! Have searched web & news groups (1 hit at a pay site).
> >
> > Many thanks for any info/help.
> >
> >
>|||"Mailing Lists" <ml010241@.berkea.com> wrote in message
news:erOtp%23OlEHA.3356@.TK2MSFTNGP15.phx.gbl...
> wrote it off as identical to executing the SQL statement in EM--SQL is
SQL,
> darn it. :-) To answer your question, open the SQL view on any query and
> type away.
SQL is SQL, but EM pre-parses the SQL according to its own rules when
you go into that SQL view mode. I recommend only using EM for
administrative tools (e.g. adding Agent jobs), and use QA for everything
else. It's a far superior tool.|||Yes, apparently this statement must be run in Query Analyzer. Thank you for
the quick reply.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lU5I9OlEHA.896@.TK2MSFTNGP12.phx.gbl...
> Below is a copy& paste from what I just executed in Query Analyzer:
> BACKUP LOG pubs WITH TRUNCATE_ONLY
> Can you copy your exact command you executed? Also, try executing it from
Query Analyzer.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mailing Lists" <ml010241@.berkea.com> wrote in message
news:erRGwuOlEHA.896@.TK2MSFTNGP12.phx.gbl...
> > SQL Server2K, SP3a. Attempt to run in EM:
> >
> > BACKUP LOG <database_name> WITH TRUNCATE_ONLY
> >
> > The error returned is:
> >
> > [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near
> > 'WITHTRUNCATE_ONLY'.
> >
> > The two keywords are concatenated in the error message, as shown above.
> > Database name works in other statements. Command is straight out of
books
> > online! Have searched web & news groups (1 hit at a pay site).
> >
> > Many thanks for any info/help.
> >
> >
>|||After this "amusing" detour I couldn't agree more--thanks again!
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:OHYMUAPlEHA.952@.TK2MSFTNGP14.phx.gbl...
> "Mailing Lists" <ml010241@.berkea.com> wrote in message
> news:erOtp%23OlEHA.3356@.TK2MSFTNGP15.phx.gbl...
> > wrote it off as identical to executing the SQL statement in EM--SQL is
> SQL,
> > darn it. :-) To answer your question, open the SQL view on any query
and
> > type away.
> SQL is SQL, but EM pre-parses the SQL according to its own rules when
> you go into that SQL view mode. I recommend only using EM for
> administrative tools (e.g. adding Agent jobs), and use QA for everything
> else. It's a far superior tool.
>
Thursday, February 16, 2012
BACKUP LOG <database name> WITH TRUNCATE_ONLY failing
Labels:
attempt,
backup,
database,
error,
failing,
log,
ltdatabase,
ltdatabase_namegt,
microsoft,
microsoftodbc,
mysql,
namegt,
oracle,
returned,
run,
server,
server2k,
sp3a,
sql,
truncate_only
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment