You need to explore how to use the Windows Scheduler service.
(And that is beyond the scope of this forum.)
OR, You may wish to explore this option:
http://www.codeproject.com/vb/net/SQLAgent.asp
Thanks for your reply.iam new to the database side,what i need is i want script for automatic database backup and send me mail for every day after the backup is done succesfully or not, in sql server 2005 management studio.did you able to help me pls...........
another option may be, go for License edition like Standard /Workgroup which can fullfill all the requirement you mentioned... SQL Server express is not supporting all the features available in Licensed Editions, so you may go for license edition of sql server 2005.
Madhu
Thank you once again for your quick replies.i want to know, is there any script available for automatic database backup in sql server2005
Create a BackupDatabase.bat file which contains script as follows
1. Open notepad
2. type the follwong sql command
sqlcmd -q"Backup database Yourdatabasename to disk='d:\yourbackupname.bak' with init" -SServerName -Ulogin -Ppassword
3. Save the notepad file as BackupDatabase.bat
then you can schedule it using windows scheduller..
Read about
SQLCMD, Backup etc in BOL
Madhu
thaenu wrote:
Thank you once again for your quick replies.i want to know, is there any script available for automatic database backup in sql server2005
As we have clearly stated, YES -but NOT with SQL Server Express. Only with the 'paid' and licensed editions (Workgroup, Standard, Enterprise.)
With SQL Server Express, you will have to use one of the methods that we provided, or purchase a third party product to automatically backup your databases.
Thanks for your help.i create a script for automatic backup but i did not know is it correct or not so pls refer the script shown below and tell about that.
CREATE PROCEDURE nightlybackup
Every thing looks ok... I would say, there is no need to taking Log backup once you are taking full backup. Either remove it or create another batch file and schedule it seperately
Madhu
when i typed this following command:
schtasks/create/tn nightlybackup/tr c:\Program Files(x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\um.bak/sc daily/st 00:00:00
the following error occures:
ERROR:Invalid syntax.
type "SCHTASKS / " for usage.
what can i do for this
You can type "SCHTASKS / " and read the usage instructions for the Windows Scheduler service.
While it may actually take some time to read it rather than just have someone do if for you, it will most likely prove out to be a rewarding exprience.