DB2错误:SQLCODE=-30082, SQLSTATE=08001

时间:2022-06-01 17:52:48
DB2错误:SQLCODE=-30082, SQLSTATE=08001

问题:使用db2  connect  to  数据库报:DB2 SQL Error: SQLCODE=-30082, SQLSTATE=08001,   ROOT CAPABILITY REQUIRED

原因是:我在/home/db2inst1/下上传一个文件,然后chmod  -R  777  /home导致的

解决方法:/home/db2inst1/sqllib/security目录下,db2chpw、db2ckpw两个文件的所属用户修改为root。权限修改为:4511。

步骤:
root:/#cd /home
root:/home#cd db2inst1
root:/home/db2inst1#cd sqllib
root:/home/db2inst1/sqllib#cd security
root:/home/db2inst1/sqllib/security#ls -l
total 8064
drwxr-xr-x    2 db2inst1 db2iadm1        256 Feb 25 17:44 auditdata
-r-s--x--x    1 db2inst1 db2iadm1      34966 Feb 25 17:44 db2aud
-rw-r--r--    1 db2inst1 db2iadm1       4096 Feb 25 17:44 db2audit.cfg
lrwxrwxrwx    1 root     system           37 Feb 25 17:44 db2chkau -> /opt/IBM/db2/V9.7/security64/db2chkau
-r-s--x--x    1 db2inst1 db2iadm1      23872 Feb 25 17:44 db2chpw
-r-s--x--x    1 db2inst1 db2iadm1    4015551 Feb 25 17:44 db2ckpw
-r-x--s--x    1 db2inst1 db2iadm1      43592 Feb 25 17:44 db2flacc
root:/home/db2inst1/sqllib/security#chown root db2chpw
root:/home/db2inst1/sqllib/security#chown root db2ckpw
root:/home/db2inst1/sqllib/security#chmod 4511 db2chpw
root:/home/db2inst1/sqllib/security#chmod 4511 db2ckpw
root:/home/db2inst1/sqllib/security#su - db2inst1
$ pwd
/home/db2inst1
$ db2stop
03/18/2013 16:25:20     0   0   SQL1064N  DB2STOP processing was successful.
SQL1064N  DB2STOP processing was successful.

$ db2start
03/18/2013 16:25:29     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.