Giving special security permissions to a stored procedure

  • Hi there, I have a stored procedure that executes some system stored procedures from with in it.  One of them is the sp_OACreate.  the problem is that the user of the system stored procedure has to be sysadmin in order to execute it.  I cannot use my soted procedure in my application because then the user of the application that calls the parent stored procedure will need sysadmin access.  Is there any way around this?

     

    Thanks

     

    e... 

  • We did a work around on this issue were I work by creating an proc in the master database that called the sp_OACreate and granted right to this sproc to the users that needed it. Note we prefixed the name with sp__ that is two underscroces.

    Tim S

    BEGIN

    DECLARE @rslt INT

    IF @progid NOT IN ('MSSOAP.SoapClient30')

    BEGIN

    RETURN -1 -- Failure

    END

    EXEC @rslt = sp_OACreate @progid, @objecttoken OUTPUT, @context

    RETURN @rslt

    END

  • Thanks for the insight, I will try this out. 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply