Friday, March 9, 2012

open a web page through SQL SQL job

Hi all,

now, i create a job to open a page on timely basis. The job's Vb script is like that:

Dim WshShell
Set WshShell =CreateObject("WScript.Shell")
WshShell.Run ("http://www.google.com")
Set WsShell = Nothing


when i run that job, i got that error:

The job succeeded. The Job was invoked by User host\username. The last step to run was step 1 (Step 1).


how can i solve it? i still don't know whether that script will open a webpage or not

The following script opens a webpage in a VBS Script:

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://www.google.com"
Set WsShell = Nothing

|||

I think that one will work in web page. But, now i m trying in SQL job. I have tried with that code. But, nothing happen.

regards,

|||It seems to be impossible to open a website through SQL Server, neither using SQL Agent Job (ActiveX script task), nor using xp_cmdshell. I tried both, and the IEXPLORER process can be started (you can check in Task Manager) and then hung, waiting for some response. I guess this is becausexp_cmdshell operates synchronously. Control is not returned until the command shell command completes. And the SQL Server can't proceed with reponse from IEXPLORER process so both IEXPLORER and SQL Server hangs.|||so, how abt calling a bat file. And then, through bat file, call the web page. is it the possible way?

No comments:

Post a Comment