I am trying to call a VB script file with the following command,
xp_cmdshell 'cscript c:\file.vbs'
But its giving the following output -
Microsoft (R) Windows Script Host Version 5.1 for Windows
Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.
NULL
Input Error: Can not find script file "c:\file.vbs".
NULL
----
If i changed the command to
xp_cmdshell 'cscript c:file.vbs'
it gives the folowing error -
Input Error: Can not find script file "C:\WINNT\system32\file.vbs".
Actually my main intention is to call a url from the sql server where '
i can pass some value. Plz let me know if its the right step and whts
going wrong.
Thanks & regards,
-dkoushikHow about using XML - http://www.awprofessional.com/articles/article.asp?p=102307&seqNum=9 and another possibility is to directly access the ODBC lowlevel APIs directly. I've no exp.using languages like Visual Basic. You may have some luck accessing the stored procedures
using SQL Namespace APIs & MSEQ.|||Hi satya,
Thanks for your reply. But I guess u have misunderstood my question.
My Actual intention is to call web url from the SqlServe DB.
I have done the same in oracle. I have used Java stored procedure
where I have called a web url and the java sp is get called from a
Oracle function. I am sure there is nothing called java stored proc in Sql server.
So How can I achive the same result in Sql Server.
I was just trying some thing using xp_cmdshell (a system SP)
which can call any VB script which in turn will call the web url.
Plz help if you have any idea regarding this.
Thanks & Regards,
-- dkoushik
Originally posted by Satya
How about using XML - http://www.awprofessional.com/articles/article.asp?p=102307&seqNum=9 and another possibility is to directly access the ODBC lowlevel APIs directly. I've no exp.using languages like Visual Basic. You may have some luck accessing the stored procedures
using SQL Namespace APIs & MSEQ.|||If you are using xp_cmdshell, you've got 90% of the battle won. xp_cmdshell can launch any file that the NT Login used by MS-SQL can see, using whatever tools are available on the machine that is running SQL Server.
If you can log into the machine that runs your SQL Server, using the same login credentials that SQL Server uses, then you will have almost exactly the same conditions to test with that the xp_cmdshell will run under. Find a command string you can type to get something to happend, and you can then issue the exact same command using xp_cmdshell.
-PatP|||Hi Pat,
Thanks for the reply.
What I understood from your response is ,
I have to execute the xp_cmdshell in the database server
query analyzer. I have done the same thing but nothing is happening.
But this time its not giving any error. But the result its showing as NULL.
Do have any idea whats happening.
please help.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment