SQL1092N The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

时间:2022-08-18 03:46:14

1.前一天安装号db2后,做了如下处理:

************************************************************

修改 /etc/sudoers 文件,找到下面一行,把前面的注释(#)去掉

## Allows people in group wheel to run all commands
%wheel    ALL=(ALL)    ALL

然后修改用户,使其属于root组(wheel),命令如下:

#usermod -g root db2inst1

修改完毕,现在可以用db2inst1帐号登录,然后用命令 su – ,即可获得root权限进行操作。

**************************************************************

2.第二天启动数据库实例报错如下截图:

SQL1092N  The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

3.解决办法:

用root用户登录
vi /etc/group

部分文件内容截图如下:

SQL1092N  The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

同样用root用户登录

vi /etc/passwd

部分文件内容截图如下:

SQL1092N  The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

上述修改完毕之后,保存退出。再次使用db2start启动即可成功。

db2inst1:x:1002:0::/home/db2inst1:/bin/bash
1 2 3 45 6 7
| | | || | |
| | | || | |--用户默认使用的SHELL
| | | || |--用户家目录
| | | ||--用户finger信息(注释信息)
| | | |--用户组ID(GID)
| | |--用户ID(UID)
| |--密码占位符(密码保存在/etc/shadow文件内)
|--用户名

但是,数据库实例是可以启动了,连接数据库又失败了

数据库连接报错如下:

SQL1092N  The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

错误详细描述:

SQL1639N  The database server was unable to perform authentication because
security-related database manager files on the server do not have the required
operating system permissions. SQLSTATE=08001

这个问题的处理办法如下:

cd /opt/ibm/db2/V10.5/instance

然后切换root用户,执行./db2iupdt db2inst1

SQL1092N  The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation.

执行完成之后,数据库就可以登录了。