SQL Agent did not work consistently

  • I set up a job in the SQL Agent to run the stored procedure(to count how many people to access one webpage in my site by counting the table around ten one month) since I do not want to set up SQL mail client on my database server. It worked a couple days. Then I tried to access the webpage, the job did not work any more. I tested the stored procedure and it work fine. But the job gave me failure error message. if I run the exec on the server. it worked.

    My job step is exec  dbo.sp_SMTPemail 'fliao@holyredeemer.com'

    Any clue ? Thanks.

     

  • Hi Frances,

    what was the failure message you received please? If your job step is using email then check that the email account is still accessible to the stored procedure.

    David

    If it ain't broke, don't fix it...

  • I do not know. I checked the application event log. It just gave me  a error without any message. I run the email stored procedure(which have nested stored procedure in the query analayer , it work.  what do you mean here  using email then check that the email account is still accessible to the stored procedure.

    The email account is dbadmin. should it be a issue ? Thanks.

  • What account is the web page using to run the job? What rights does it have?

    Also, if the job is started, you should be able to right click and get the history and show all steps.

    Why doesn't the web page just call the sp?

  • Whenever the end user access the webpage. the asp add the record to the database. I just need to run the stored procedure to get the previous month count from the table. It did not have anything to do with the website. If the web page call the sp. It need a event or you think I soon set the timer in the web application. The job history just show fail. It is one step job. so...

     

    Thanks.

  • If the web page has nothing to do with the job, not sure what the relationship is. Does the web page do more than run an insert and then need a select?

    I'm confused as to why a job is used instead of just querying the table?

  • job just some automatically email the count to some one. (query result). I can start the job but just did not automatically right now.

     

     

Viewing 7 posts - 1 through 6 (of 6 total)

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