1. Add the user Oracle to the DB2 user group with the following command:
Usermod-a-G Db2iam # adding users to a group does not change the group that is currently owned
Note: The following are not related to the topic, just list some commands about the user
ID user # View information such as user-owned group Cat/etc/group # View all groups groups # View the group to which the current user belongs
2, switch to the DB2 instance user Db2inst1, to the user Oracle authorization.
DB2 Connect to sample # connects to database DB2 GRANT dbadm,createtab,bindadd,connect,create_not_fenced_ Routine,implicit_schema,load,create_external_routine,quiesce_connect on DATABASE to USER Oracle # Authorized
3. Copy the following portions of the. BASHRC in Db2inst1 into the. BASHRC in Oracle:
if [-f/home/db2inst1/sqllib/db2profile]; Then /home/db2inst1/sqllib/Db2profilefi
[Database middleware] Adds a user to the DB2 group authorization