Re: SQL Server Backup

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 05/14/04


Date: Fri, 14 May 2004 09:27:04 +0530

Hi,

Rather than using the Maintenance plan I suggest you to write a small batch
file perform the backup.

Contents inside batch file:- (Backup.bat)

del c:\backup\dbname_old.bak
copy c:\backup\dbname.bak c:\backup\dbname_old.bak
OSQL -Usa -Ppassword -S
Servername -ic:\backup\backup.sql -oc:\backup\backup.log

(Save the file as backup.bat)

Inside the backup.sql

backup database dbname to disk='c:\backup\dbname.bak' with init

How to schedule
--------------------

In Enterprise manager, SQL Agent , Jobs , Schedule this Backup.bat file to
execute daily once.

Note:

Ensure that SQL Agent service is running

Thanks
Hari
MCDBA

"Peter" <anonymous@discussions.microsoft.com> wrote in message
news:cdad01c43958$8b0ff2c0$a101280a@phx.gbl...
> We would like to keep only 1 copy of database backup as we
> run out of disk space.
>
> However, if we choose "Remove Files Older than 1 Day" in
> the Database Maintenance Plan, it will remove the previous
> day backup even though last night backup is not successful.
>
> Is there any suggestion ?
>



Relevant Pages

  • Re: Full vs Simple Database Model?
    ... How do the individual steps of the maintenance task on the test database ... I simply restore from a backup. ... I note that you don't rebuild the indexes on the test ... the maintenance plan for the Live system consists of: ...
    (microsoft.public.sqlserver.setup)
  • Re: Event log error message: Database log truncated: Database
    ... our maintenance plan combines both master and the User ... It also selects Transaction Log Backup option. ... back up the database as part of the maintenance plan and etc) ...
    (microsoft.public.sqlserver.server)
  • Full vs Simple Database Model?
    ... Periodically I restore a backup of the Live data to the Test database to ... the maintenance plan for the Live system consists of: ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 2008 Workgroup Scheduled Backup
    ... the "Execute SQL Agent Job" is just showing you the command to use in a SQL Agent job to start another job. ... You have to design your plans, for example, depending on your database sizes, retention of backups, recovery models, how critical a database is, et cetera: ... Database Differential Backup - daily ... I cannot execute a maintenance plan in this version because it does not come with SQL Integration Services.so I'm trying to setup a scheduled job in SQL Server Agent. ...
    (microsoft.public.sqlserver.server)
  • Re: Full vs Simple Database Model?
    ... I note that you don't rebuild the indexes on the test ... would expect this would slow down the test database maintenance further - ... Periodically I restore a backup of the Live data to the Test database to ... the maintenance plan for the Live system consists of: ...
    (microsoft.public.sqlserver.setup)