Granting execute permissions

  • I have tryed to grant execute permissions to a stored procedure with little success.

    What I did was script all my stored procedures to transfer to another server, ran the SQL script in Query Analyzer and got this error for all of the sprocs the script was trying to create

    "Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'returnAverages'. The stored procedure will still be created."

    All the scripts did get created but when I try and grant permissions on the sprocs to the user I get this error

    "Error 21776: [SQL-DMO] The name 'dbo.returnAverages' was not found in the storedProcedures collection"

    I did some searching for this particular error message on google but nothing turned up. I will continue to search but thought this would be a better spot to solve my problem

    Thanks for reading and even more thanks for responding

  • You should verfiy if you use returnAverages in your scripts. It may be a stored procedure you forgot to script. Look for the procedure on the original server and create it also on the new server ... I did not find it on my servers, so it is not a standard procedure. When reading "the missing object 'returnAverages'", it could also be something else ( a function, table,view ... ) ...

  • It also sounds to me as if a stored procedure is missing because of the second part of your message.

    Re the error message: "Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'returnAverages'. The stored procedure will still be created."  Normally this is nothing to worry about.  Since the scripts recreate the stored procs in alpha order, a lower alpha SP that makes reference to a higher order SP will cause this line.

    What is important to note however, is that the dependencies is therefore not always reliable because the necessary row was not added to sysdepends.  Be aware of this is you are used to viewing the dependencies of an SP.

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

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