August 12, 2009 at 7:03 am
Hi,
While execution BCP job, I am getting this following error.
[p]Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.[/p]
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 [p]Incorrect Syntax near '\'. [/p] GRANT EXECUTE on xp_cmdshell to india\xg536
The following query executed fine.
USE master;
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.
Thanks.
KSB
-----------------------------
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
August 12, 2009 at 9:00 am
Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]
August 12, 2009 at 11:53 pm
Thanks for reply.
Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]
Executed fine but same results. Getting the following error [p]Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.[/p]
KSB
KSB
-----------------------------
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
August 13, 2009 at 2:35 am
This link might assist you: http://www.dbnewsgroups.net/group/microsoft.public.sqlserver.programming/topic16744.aspx
----------------------------------------------------------------------------------------------
Struggling to find the question?
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
August 13, 2009 at 4:13 am
This link might assist you: http://www.dbnewsgroups.net/group/microsoft.public.sqlserver.programming/topic16744.aspx%5B/quote%5D
I have tried this too..
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
exec sp_xp_cmdshell_proxy_account 'domain\user', 'password'
Still getting same error.
Thanks,
KSB
KSB
-----------------------------
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
August 13, 2009 at 4:29 am
KSB, are you able to execute any commands using xp_cmdshell? Are you getting this message everytime you execute a command or only on the BCP Job?
----------------------------------------------------------------------------------------------
Struggling to find the question?
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
August 13, 2009 at 5:27 am
If I executeEXEC xp_cmdshell 'dir *.exe';
GO it is working fine.
And if I execute BCP job I'm getting error.
Thanks for reply
KSB
-----------------------------
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
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply