86 reputation
4
bio website
location Brisbane, Australia
age 35
visits member for 3 years, 2 months
seen Jan 20 at 3:45

May
28
awarded  Scholar
May
28
accepted problem running xp_cmdshell when Application Name set in connection string
May
28
answered problem running xp_cmdshell when Application Name set in connection string
Apr
30
comment problem running xp_cmdshell when Application Name set in connection string
Unfortunately that did not work, msdb was the only one that was trustworthy on all the servers, but I changed it anyway to test if it would work. No Luck.
Apr
23
comment problem running xp_cmdshell when Application Name set in connection string
@Colin'tHart the commands that I run are as follows String.Format("EXEC master..xp_cmdshell 'del {0}'", exportDbLocal), String.Format("EXEC master..xp_cmdshell 'bcp {0} out {1} -T -N'", fullTempTable, exportDbLocal), String.Format("EXEC master..xp_cmdshell 'move {0} {1}'", exportDbLocal, exportMdNetwork) Basically, delete local file -> bcp dump to local -> move file to network share, My app can then continue to process said file without SQL. It fails on the first one. Normally, a simple result would be a list of any messages successful or not, but it does not get that far, it throws exception.
Apr
23
comment problem running xp_cmdshell when Application Name set in connection string
As far as I can tell, there are no differences between this server and the others, they are all running on the same type of servers (hardware VM) out on each site, except for the big gun at head office which is used by multiple systems. Application Name is used to identify which app when looking at the activity monitor. As we have several apps, .Net SqlClient Data Provider does not tells us much when we need to trouble shoot. So we are adding the app name to each apps connection string as an aid.
Apr
23
comment Can I drop and recreate a system extended stored procedure?
I use xp_cmdshell to execute bcp for bulk imports and exports of data. Are SQL CLR objects capable of doing the same bulk table operations speedy fashion like bcp?
Apr
22
asked Can I drop and recreate a system extended stored procedure?
Apr
22
comment problem running xp_cmdshell when Application Name set in connection string
One other production server is R2 SP1, the others are still R2 to be upgraded to SP1. But it works fine on all of them them. The test servers are R2 SP1 and it works fine on them as well. So it seems that the version is not the issue. I have two sysadmin accounts that I am testing with, one is a windows account and the other a SQL account. Both have the problem on this one server. But only if the application name is set in the connection. They are fine otherwise. It doesn't make any sense to me.
Apr
22
revised problem running xp_cmdshell when Application Name set in connection string
Added more results from testing
Apr
22
comment problem running xp_cmdshell when Application Name set in connection string
I am sure it is not the length, SQLMS does exactly the same thing when I set the application name in the connection window. I would also get a incomplete SQL error instead of the "Access Denied". It would also have the same problem with the xp_subdirs which it doesn't. I'll modify my question to include them. I have run the test on several test SQL servers which are R2 SP1 and its fine on those. It is only this one server that has the problem.
Apr
22
awarded  Promoter
Apr
19
awarded  Editor
Apr
19
revised problem running xp_cmdshell when Application Name set in connection string
Added more information.
Apr
18
awarded  Student
Apr
17
asked problem running xp_cmdshell when Application Name set in connection string