Command Line

  • Hi,

    How to use the following command.. in sql server 2005..

    xp_cmdshell 'start iexplore http://www.google.co.oi'

    when i ren this it takes more time to execute ,but i am unable to get the explorer ,so please let me know is there any other way to achive this in sql server.. please help me out ..

    Thanks in Advance

  • It runs on Virtual desktop which you would not be able to see..

    What exactly you want to achieve?

  • I am not getting your point ,if you could explain me more ,, then i am able to do so..

  • SQL Server is not interactive in nature means that you can't try to trigger a program from that. You will find that yor query executing without end result or you may get timed out error.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • You can find more information in this article: http://support.microsoft.com/kb/323411/en-us

  • Sugesh Kumar R. MCDBA

    Theory is when you know something, but it doesn't work.

    Practice is when something works, but you don't know why.

    Programmers combine theory and practice: Nothing works and they don't know why.

    :)I LOVE IT:)

    A Programmer

    Tom Garth
    Vertical Solutions[/url]

    "There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
  • Hi,

    Where this statement is being invoked from?

    Meaning, are you in query analyzer or this statement is part of a function/sp?

    John Esraelo

    Cheers,
    John Esraelo

  • Check your "task manager", sort the processes alpha, look for iExplore and you will see the multiple node of that running in the background.

    So, one of the responses to your question is valid. Those are running in a virutal mode.

    thx

    John Esraelo

    Cheers,
    John Esraelo

  • You should be running this through a non-interactive interface. Executing IE in this manner does not work, as previously indicated. For instance, script the access using Perl or Powershell and execute the script.

    K. Brian Kelley
    @kbriankelley

  • Thanks, for your reply. i understood the what is happening while execute that statement..

    thanks ,your replies are very informative

  • Hi ,

    Please try this :

    exec master.dbo.xp_cmdshell 'mkdir "D:\temp"'

    exec master.dbo.xp_cmdshell 'dir "E:\"'

    Best Regards
    Faheem latif
    Senior Database Architect
    Genie Technologies (Pvt.) Ltd.

  • faheemlatif (2/14/2008)


    Hi ,

    Please try this :

    exec master.dbo.xp_cmdshell 'mkdir "D:\temp"'

    exec master.dbo.xp_cmdshell 'dir "E:\"'

    If xp_cmdshell is enabled, these should work. But they don't require an interactive session, like what the poster was originally trying to do.

    K. Brian Kelley
    @kbriankelley

  • Hi K. Brian Kelley,

    UR r8 ,one more thing i wanna add u can enable sheel option using.

    EXECUTE sp_configure 'show advanced options', 1

    RECONFIGURE WITH OVERRIDE

    GO

    EXECUTE sp_configure 'xp_cmdshell', '1'

    RECONFIGURE WITH OVERRIDE

    GO

    EXECUTE sp_configure 'show advanced options', 0

    RECONFIGURE WITH OVERRIDE

    GO

    Best Regards
    Faheem latif
    Senior Database Architect
    Genie Technologies (Pvt.) Ltd.

  • faheemlatif (2/14/2008)


    Hi K. Brian Kelley,

    UR r8 ,one more thing i wanna add u can enable sheel option using.

    EXECUTE sp_configure 'show advanced options', 1

    RECONFIGURE WITH OVERRIDE

    GO

    EXECUTE sp_configure 'xp_cmdshell', '1'

    RECONFIGURE WITH OVERRIDE

    GO

    EXECUTE sp_configure 'show advanced options', 0

    RECONFIGURE WITH OVERRIDE

    GO

    Why do you want to do this?

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply