Link to home
Start Free TrialLog in
Avatar of knamc
knamcFlag for United States of America

asked on

How do you schedule a stored Procedure to run daily in SQL Server Agent?

How do you schedule a stored Procedure to run daily in SQL Server Agent?

I have several stored procedures that I need to schedule to run daily, how can I do this?
Avatar of knamc
knamc
Flag of United States of America image

ASKER

I am very new to MS SQL Server.  Any help is greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of knamc

ASKER

Do I just use the execute command and the procedure name?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of knamc

ASKER

what do you mean by setting the correct database?
Avatar of knamc

ASKER

Nevermind about the db, thanks
Avatar of knamc

ASKER

Thank you from a neebie!
Avatar of knamc

ASKER

I used the resources above,  but now when I run the stored procedure from the command line I get this error?  DO I need to add connect command as a step?

Microsoft.SqlServer.ConnectionInfo "A transport error has occurred when receiving results from the server."
when you run a tsql step in your job, it will be sql server agent that connects for you (for the sql script you put) to the indicated database.