Help !!!!

  • I dont know whether this is group is the right place to post this question.

    I am having a stored procedure and i want to schedule its execution. how i should go about doing this ?

    Thanks in advance

  • Launch Enterprise Manager and navigate to Management/SQL Server Agent/Jobs. Right-click in the Jobs window and select 'New Job'. Give the job a name and click on the Steps tab. Click on the 'New' button to create a step, give the step a name, ensure the 'Type' is set to Transact-SQL, the database context is correct and in the command section, type

    exec [your procname]

    Then navigate to the Schedules tab to create a new schedule - to control when the job runs. This bit should be fairly straightforward and I'll leave it to you to experiment.

    There are obviously more options and settings available when creating jobs than I have described, but this should be enough to point you in the right direction.

    Once you have created the job, you can test it manually by right-clicking and selecting run (so that you don't have to wait for the schedule to kick in).

    Finally, please ensure that the SQL Server Agent service is running - this is the service that runs scheduled tasks.

    Regards

    Phil


  • There are other ways outside of SQL Server, but Phil's method is the best (IMHO)

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply