Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003

    Unanswered: Request a web page from SQL Server


    I want to request a webpage from sql server every hour.

    I tried to make a job which contains a single ActiveX step.
    I select VBScript and type

    Dim Http
    Set Http = CreateObject("Microsoft.XMLHTTP")
    Http.Open "GET", "http://localhost/updater_watch.aspx", False
    Set Http = Nothing

    I set a schedule and on every execution I get an error in the event log.

    Event Type: Warning
    Event Source: SQLSERVERAGENT
    Event Category: Job Engine
    Event ID: 208
    Date: 8/11/2003
    Time: 8:15:00 PM
    User: N/A
    Computer: NEXUS
    SQL Server Scheduled Job 'updater' (0x444D7F519E70534C9EF81B1570382AEE) - Status: Failed - Invoked on: 2003-08-11 20:15:00 - Message: The job failed. The Job was invoked by Schedule 1 (s1). The last step to run was step 1 (invoke).

    Is this the right way to do this task? When I execute the VBScript without the sql server, it runs without a problem.

    Thanks, Panayot

  2. #2
    Join Date
    Apr 2003
    Washington DC area


    Why not set it up as a ongoing job?

  3. #3
    Join Date
    Aug 2003
    Thanks for the reply garrydawkins,

    that is what I have done.
    I open eterprise manager and go to management-sql server agent-jobs-new job.
    Then create the job, set a its type to activex, make a schedule to execute it every hour. it executes but exits with error. I suspect that it cannot create the xmlhttp object properly in the VB code.

    If I only leave two simple statements:

    dim somevar
    set somevar = nothing

    then the job exits with success.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts