You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2011/08/08 15:54:23 UTC

[Db-derby Wiki] Update of "DerbySQLroutines" by RichardHillegas

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "DerbySQLroutines" page has been changed by RichardHillegas:
http://wiki.apache.org/db-derby/DerbySQLroutines?action=diff&rev1=23&rev2=24

  
  The advantage of Java procedures is that the same procedure will run on any database that supports the standard, such as Derby, IBM's DB2 and Oracle.
  
+ == Permissions on Routines ==
+ <<Anchor(RoutinePermissions)>>
+ 
+ This section deals with issues which arise when you run Derby with authentication and authorization enabled.
+ 
+ By default, a function/procedure can be run only by its creator. However, the creator can grant other users EXECUTE permission on the routine. See the [[http://db.apache.org/derby/docs/dev/ref/rrefsqljgrant.html|Reference Guide]] for information on the GRANT command.
+ 
+ In addition, by default functions/procedures run with the privileges of the current user. So for instance, a procedure which writes new rows to a table will work properly only for users who have been granted INSERT privilege on that table. The routine creator can override this behavior by declaring that the routine executes with "definer's rights". This will make the routine execute with the privileges of its creator rather than with the privileges of the current user. For information on how to declare a routine with "definer's rights", see the Reference Guide sections on [[http://db.apache.org/derby/docs/dev/ref/rrefcreatefunctionstatement.html|CREATE FUNCTION]] and [[http://db.apache.org/derby/docs/dev/ref/rrefcreateprocedurestatement.html|CREATE PROCEDURE]].
+ 
  == Common Problems ==
  === *Unrecognized* procedures ===
  Up until at least 10.1.3, attempting to call a procedure with the wrong number of parameters causes an SQL exception: "ERROR 42Y03: 'SYSCS_UTIL.SYSCS_IMPORT_DATA' is not recognized as a function or procedure.".