Syntax error?

  • backup log 030 with truncate_only

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '030'.

    Can any1 tell me, what is wrong here?!

    Greetz,
    Hans Brouwer

  • If 030 is the name of the database, it needs to be in square brackets - [030]

    That said, why are you truncating your logs? If you don't care about point-in-time recovery, set the database recovery model to simple and forget about the logs.

    If you do care about point-in-time recovery, make sure that you have regular log backups.

    Truncating the log breaks the log chain and will leave you unable to restore past that point until you do anothe full backup.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Tnx, brackets, so simple.

    As for the rest of your comments: you are absolutely right. There is a reason, trust me. Takes too long to explain here.

    Greetz,
    Hans Brouwer

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply