If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > authentication for db and stored procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 04:43
shedb shedb is offline
Registered User
 
Join Date: Dec 2003
Posts: 78
Question authentication for db and stored procedures

Hello,
In our DB2 v7.2 server database working in AIX, we had a user USER1(let's say) in the group which has the dbadmin privileges on the database.
Now I have to restrict the priviliges of USER1, such that he can only *create tables,views,indexes
*select/update/insert/delete tables(but not of the SYSCAT,SYSIBM or SYSSTAT)
*execute,create,change stored procedures(java stored procedures and sql procedures) that have been created.

Now,
-I have created another group that has no privileges, remove USER1 from dbadmin group and add him to this group.
-I have granted the user bindadd,connect, createtab,load on this database.
-I have granted "all privileges" on tables whose schemas are not SYSIBM,SYSCAT or SYSSTAT.

My questions are:
? I did not grant select on tables owned by SYSIBM,SYSCAT or SYSSTAT.Will it cause any problem when USER1 wants to run the restricted priviliges above(marked with *)?
? I don't know the commands to authenticate USER1 for the stored procedure part above.Can you also help me with this?
? Do i need to make any additional grants?

Thanks a lot,
shedb
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 08:19
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Shedb,
You will need to grant select rights to the system (SYSIBM, SYSCAT, SYSSTAT) schemas. They need to be able to read the catalog to perform just about anything else.

To grant for stored procedures:
Grant EXECUTE on package <package name> to group <group name>

The problem with this is that you need to know the package name of the stored procedure. I think this can be obtained from the syscat.packagedep view. Version 8 has fixed this.

Additional grants; You will need to grant execute (same as above) for UDFs.

HTH

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On