DB2/400 Stored Procedure Security

pts.
Tags:
Database
IBM DB2
Oracle
SQL
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)

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SteveCCNJ
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following