Solved

How to schedule sql update query

Posted on 2010-08-26
17
445 Views
Last Modified: 2012-05-10
what is the best way to schedule a SQl update query
0
Comment
Question by:dougdog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 3
  • +1
17 Comments
 
LVL 9

Accepted Solution

by:
Tomas Valenta earned 250 total points
ID: 33529578
by job in SQLAgent (SQL Management Studio)
0
 
LVL 3

Expert Comment

by:sasi_kmr
ID: 33529581
put the query in sql format and save it has batch file.

scheduler it in task scheduler.


thanks,
$a$i
0
 
LVL 19

Assisted Solution

by:Bhavesh Shah
Bhavesh Shah earned 250 total points
ID: 33529803

Complete Info on Schduling SQL Query via Job

http://msdn.microsoft.com/en-us/library/ms191439.aspx
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:dougdog
ID: 33529810
u mean just copy the query and paste in into notepad and save it as a .bat
0
 
LVL 3

Expert Comment

by:sasi_kmr
ID: 33529827
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
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33529880
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
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33529888

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

If query contain some crucial information,is it BEST solution to use?
0
 

Author Comment

by:dougdog
ID: 33529901
can it report everyday if it runs
0
 

Author Comment

by:dougdog
ID: 33529991
when i click new job where do i enter the sql script
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33530057
When you creating new job,

you need to create steps.where you need to wrote your sql query.
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33530066

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
 

Author Comment

by:dougdog
ID: 33530079
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
 
LVL 9

Expert Comment

by:Tomas Valenta
ID: 33530085
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
 
LVL 9

Expert Comment

by:Tomas Valenta
ID: 33530121
under Operators tab create operator and then this is visible in dropdown list in Notification
0
 

Author Comment

by:dougdog
ID: 33530236
im setting up the database mail now is it safe to restart sql agent live
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33530282
do it with permission of your dba.
if its development environment then i dont think there should be any issue.
0
 

Author Closing Comment

by:dougdog
ID: 33531573
excellent
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
query optimization 6 30
Why is this SQL bringing back extra rows? (parsing XML data) 4 66
What is needed to become a DBA? 7 54
Search Text in Views 2 27
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question