March 25, 2009 at 12:54 am
We need to execute XP_FIXEDDRIVES procedure.
but the user needs a sysadmin role to execute this procedure.
this privilege cant be given to the user .
Is there any alternate solution to execute the procedures of the same kind .
Please help
March 27, 2009 at 7:25 am
Have you checked into creating a stored procedure that is owned by sysadmin the executes XP_FIXEDDRIVES and give the user execute permission to the procedure you created. I'm not fully sure that will work but it is worth trying.
Steve
March 27, 2009 at 7:37 am
Another option:
I execute xp_fixeddrives from a stored procedire and put the results in a table. I run this once a day from with a scheduled job. This table could then be queried by someone else that you have give select permission.
CREATE TABLE #disk_free_space (
DriveLetter CHAR(1) NOT NULL,
FreeMB INTEGER NOT NULL)
/* Populate #disk_free_space with data */
INSERT INTO #disk_free_space
EXEC master..xp_fixeddrives
INSERT INTO dbo.free_space
SELECT getdate(),DriveLetter,FreeMB
FROM #disk_free_space where DriveLetter = @DriveLetter
DROP TABLE #disk_free_space
Steve
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply