This is only for my personal notes (if you find this useless or shallow :P).
If you eventually maintaining database that has more than one Table Owner (which surely wasn't dbo), you might need this. Because you might need to access each other's table from Stored Procedure or maybe Trigger of one of it's table.
these are samples of code I use in Hummingbird table and/or own created Stored Procedure, but in DOCSADM's Scheme:
GRANT UPDATE ON DOCSADM.PROFILE TO WFADM;
GRANT SELECT ON DOCSADM.SECURITY TO WFADM;
GRANT SELECT ON DOCSADM.VERSIONS TO WFADM;
GRANT EXECUTE ON OBJECT::DOCSADM.sp_SaveHistory TO WFADM;
A little explanation: So in Hummingbird, there was 2 scheme inside, DOCSADM and WFADM, so when I need to write into DOCSADM.SECURITY table, I don't have enough rights to do that from WFADM's Strored Procedure. So I need to grant Access for Update/Select/Insert to that table for user WFADM.
Note: for Update, you still need to grant SELECT access also.
-julie-
0 comments:
Post a Comment