Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Mon, 30 Jun 2008 12:19:06 -0700 (PDT),    group: microsoft.public.sqlserver.newusers        back       


sql agent JOB to Backup Database and Maintain Backup Files   
Hi friends,

How can I create ONE SQL Agent JOB That will 2 activities: (Using SQL
2005)

1) Backup a specified Database (Full Backup) and store the backup file
in a Specified FOLDER.
2) Manage the Backup Files in the FOLDER, ie. Delete the files that
are 5 week OLD.

I want to schedule the JOB to run every Sunday.

I am able to do this using the SQL Server Maintenance Plan and that
creates a Job. But that JOB refers to the maintenance plan package.
Which I dont want to be depended on.

Please suggest.
date: Mon, 30 Jun 2008 12:19:06 -0700 (PDT)   author:   Prabhat

Re: sql agent JOB to Backup Database and Maintain Backup Files   
Prabhat,

If you search around a number of folks have provided scripts to do this sort 
of thing.

Nigel Rivett: http://www.nigelrivett.net/SQLAdmin/BackupAllDatabases.html
Ola Hallengren: 
http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/62380/
MD: http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/31932/

There are others, but this should get you started.

RLF

"Prabhat"  wrote in message 
news:e6e8160a-fdf0-4d4c-ac1e-eae2c05bee23@u6g2000prc.googlegroups.com...
> Hi friends,
>
> How can I create ONE SQL Agent JOB That will 2 activities: (Using SQL
> 2005)
>
> 1) Backup a specified Database (Full Backup) and store the backup file
> in a Specified FOLDER.
> 2) Manage the Backup Files in the FOLDER, ie. Delete the files that
> are 5 week OLD.
>
> I want to schedule the JOB to run every Sunday.
>
> I am able to do this using the SQL Server Maintenance Plan and that
> creates a Job. But that JOB refers to the maintenance plan package.
> Which I dont want to be depended on.
>
> Please suggest.
date: Wed, 2 Jul 2008 09:03:05 -0400   author:   Russell Fields

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us