Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Proxy Account Expand / Collapse
Author
Message
Posted Wednesday, August 12, 2009 7:03 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 22, 2013 1:05 AM
Points: 248, Visits: 373
Hi,

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.
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
Post #769285
Posted Wednesday, August 12, 2009 9:00 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 9, 2014 9:26 AM
Points: 281, Visits: 181
Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]

Post #769378
Posted Wednesday, August 12, 2009 11:53 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 22, 2013 1:05 AM
Points: 248, Visits: 373
Thanks for reply.

Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]

Executed fine but same results. Getting the 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'.


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
Post #769883
Posted Thursday, August 13, 2009 2:35 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 3:01 AM
Points: 95, Visits: 308
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
Post #769975
Posted Thursday, August 13, 2009 4:13 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 22, 2013 1:05 AM
Points: 248, Visits: 373
This link might assist you: http://www.dbnewsgroups.net/group/microsoft.public.sqlserver.programming/topic16744.aspx

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
Post #770016
Posted Thursday, August 13, 2009 4:29 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 3:01 AM
Points: 95, Visits: 308
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
Post #770024
Posted Thursday, August 13, 2009 5:27 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 22, 2013 1:05 AM
Points: 248, Visits: 373
If I execute
EXEC 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
Post #770055
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse