Problem solve Get help with specific problems with your technologies, process and projects.

Calling an extended stored procedure in SQL Server 2005

Find out why problems calling an extended stored procedure in SQL Server 2005 can involve security settings.

I'm having a problem calling an extended stored procedure (specifically xp_cmdshell) from java, using the JDBC for SQL Server 2005. By using the JDBC for SQL Server 2000 Service Pack 3, I can call it like a normal stored procedure. With SQL Server 2005, I get the following: The request for procedure 'xp_cmdshell' failed because 'xp_cmdshell' is a procedure object.

It is a SQL Server 2000 server. I want to use the new 2005 JDBC because it does not have problems with cloned connections in manual transaction mode. I had problems with the selectMethod=cursor property on my webserver, it just didn't seem to take. It worked fine from my local webserver during development, but for some reason doesn't work when running on the live webserver. Is it even possible to call this extended stored procedure?

Yes, by default, it's disabled in 2k5 as it's not considered safe. You can enable it using the Surface Area Configuration Tool if you think it's appropriate.

Dig Deeper on SQL Server Stored Procedures