"bryja_klaudiusz[at]poczta[dot]fm" <dl*@zmyly.pl> wrote in message news:<ce**********@nemesis.news.tpi.pl>...
Hi,
How to automate database backup (MSDE server v8.0)? Is some free tool
which can help on this or can I use some stored procedure? Plan:
Complete - 1 per week
Differential - 1 per day
Here's a skeleton process you can alter to suit your needs, with the
database up.
MSDE doesn't have maint. plans, but it comes with SQL Agent to
schedule things. Connect from Ent. Mgr. on another server and create
a job with two steps (if you don't have EM at all somwhere in your
shop, this won't work for you I guess). First step fires off an OS
command batch file on your target server that looks like this :
rem this file is used for the MSDE backup process zjec june '03
ren d:\mssql7\backup\master.002 master.003
ren d:\mssql7\backup\master.001 master.002
ren d:\mssql7\backup\master.bak master.001
del d:\mssql7\backup\master.003
Second step is a T-SQL step that looks like :
BACKUP DATABASE master TO DISK = 'd:\mssql7\backup\master.bak'
You can see I keep 3 versions. You will have to manually step through
the process as you are setting up the process if you want versions.
If you don't want versions, just issue the delete.
You would probably want two jobs, one for full, other for incr, or you
could get fancy with the scheduling on one job.
Alternately, use a free crontab scheduler to shut your db instance
down and use a similar process to copy the .mdb / .ldb to another
location.
HTH
cold_ronald