var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
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
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
Time: 8:15:00 PM
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.
Why not set it up as a ongoing job?
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:
set somevar = nothing
then the job exits with success.