Backup Failures.

owenhowenh Posts: 25
edited August 12, 2005 8:31AM in SQL Backup Previous Versions
I am running hte follwoing script thru the GUI and it is failing.

master..sqlbackup '-SQL "BACKUP DATABASE [AmerexImage] TO DISK = ''D:\SQLBACKUPS\Default\DailyBackups\AmerexImage\<TYPE>_<SERVER>_<DATABASE>_<DATETIME yyyymmdd hhnnss>.sqb'' WITH NAME = ''Database (AmerexImage), 8/11/2005 11:26:55 AM'', DESCRIPTION = ''Backup on 8/11/2005 11:26:55 AM Database: AmerexImage Instance: (local) Server: HOU-SQL01'', INIT, VERIFY, ERASEFILES = 20, MAILTO = ''owenh@amerexenergy.com'', COMPRESSION = 2" -E'


Error message: "Backup failed. Thread 0 Error: Error 605: Error creating backup file(s). No files could be created."


Full message being sent by email is:

Instance: (local)
Server: HOU-SQL01', INIT, VERIFY, ERASEFILES = 20, MAILTO = 'owenh@amerexenergy.com', COMPRESSION = 2
8/11/2005 11:28:08 AM:
8/11/2005 11:28:08 AM:
8/11/2005 11:28:08 AM: Thread 0 error:
Error 605: Error creating backup file(s). No files could be created.
Thread 0 warning:
Warning 600: Error creating backup file: D:\SQLBACKUPS\Default\DailyBackups\AmerexImage\<TYPE>_<SERVER>_<DATABASE>_<DATETIME yyyymmdd hhnnss>.sqb.
Warning: System error code: (The filename, directory name, or volume label syntax is incorrect)



What am I doing wrong?

Thanks.

Comments

  • I don't think you can use <TYPE>_<SERVER>_<DATABASE>_<DATETIME yyyymmdd hhnnss> in a script.

    If you replace it with <AUTO> it will use the file name format under option in the GUI. Details are in the help file under Backup Command.
  • peteypetey Posts: 2,358 New member
    rlindsay is right. You will be able to use those tags directly in a script in the next version.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Thanks everyone for responding. I look forward to the next version then. In the meantime, I will be setting up scripts that will be used to accomplish the same thing, based on examples I have seen in other posts here in the newsgroup.
Sign In or Register to comment.