Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,


master..xp_cmdshell is showing always null value for any command can you please give me solution

i have to run dos command's from Sql Server Procedure, for that i used xp_cmdshell it was worked fine upto last night but now it is not working , it is showing always Null value for all commands Ex: xp_cmdshell 'dir' . Before it was shown all files and directories now it is showing null , could you please help me with right direction





Thanks
Sudheer.N
Posted
Updated 12-Oct-12 8:49am
v2
Comments
Sergey Alexandrovich Kryukov 12-Oct-12 14:06pm    
Not enough information.
--SA
Sudheer Nimmagadda 12-Oct-12 14:10pm    
i have to run dos command's from Sql Server Procedure, for that i used xp_cmdshell it was worked fine upto last night but now it is not working , it is showing always Null value for all commands Ex: xp_cmdshell 'dir' . Before it was shown all files and directories now it is showing null , could you please help me with right direction

1 solution

You need to be sure, that xp_cmdshell is enabled in your SQL server. It disabled by default.
To enable it, please refer to MSDN
http://msdn.microsoft.com/en-us/library/ms190693.aspx[^]

If it is enabled, then there are maybe not enough permissions to use it.
See information about permissions in MSDN
http://msdn.microsoft.com/en-us/library/ms175046.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900