xp_cmdshell Breaks After Remote Execution

  • If I run xp_cmdshell 'dir *.*', my results are

    output

    --------------

    NULL

    (1 row(s) affected)

    If I restart SQL Server and try it again while connected directly to the server it works.  However, as soon as I try running the command from my PC, I receive the above results.  If I then try to run the command directly from the server, I also receive the above results.  It stops working. 

    Any ideas?

    Extra Info

    ----------

    SQL Server 2000 sp3a

    Windows 2003 sp1

    My domain account is a member of a domain group that has been added to the local administrator group on the sql server

    Thanks,   Dave

  • I can't recreate the problem; while connected to a server from my desktop I get results back. Are you sure your database is Master when you're connected from your desktop? Have you tried using:

    exec master.dbo.xp_cmdshell 'dir *.*' ?

    Just a thought.

    Sorry I couldn't be more help.

    Mark

  • The command is fully qualified.  It worked a few weeks ago, but the server experienced problems and was rebuilt.  Something permissions-related is probably messed up, but I can't figure it out.

    Dave

Viewing 3 posts - 1 through 2 (of 2 total)

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