xp_cmdshell permission denied SQL 2005



My issue. I'm running a web app which makes command calls to a DB
using SQL Authentication. One task the app will have to do is
utilize
th "xp_cmdshell" to populate an Excel spread*** and move the file
from location A to B which is a linked server. Since the DB user
executing all my sql commands is not a default sysadmin. My app
encounters the the following error "...EXECUTE permission denied on
object 'xp_cmdshell', database 'mssqlsystemresource'..." I've
investigated on possible ways to resolve this issue however I've had
no luck on resolving this issue; below are the step's I taken so far.

1) I created a windows acct - "ADomain\AUserAcct"
2) Created a Login acct for this user ("ADomain\AUserAcct") in SQL
2005 and granted user access to this DB. User access for this
account
is "dbowner"
3) Executed the "sp_xp_cmdshell_proxy_account" sproc for this new
acct
a. EXEC sp_xp_cmdshell_proxy_account "ADomain\AUserAcct",
"pwd"
4) Granted execute rights on sys.xp_cmdshell for this user
a. GRANT EXECUTE ON sys.xp_cmdshell TO "ADomain\AUserAcct


After these steps, I tried to execute my process again but ecountered
the same error msg. so


1) I modified the stored sproc to execute with the new user's acct.
but had the same error
a.Create proc myprocname with Execute As ADomain\AUserAcct


Note: when I execute the proc. Before any of these steps thru sql
2005
IDE with a sysadmin account all works great.


If anyone has any suggestions on how to resolve this or pointers on
where I went wrong, I would greatly appreciate it.


Thanks,

.


Quantcast