Home Forums SQL Server 2005 Backups How take backup without overwriting or Appending the old files RE: How take backup without overwriting or Appending the old files

  • robgilbie (1/12/2012)


    For example in 2008 to append the machine name, date and time to a backup file name the script would look like this:

    backup database MSDB to disk = N'c:\sql backup\MSDB_$(ESCAPE_NONE(MACH))_$(ESCAPE_NONE(DATE))_$(ESCAPE_NONE(TIME)).BAK'

    go

    ...

    For a full list of tokens in job steps see the following link:

    http://msdn.microsoft.com/en-us/library/ms175575.aspx%5B/quote%5D

    Very helpful and useful. I've never seen "ESCAPE_NONE" or the other job tokens before. Thanks a bunch!

    Mike Hinds Lead Database Administrator1st Source BankMCP, MCTS