Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    5

    Unanswered: Backup MSDE database

    Hi,

    we have about 12 databases in an MSDE server.

    We can install the enterprise manager, but cant get the maintenance plans to work. (fields stay empty and setting dont get saved)
    I've searched a bit, but couldn't fix it.

    No problem, i created a job, with 12 T-SQL commands, and the backups are working perfect.

    Now we wanne backup with a history (we take a backup every 4 hours of the day), because now they always get overwritten.

    So im trying to change my transactSQL to create dynamic files.

    The code i'm using right now :
    Code:
    BACKUP DATABASE PW0001A00 TO DISK = 'C:\SQLBACKUP\PW0001A00.BAK' WITH INIT, NOUNLOAD, NOSKIP, STATS=10, NOFORMAT
    I've tried different things like
    Code:
    BACKUP DATABASE PW0001A00 TO DISK = 'C:\SQLBACKUP\PW0001A00' + DATEPART(month, GETDATE()) + '.BAK' WITH INIT, NOUNLOAD, NOSKIP, STATS=10, NOFORMAT
    but nothing worked.

    so basically I wanne be able to create dynamic filenames in the above command.

    You got any ideas/solutions.

    tnx.

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Take Umachander's http://www.umachandar.com/technical/...pts/Main30.htm solution in this case.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Apr 2006
    Posts
    5
    thank you.

    i'll try that solution. looks good. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •