Click here to Skip to main content
11,637,415 members (59,302 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL Server
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 12-Oct-12 7:54am
Edited 12-Oct-12 8:49am
__TR__29K
v2
Comments
Sergey Alexandrovich Kryukov at 12-Oct-12 14:06pm
   
Not enough information.
--SA
Sudheer Nimmagadda at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 304
1 OriginalGriff 295
2 stibee 288
3 jyo.net 270
4 himanshu agarwal 184
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,643
2 Mika Wendelius 6,959
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320


Advertise | Privacy | Mobile
Web02 | 2.8.150728.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100