i have to restore database from production bakup to development
everyday, there is a program which does this bakup and names the file
like PROD_20070523.BAK based on the date.
is there any way to run this with SQL agent and make sure everytime
the current file is backed up. can i rename the file to a different
name everyday automatically.
Also this file is a zip file so can i unzip this automatically.
Yes you can run this using a job in SQL Agent and you can name the name using
a datetime stamp. I do all my backups this way. Then you can run code to
delete the older files. If you want to copy then to another server everyday,
I do this as a VBScript that is called by a SQL Agent job but you could use a
DOS copy command executed by xp_cmdshell as well. Many Zip programs have a
command line interface (not the one that comes with Windows XP but others) so
you could script this as well via xp_cmdshell.
"ashley.sql@.gmail.com" wrote:
> i have to restore database from production bakup to development
> everyday, there is a program which does this bakup and names the file
> like PROD_20070523.BAK based on the date.
> is there any way to run this with SQL agent and make sure everytime
> the current file is backed up. can i rename the file to a different
> name everyday automatically.
> Also this file is a zip file so can i unzip this automatically.
>
No comments:
Post a Comment