This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes 'sys.xp_cmdshell' Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark " Watch " New topic
Author

'sys.xp_cmdshell'

Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 206
Dear Sir,

when this error occures

SQL Exception occured while updating Transaction. : [Macromedia][SQLServer JDBC Driver][SQLServer]SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.

Rohit.


Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The error message tells you what the problem is: you don't have access to run sys.xp_cmdshell, and you need to reconfigure your server to allow it.

What were you trying to do? Running sys.xp_cmdshell is not a thing you would normally allow - since it is a call to run an executable on the server, which can be a very dangerous thing to allow.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 206
Yes, i had to delete some records from one table but it was not allowing to delete me ...but then i made this sys.cmd_shell enable in order to aalow me to delete the records. Actually for SQL server 2005 , this feature is by default disabled and it is recommeded that for the security purpose it shouldn't be enabled. But i just made it enable and the error starts occuring. Anyways thank you for help.

Rohit.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: 'sys.xp_cmdshell'
 
Similar Threads
Can't connect to SQL server 2005
How to ensure a read-only table will never be locked?
JDBC to SQL Server 2005 connectivity error
Alias for Database Server Name
does a procedure returns cursor, if so, how to hadle that in java