Hi folks,
I tried to create triger, which stores user name in event log table
automaticaly in case of data modifications performed and possibly found bug.
For all popular DBMS it is possible for security reasons to create stored
procedure, which selects subset of rows and isolates user from accessing
table directly.
It does not work:
User DBA:
CREATE DBPROC GET_USRNAME(OUT USRNAME CHAR(32))
AS VAR CONNUSER CHAR(32);
TRY
SELECT USERNAME INTO :USRNAME FROM DOMAIN.CONNECTEDUSERS CU,
DOMAIN.CONNECTPARAMETERS CP WHERE CU.SESSION = CP.SESSION;
CATCH
STOP ($rc, $errmsg);
GRANT EXECUTE ON GET_USRNAME TO NON_DBA_USER
User NON_DBA_USER:
CALL DBA.GET_USRNAME(?)
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
Syntax error or access violation;-5001 POS(1) Missing privilege.
CALL DBA.GET_USRNAME(?)
Thanks for ideas,
Pranas
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]