Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Back up - scheduled job

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2006-02-08 : 10:07:45
I am trying to schedule the full backup job ( occurs twice everyday).
Below is the script that I am using for the back up job.

BACKUP DATABASE RAIWeb
TO DISK='C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\App1.bak'

I'd like to automatically change the name of backup file to App1 + the date and time that back up occurs + .bak

i.e. App10208061130.bak

How can I do this?


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-02-08 : 12:32:30
You can check out the code in the backup script that I wrote:
http://weblogs.sqlteam.com/tarad/archive/2004/08/04/1876.aspx

And here's all of my scripts on my blog:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx

Tara Kizer
aka tduggan
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-02-08 : 17:40:41
And
http://www.nigelrivett.net/SQLAdmin/BackupAllDatabases.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -