Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scheduled job with stored procedure?

Status
Not open for further replies.

moroeh

Programmer
Oct 22, 2001
25
ES
Hello:

I need to do a scheduled job that must run every day at 0:00. I tried to do it with SQL SERVER enterprise manager, but the server we have is shared with some other clients and the server Admin told me we have no permits to do scheduled jobs (because of security problems).

The question is:

Is there anyway to do a scheduled job with stored procedures or so? My problem is that I am quite new to SQL SERVER and have no idea of doing stored procedures. Can anyone help me with this one?

Thanks in advance,

Good bye
 
What i do is i create a vbs file (vb script file) and call the stored prc from there.
a vbs file is simply a asp file but without the <% %> and other html tags....

when you have created the vbs file .. you then need to schedue it it windows task scheduler (using the cmd option)

if you need more explaining i will be happy to help....
 
Hi:

Thanks for your help, but I still have the same problem. I have no permissions in the server. I need to do someway I can execute the script on scheduled times (on the server itself).
 
ahhh i see ..
not sure if you can ... maybe some one else could throw some light your way..

sorry
 
What do you mean by &quot;I have no permissions in the server?&quot; Can you execute the stored procedure? If you can execurte the SP, how are you doing that?

The stored procedure must run on the server but if you can connect to SQL Server and execute stored procedures, you can schedule a task to run on a local PC that executes the SP on the SQL Server. If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Hi:

By &quot;I have no permissions in the server?&quot; I mean that I don't have permissions for doing scheduled jobs (for all the other things I do have permissions!), and the problem is that I don't know how to schedule a job (an stored procedure, an asp, a vbscript or whatever) to be able to do the job.

In order to run an stored procedure in the server by running it on the local PC, how can I do it?

Actually that would meant to have a machine running all day (or at least when I want to execute the UPDATEs). If there is no other choice I will do it that way, but I would like to know if there is any other choice.

Thanks again,
 
If the DBA will not set up a scheduled job, then you need scedule a task to run from some PC. You'll have to decide where that will be. Windows has a Task Scheduler that you can use. You can set up a task to run the OSQL command line utility. OSQL can execute the stored procedure on the SQL Server. This task could be run on any workstation or server that can connect to the SQL Server. Yes, whichever PC you schedule the task to run on will need to remain on around the clock.

Frankly, I don't understand why the DBA won't create a job for you. He could control it completely so there shouldn't be any security issues. If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Hi tlbroadbent:

Sorry I didn't answer before but I have been sick during the weekend and monday (nice way to spend weekend I guess) and until today I couldn't see your answer.

I have to say I have the same question you have. Why the DBA doesn't allow me to do the job. But there is no other way than doing the way they decide, so I guess I will do what you propose and find a machine that must be running all day and use it for the job.

Thanks to everybody who answered this!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top