Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 execute a stored procedure automatically

Author  Topic 

sonia123
Starting Member

7 Posts

Posted - 2005-05-04 : 06:27:32
sir/madam,
how to execute a stored procedure automatically, every first day of the month
thank u

mr_mist
Grunnio

1870 Posts

Posted - 2005-05-04 : 06:32:39
Schedule it as a step in a job.

-------
Moo. :)
Go to Top of Page

sonia123
Starting Member

7 Posts

Posted - 2005-05-04 : 06:35:18
how to schedule?
Go to Top of Page

sonia123
Starting Member

7 Posts

Posted - 2005-05-04 : 06:38:21
i need details regarding how to schedule a job (that too a user defined stored procedure)
thank u
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-05-04 : 06:55:50
check create jobs in BOL

if you already have a job, just double click on the job and goto the schedule tab

HTH

--------------------
keeping it simple...
Go to Top of Page

sonia123
Starting Member

7 Posts

Posted - 2005-05-04 : 08:08:10
I hav to create a new job. Is there any set of code to create a job?
In books online they hav provided the below details
To create a job
  • Execute sp_add_job to create a job.
  • Execute sp_add_jobstep to create one or more job steps
  • Execute sp_add_jobschedule to create a job schedule



how to proceed futher? i cant understand how to create a job?
thank u
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-05-04 : 08:58:18
Are you the DBA? If not, I suggest that you ask your DBA for help.

Otherwise. Go into Enterprise Manager, expand the SQL Agent for the server, click Jobs, find the menu option to create a new job. Within the job steps tab put the name of your stored procedure. Go to the schedule tab, create a new schedule for the job for every month on the 1st day. Enable the job.

-------
Moo. :)
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-05-04 : 23:16:56
you're on the right track

follow the steps you've just enumerated, practice, practice and practice, you'll get the hang of it.


quote:
Originally posted by sonia123

I hav to create a new job. Is there any set of code to create a job?
In books online they hav provided the below details
To create a job
  • Execute sp_add_job to create a job.
  • Execute sp_add_jobstep to create one or more job steps
  • Execute sp_add_jobschedule to create a job schedule



how to proceed futher? i cant understand how to create a job?
thank u



--------------------
keeping it simple...
Go to Top of Page

chetankelkar
Starting Member

5 Posts

Posted - 2005-05-11 : 05:09:26
Is their any method by which we can create a job through code instead of manual steps as above. What I mean is can we create a SQL Job by running a ASP / PHP script?



Chetan Kelkar
Go to Top of Page
   

- Advertisement -