July 22, 2022 at 12:06 am
Hello,
Recently in the project, many users needed to run the xp_cmdshell to BCP out table records. However, they are facing the below error:
"the xp_cmdshell proxy account information cannot be retrieved or is invalid. verify that the ##xp_cmdshell_proxy_account## credential exists and contains valid information.."
The xp_cmdshell option is enabled through sp_configure for the users to run the xp_cmdshell. Not sure why this does not work.
Are there any defined steps to be followed for the windows users (they are aligned as part of a few active directory groups) and also for the users who use SQL Login account?
Kindly suggest!
Thanks.
July 22, 2022 at 7:08 pm
Without any details, this does not sound like a great idea. I'm curious as to what you are trying to accomplish.
xp_cmdshell requires admin rights to execute.
This article shows how non-admins can use xp_cmdshell
https://www.databasejournal.com/ms-sql/xp-cmdshell-for-non-system-admin-individuals/
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
July 24, 2022 at 4:59 am
Do NOT let users have direct access to xp_CmdShell... Write a stored procedure that uses xp_CmdShell with the correct proxy and EXECUTE AS OWNER in the proc.
NEVER EVER let users have direct execution privs on xp_CmdShell. It's a great way to read about your company in the morning news if you do.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply