5

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.

Jon Seigel
  • 16,922
  • 6
  • 45
  • 85
user28490
  • 51
  • 1
  • 1
  • 2

4 Answers4

8

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

Kin Shah
  • 62,545
  • 6
  • 124
  • 245
6

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?

Hannah Vernon
  • 70,928
  • 22
  • 177
  • 323
2

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.

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

Kahn
  • 1,803
  • 2
  • 20
  • 28
-1

The answer to the question "How to make a stored procedure automatic with execution parameters" in Sql server is simple, we will only have to go to the SQL server Agent, "New" -> "Job" -> we will use three tabs "General"," Steps","Schedules" in "General" we will only give it a name, "Steps" ->"New" and here we will have to add the execute of the stored procedure, "Schedules" we make the execution time parameters and save, I hope this is of help to someone, greetings