1

我在 AIX 上使用 db2。我创建了具有只读权限的用户 usrxxxxx。

问题是我不能用这个用户启动 db2。

su - usrxxxx

$ db2

ksh:db2:未找到。

$

我还通过用户 db2inst1 向用户 usrxxxxx 授予选择权限。将 tbl_data1 上的茄子选择到 usrxxxxx

我不知道我是否错过了一步。我真的很感谢你的帮助。有任何想法吗?

4

1 回答 1

2

In order to execute db2 commands in the server, you need to load the db2profile.

For example, if your instance name is 'db2inst1' and the home is at '/home/db2inst1' you need to do:

. /home/db2inst1/sqllib/db2profile

This will load the DB2 profile in you current session and then you can execute db2 commands.

However, the user used to execute commands needs to have the necessary privilges. For example, in order to start the instance, the user should be part of one group that has the SYSADM, SYSCTRL or SYSMAINT authority. Check the InfoCenter-db2start

I recommend you to check the authorities (at instance and database level) and the privileges, in order to understand how DB2 security works. A tutorial here

于 2013-10-22T09:55:15.963 回答