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)
 sp_add_jobstep @command

Author  Topic 

Jay99

468 Posts

Posted - 2001-06-06 : 09:58:52
I am creating a job to perform trans log backups every hour. I am writing each backup out to a file 'dbName_[DATE]_[STRTTM].trn' I would like to name the files 'dbName_[DATE]_[HourOfTheDay].trn', sorta like the mysterious Database Maintenance Plan does it. Any idea how to had the JUST the hours token to @command?

In case you are wondering, I am running the backups with INIT and I only want to preserve 1 days worth of backups on the server. I have a .bat that copies them off to another machine and I need the .bat to know what the name of the backup is going to be. However, I don't want to go through the trouble of writing an sp_add_jobstep for every database for everyhour, so I can explicitly name the files.



Jay

Jay
   

- Advertisement -