Another question, I'm stupified by the following:
I wish to allow non-sa users to run a bcp string with xp_cmdshell. The option to use this XP is by default turned off. I can get these non-sa users to run the xp_cmdshell, it's the turning on and off of the configuration which I cannot resolve.
What I'm looking at is a SP like this:
CREATE PROCEDURE testSP1
BEGIN
EXEC SP_CONFIGURE 'xp_cmdshell', 1;
RECONFIGURE WITH OVERRIDE;
EXEC XP_CMDSHELL 'DIR c:\' -- some VBCP command, but for a simple example...
EXEC SP_CONFIGURE 'xp_cmdshell', 0;
RECONFIGURE WITH OVERRIDE;
END
GO
I have tried constructions with EXECUTE AS and Certificates, but sofar nada. Scoured the Internet, no example specifically on permissions on SP_CONFIGURE.
Any suggestions?
Greetz,
Hans Brouwer