Xp_cmdshell returning null
Premature optimization is the root of all evil in programming. Programmer-Analyst My blog. Good point! Hi John, XP is enabled, I even try to disable and enabled again, but nothing change.
Do you have any Antivirus software installed as these can sometimes block such activity? Some AV bug there or something Thanks Taul. Wednesday, January 26, PM. Add a comment. Active Oldest Votes. WriteLine "You had the right number of args. But on the production server it just returns null or both cases You or the proxy user may or may not have the right permissions on the server in production to see a result.
More can be found here — brazilianldsjaguar. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Cannot understand why. The same command works on every server I tested. On the production test it does not work. Any ideas? NULL 3 row s affected 1 1 row s affected It assigns 1 to variable. In my server it returns: output NULL 1 row s affected 1 row s affected And it never returns correctly 0 if the tested server is online!
This is driving me crazy. I don't think this can be a security problem. I use sa as username running my code. It will often change from working to not working while I am still in the same query window session in Management Studio. It works and then it just suddenly stops working. I have seen this issue appear in about 10 - 15 different sites. Neither of those help me, nor did they help the people asking the questions.
Only once did I see someone find his answer and it was anti-virus, but the antivirus software has been completely removed from this system and it's still happening. I thank you for any help you can provide. Follow Post Reply. Interesting question Mike. One I wish I could help more with, but let's see what I can do. I'm coming more from an OS perspective on this one.
I do some SQL Server but very little of the standard stored procedures available. So, what can your information tell us? If this abberrant behaviour is occurring sometimes when run from a query window when run as a user as opposed to being run from a service by anything scheduled then I believe that points to an issue between SQL Server and the OS. These types of issues can get confusing when a service is used, particularly when network locations or anything related to security tokens are involved.
The root of the C: drive can have restricted security, but it's rare at that level for it to cause issues, and that tends to be an issue with scheduled tasks run under credentials other than the current user's even sometimes when it interacts with the current user.
I think it safe to say the problem won't be found looking in those areas That hasn't really helped much looking at it, but it at least identifies a number of ares that needn't be looked at.
One of these is the existing setup, as far as I can see.
0コメント