While execution BCP job, I am getting this following error.
Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.
I enabled xp_cmdshell
in Surface Area Confuration features.
Then i went to Security -> Credentials -> created new proxy account with the name ##xp_cmdshell_proxy_account## and identity as india\xg536, surprisingly i could not find the identity. I have logged in as xg536 and india is domain for this login. Even though i gave same identity and password.
And SQL server Agent -> Proxies -> Added the same credential here.
When I am trying to run this following query, got error saying that
Incorrect Syntax near '\'.
GRANT EXECUTE on xp_cmdshell to india\xg536
The following query executed fine.
exec sp_xp_cmdshell_proxy_account 'india\xg536', 'Ong4ig9'
Finally I am getting same error. Can anybody give me suggestions to run BCP job successfully.
Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha