db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "DerbySQLroutines" by RichardHillegas
Date Mon, 08 Aug 2011 13:54:23 GMT
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:

  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
+ 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
  == 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.".

View raw message