Results 1 to 6 of 6

Thread: master..xp_cmdshell

  1. #1
    Join Date
    Oct 2009
    Posts
    3

    master..xp_cmdshell

    Hi there,

    My task is to hit on a URL when ever there is an insert or update in data base table. I have made a batch file and from there i have opened required URL sucessfully.

    I have made a trigger on required table and used the follwoing command to run my batch file

    exec master..xp_cmdshell 'c:\test.bat'

    when i insert a row in table I got 3 output lines as fallows

    1. Null
    2. Full path of of URL
    3. Null

    But i dont know why IE does not open and i did not see my required URL. First i though there might be some problem in my batch file, when i double clicked on it my IE got opened with URL given in it.

    Kindly require solution of it urgently. looking for reply. thank's in advance.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Sql doesn't handle interactive nor gui program that way.

  3. #3
    Join Date
    Oct 2009
    Posts
    3

    Post Need Help

    SQL dont be handling but a batch file can handle. I just wanted to run batch file which handles the request automatically.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    But not as you expected.

  5. #5
    Join Date
    Oct 2009
    Posts
    3

    Zeeshan

    So can you suggest me what should i do ?

    What i want is when there is any insert on db table i want to hit a URL e.g http://www.google.com. kindly help me out in this regards i will be very thankful.

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    You can't ask rdbms to do everything even not related to rdbms. :-)

    Maybe try with clr if you have sql2k5 or up?

Posting Permissions

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