What are the challenges you face when working across database platforms? Take the survey

Problem Restoring Logs

BigAndyBigAndy Posts: 4
edited August 8, 2005 3:54PM in SQL Backup Previous Versions
ok, I'm setting up log shipping using SQLBackup. I have the backup job running.
"C:\Program Files\Red Gate\SQL Backup\SqlBackupC.exe" -SQL "RESTORE LOG [Mariana] FROM DISK = 'E:\TransLogs\*.sqb' WITH MOVETO = 'E:\TransLogs\Processed\'"
will restore the logs but no leave the DB in read-only mode for future log restores.

Modified the code to
"C:\Program Files\Red Gate\SQL Backup\SqlBackupC.exe" -SQL "RESTORE LOG [Mariana] FROM DISK = 'E:\TransLogs\*.sqb' WITH MOVET0 = 'E:\TransLogs\Processed\', STANDBY = 'E:\MSSQL\BACKUP\UNDO_Mariana.DAT'"
and ran in a command window which returned the following
SQL Backup 3.2.0, (c) Red Gate Software Ltd 2004 - 2005
Trial - 13 days remaining

Syntax error: MOVET0 after ,

I've looked in the help file, and even had a developer look over the code and have not found where my error is.

Would some one please take a look and give me some insight as to what is going on. I have not found where the UI generates the MOVETO code along with the STANDBY code, so at this point I'm just beating my head against the wall.

Thanks in Advance.



  • Options
    peteypetey Posts: 2,358 New member
    I'm guessing that one or more of the trx log backup files has a name that contains characters that confuses the SQL Backup syntax parser.

    When you were testing with and without the STANDBY command, were you testing with the same set of files?

    If it's ok and not too large, perhaps you could post the list of files here?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    Yes I did test with the same set of inital files.
    Full backup:
    FULL_(local)_Mariana_20050805 142652.sqb (used GUI create/restore)
    this is located @ E:\ on the secondary server.

    Here is a short list of the trx logs.
    E:\TransLogsLOG_(local)_Mariana_20050805 154418.sqb
    LOG_(local)_Mariana_20050805 161254.sqb
    LOG_(local)_Mariana_20050805 164836.sqb
    LOG_(local)_Mariana_20050805 170001.sqb
    LOG_(local)_Mariana_20050805 171500.sqb
    LOG_(local)_Mariana_20050805 173002.sqb
    LOG_(local)_Mariana_20050805 174504.sqb

    This is the code the I have running on the primary machine to create the trx logs. (modified from red-gate's site)
    "C:\Program Files\Red Gate\SQL Backup\SqlBackupC.exe" -SQL "BACKUP LOG [Mariana]  TO DISK = 'E:\TransLogs\<AUTO>' WITH COPYTO = '\\mos\translogs\'"

    Thanks again,
  • Options
    It looks like you have WITH MOVET0 (with a zero) instead of WITH MOVETO in your mofidied code.
  • Options
    Ok, I blame fat finger syndrome, and the other developer. Had 0 (zero) in to. Changed everything to lower case to remove the proplem. Thanks rlindsay.
Sign In or Register to comment.