[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

How to schedule sql update query

what is the best way to schedule a SQl update query
0
dougdog
Asked:
dougdog
  • 6
  • 6
  • 3
  • +1
2 Solutions
 
Tomas ValentaIT ManagerCommented:
by job in SQLAgent (SQL Management Studio)
0
 
sasi_kmrCommented:
put the query in sql format and save it has batch file.

scheduler it in task scheduler.


thanks,
$a$i
0
 
Bhavesh ShahLead AnalysistCommented:

Complete Info on Schduling SQL Query via Job

http://msdn.microsoft.com/en-us/library/ms191439.aspx
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
dougdogAuthor Commented:
u mean just copy the query and paste in into notepad and save it as a .bat
0
 
sasi_kmrCommented:
copy the query and save it as .sql file.

then put the sql file in a .bat file and put it in the task scheduler.

thanks,
$a$i
0
 
Bhavesh ShahLead AnalysistCommented:
Hi,

Task Schduler can be opend by any one....

Plus he need to put command inside bat file

When Microsoft SQL SERVER HAVING JOB Facility then why should we go for task schduler?

Please explain SASI
0
 
Bhavesh ShahLead AnalysistCommented:

Moreover, if query execution fails, will task schudler give you log?

If query contain some crucial information,is it BEST solution to use?
0
 
dougdogAuthor Commented:
can it report everyday if it runs
0
 
dougdogAuthor Commented:
when i click new job where do i enter the sql script
0
 
Bhavesh ShahLead AnalysistCommented:
When you creating new job,

you need to create steps.where you need to wrote your sql query.
0
 
Bhavesh ShahLead AnalysistCommented:

Please chect out this link.
This will guide you step by step.

http://www.dailycoding.com/Posts/step_by_step_guide_to_add_a_sql_job_in_sql_server_2005.aspx
0
 
dougdogAuthor Commented:
ok got it how can i get it to email me when job fails and when job completes
i can see email tab but cant enter address
0
 
Tomas ValentaIT ManagerCommented:
create job by SQL Management Studio/SQL Server Agent/Jobs, here create new one, sql commands add to the Step section, then you can create schedule, alerts, notification, what you want.
0
 
Tomas ValentaIT ManagerCommented:
under Operators tab create operator and then this is visible in dropdown list in Notification
0
 
dougdogAuthor Commented:
im setting up the database mail now is it safe to restart sql agent live
0
 
Bhavesh ShahLead AnalysistCommented:
do it with permission of your dba.
if its development environment then i dont think there should be any issue.
0
 
dougdogAuthor Commented:
excellent
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 6
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now