Easwaran Paramasivam
asked on
How to work with SQL Job?
Hi Experts,
I would like to know how to create jobs in sql and how to run time at scheduled time recursively? Please do explain with example. Thanks.
I would like to know how to create jobs in sql and how to run time at scheduled time recursively? Please do explain with example. Thanks.
ASKER
I would like to create a backup script. I would like to run on every Monday morning 10 am using sql server jobs. How to achieve that?
Create a script sql and save it to a file with .sql
Execute it with task planified an sql agent :
script.slq :
run.vbs
Execute it with task planified an sql agent :
script.slq :
UPDATE config
SET [valeur] = CONVERT(VARCHAR(24),GETDATE(),103)
WHERE param = 'stat_vrp_date_derniere_modification'
run.vbs
sqlcmd -S server ip\SQLEXPRESS -U user -P password -i "d:\script.sql" , 1,true
manumd,
I don't see how that can do what is requested here, so I presume it was intended for another question?
EaswaranP:
to create a backup script, you create a maintenance plan, where you can configure all you need with the sql server's gui. you could also implement this from command line, but the maintenance plan's options are very suitable to do this without the hassle of doing it via command line.
I don't see how that can do what is requested here, so I presume it was intended for another question?
EaswaranP:
to create a backup script, you create a maintenance plan, where you can configure all you need with the sql server's gui. you could also implement this from command line, but the maintenance plan's options are very suitable to do this without the hassle of doing it via command line.
If you want to do it manually with step by step you can do it using below screens in given link.....
http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx
if you want to add it using sql script you can perform it using below link..
http://msdn.microsoft.com/en-us/library/ms187910.aspx
http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx
if you want to add it using sql script you can perform it using below link..
http://msdn.microsoft.com/en-us/library/ms187910.aspx
see this google search to find even some youtube videos that show how to do it:
https://www.google.be/search?q=sql+2005+maintenance+backup&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a
https://www.google.be/search?q=sql+2005+maintenance+backup&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a
ASKER
Execute it with task planified an sql agent - How to achieve this? Please do explain the steps. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's an a example banane
Please refer this link.
http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx
http://cherupally.blogspot.in/2009/04/schedule-daily-backup-for-sql-server_27.html
http://www.orcsweb.com/blog/jeremy/automating-database-backups-with-microsoft-sql-server-2005-express-edition/
Thanks.
http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx
http://cherupally.blogspot.in/2009/04/schedule-daily-backup-for-sql-server_27.html
http://www.orcsweb.com/blog/jeremy/automating-database-backups-with-microsoft-sql-server-2005-express-edition/
Thanks.
ASKER
Thanks.
I mean, what exactly is the problem?