1

How can I execute system command like dir other than xp_cmdshell?

4
  • 1
    whats wrong with xpcmd_shell ? Commented May 20, 2012 at 14:16
  • Well it simply does not work - program that sends query does not responds after that, even if command is dir that does not take time to evaluate. Commented May 20, 2012 at 14:20
  • Have you tried the xpcmd_shell from SSMS? Commented May 20, 2012 at 14:22
  • I cannot try because i does not have direct access to server - only through that program. Commented May 20, 2012 at 14:27

1 Answer 1

1

I dont see any problem , here is an example :

dstest is a remote server ...

enter image description here

edit

run this to activate :

EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
Sign up to request clarification or add additional context in comments.

2 Comments

Maybe this stored procedure(xp_cmdshell) is blocked?
Thanks! Even though i saw your edit in MSDN, only by reading it careully second time and executing commands one by one I achieved the desired result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.