0 pts.
 DB2/400 Stored Procedure Security
I am new to the DB2/400 world and am tasked to speed up some of the reports and a GUI application. To accomplish this I am heading in the direction of using stored procedures and UDFs. My problems is that the shop that I am working in is basically a AS400 shop that has never used SP or UDFs so there is very little/None help in questions that I have reguarding the use of SP's. My question is that if I grant execute rights to public and when the application/database is deployed do these rights travel with the object that is in a seperate library that will be sent to the client site. If the rights are not transferred is there an easy way to run a create script to acutally grant the rights to the group public? I am running up against a little resistance by the AS400 developers due to they have never seen or attempted to use a stored proc to perform any type of Database operation. I also get the impression in talking with them (the developers) they believe that a table in the database is nothing more than a flat file that they access. Does DB2/400 actually work in this manner(flat file) or is it an actual relational database? Thanks Jim Schneider(Legal Dev)

Software/Hardware used:
ASKED: December 26, 2006  8:42 AM
UPDATED: December 27, 2006  9:53 AM

Answer Wiki:
Very good question. On the 400, files and tables are the same thing. So, users may or may not have the right to execute your stored procedure. For your stored procedure to run successfully, users must have execute rights on it, and read rigthts on any file/table the procedure will use.
Last Wiki Answer Submitted:  December 26, 2006  5:48 pm  by  SheldonLinker   15 pts.
All Answer Wiki Contributors:  SheldonLinker   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Every physical file on the 400 is a fully DB2 compliant table, especially when the library (collection) is journalled. Logical files are analogous to views, except that they are not just DDL waiting to be executed. Indexes are what the 400 guys would call access paths – very important to DB performance on the 400. You need to look at “DB2 UDB for iSeries Database Programming” and the IBM Redbook “Stored Procedures, Triggers and User Defined Functions on DB2 Universal Database for iSeries”. Just Google them. Also try the Redbook “DB2 Universal Database for iSeries Administration” which shows how to use iSeries Navigator to fully administer the DB2 collections on your box.

 0 pts.