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

Issues with creating jobs in Enterprise Manager

webgswebgs Posts: 2
edited July 20, 2005 6:55PM in SQL Backup Previous Versions
I've created a job to run a differential backup on a database. I've used the TSQL script generated by SQL Backup. Here's the resulting script:

master..sqlbackup '-SQL "BACKUP DATABASE [DBMon] TO DISK = ''F:\SQLDump\SQLBackup\DIFF_MNFOODS_DBMon_<DATETIME yyyymmdd hhnnss>.sqb'' WITH NAME = ''Database (DBMon), 7/20/2005 10:36:39 AM'', DESCRIPTION = ''Backup on 7/20/2005 10:36:39 AM Database: DBMon Instance: MNFOODS Server: SERVER'', DIFFERENTIAL, COMPRESSION = 1" -E -I MNFOODS'

Here's the error it produces when testing with query analyzer:

Output from SQL Backup (3.2.0)
SQL Backup 3.2.0, (c) Red Gate Software Ltd 2004 - 2005
Trial - 7 days remaining
Backing up DBMon (differential database) on MNFOODS instance to F:\SQLDump\SQLBackup\DIFF_MNFOODS_DBMon_<DATETIME yyyymmdd hhnns
Thread 0 error:
Error 605: Error creating backup file(s). No files could be created.
Thread 0 warning:
Warning 600: Error creating backup file: F:\SQLDump\SQLBackup\DIFF_MNFOODS_DBMon_<DATETIME yyyymmdd hhnnss>.sqb.
Warning: System error code: (The filename, directory name, or volume label syntax is incorrect)
Msg 3013, Level 16, State 1, Server SERVER\MNFOODS, Line 1
BACKUP DATABASE is terminating abnormally.

(10 row(s) affected)

I need to populate the "<DATETIME yyyymmdd hhnnss>" portion of the file name so it works with SQL. I would also like to populate the current date in the "Name" and "Description" areas of the script.

Any help would be appreciated.

Thank you!

Comments

  • Options
    peteypetey Posts: 2,358 New member
    SQL Backup doesn't accept tags directly. It will only look for the <AUTO> tag, and use your settings for the 'Backup folder' and 'File name format' as defined by you from the GUI.

    In your example, you could define your 'Backup folder' as 'F:\SQLDump\SQLBackup' and your file name format as '<TYPE>_<SERVER>_<DATABASE>_<DATETIME yyyymmdd hhnnss>.sqb'.

    Presently, SQL Backup does not replace tags for the 'Name' and 'Description' values.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.