Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Can you please help me how to execute a stored procedure automatically in SQL database without any transaction in SQL? I want to execute on particular fix time.

share|improve this question
1  
What database system are you using? SQL Server (Microsoft), MySQL, other? Please edit your question to add a tag for that. Also, what have you tried so far, what did you find in your research and why didn't that work? –  Mat Sep 20 '13 at 5:52
    
It's a stored procedure - a procedure stored inside your database system. It has nothing to do with a "store" per se ... –  marc_s Sep 20 '13 at 8:31
    
how about this? stackoverflow.com/a/8688446/2186023 and then just let task scheduler take control of that... –  DrCopyPaste Sep 20 '13 at 8:45
1  
And you can not execute anything in SQL without a transaction. ANYTHING is in a transaction - explicit or implicit. –  TomTom Sep 20 '13 at 9:13
    
Cross-site duplicate of stackoverflow.com/q/4079363/164901 -- I recently implemented the Service Broker solution for one of our projects here, and I can tell you that it's not exactly newbie-friendly. It is a great solution, though. –  Jon Seigel Sep 20 '13 at 13:31

3 Answers 3

If you are not comfortable using Powershell, then you can go for native service broker functionality.

share|improve this answer
    
+1 for sqlcmd - I always forget about that! –  Max Vernon Sep 20 '13 at 16:48

With SQL Server Express, you could use powershell to execute a stored procedure automatically through Windows scheduler service.

There is a great article that shows how to use Powershell to EXEC stored procedures here:

http://www.maxtblog.com/2010/10/basic-sql-server-stored-procedure-scripting-with-powershell/

You can also look at this question that deals with using Powershell:

Is there any collection of PowerShell scripts that help the task of SQL Server maintenance?

share|improve this answer
    
Yes i am using sql server r2 express edition so how to execute store procedure...???? –  user28490 Sep 20 '13 at 4:56
    
Start reading the answer, you know. There are links there to more help. –  TomTom Sep 20 '13 at 9:14

Not sure what you mean by "without any transaction". But normally timed scripts / tasks are executed as jobs, through the SQL Server Agent. See here for an example and explanation.

http://stackoverflow.com/questions/1216272/how-to-execute-a-stored-procedure-in-a-sql-agent-job

share|improve this answer
    
@Khan SQL Agent is not available in Express edition. –  Kin Sep 20 '13 at 13:03
    
Ah, tags. Good point. :) –  Kahn Sep 23 '13 at 4:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.