Saturday, February 25, 2012

Schedule dabase backup

Hi,
Is it possible to schedule a database backup with SQL 2000?
I would like a script which would be run weekly and the backup file would be
in the format: ..\backupYYYY_MM_DD.rtf
Thanks,
GeorgesYep
You can either use the Maintenance plans or roll your own statement. With
your own statement you would simply add it to a job and apply your schedule
using SQL Server Agent
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Georges" <gvautherin@.hotmail.com> wrote in message
news:u3yS6bxPDHA.1336@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Is it possible to schedule a database backup with SQL 2000?
> I would like a script which would be run weekly and the backup file would
be
> in the format: ..\backupYYYY_MM_DD.rtf
> Thanks,
> Georges
>|||put the following code in a stored procedure whereby you can dynamically
generate backup filename. Schedule this stored procedure using SQL job.
Ex:
DECLARE @.bkp varchar(500)
SET @.bkp = 'BACKUP DATABASE Pubs TO DISK=''C:\MSSQL7\Backup\' +
CONVERT(varchar(25),GETDATE(), 112) + '.RTF'''
EXEC(@.bkp)
-Vishal
"Georges" <gvautherin@.hotmail.com> wrote in message
news:u3yS6bxPDHA.1336@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Is it possible to schedule a database backup with SQL 2000?
> I would like a script which would be run weekly and the backup file would
be
> in the format: ..\backupYYYY_MM_DD.rtf
> Thanks,
> Georges
>

No comments:

Post a Comment