private sotred procedure

  • Hi,

    I want to create stored procedure which will be can call only from some another stored procedure.

    (just like "private" , "public" in object langugages)

    How can I emulate such behaviour ?

  • Hi,

    Not sure what you're question is, but if you want to call another stored procedure from a stored procedure, just call it. This is what we call nested stored procedures. The other option is to create a managed stored procedure using .NET CLR.

    Thanks,

    Phillip Cox

  • Hi,

    I want to create procedure.

    This procedure will be call from some another procedure.

    The aplicattion which will be use all stored procedures should have not possibility to call this procedure.

  • You could achieve this by only granting permission to execute the "private" sps to a certain user and then have the "public" sps call the "private" sps with EXECUTE AS . I'm sure there is a catch or two to it, but the solution you are seeking could be implemented this way.

    Here's a good article on this:

    http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1217061,00.html

    Look for EXECUTE AS

    Good Luck!

Viewing 4 posts - 1 through 4 (of 4 total)

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