linux db2 30082,db2 connect -- SQL30082N 错误

Technote (troubleshooting)

Problem(Abstract)

After I created several new instances on DB2 as

user root, I want to attach to one of the instances using an ID that is

not an instance owner. However when I try to do this, I get the

following error: systest1@local1:~> db2 attach to inst1 user

testuser1 Enter current password for testuser1: SQL30082N Security

processing failed with reason "42" ("ROOT CAPABILITY REQUIRED").

SQLSTATE=08001

Cause

This error is usually seen when we are dealing with a non-root DB2 installation. There are some

important limitations when you use non-root DB2 installations. Please

check the links at the end of this tech document for details.

SQL30082N Security processing failed with reason reason-code (reason-string).

Explanation:

An error occurred during security processing. The cause of the security

error is described by the reason-code and corresponding reason-string

value.

Here are some details regarding the reason code you are facing:

42 (INVALID SERVER SECURITY TOKEN)

Authentication using local client or server passwords is not currently enabled.

User response:

Ensure that the proper userid and/or password is supplied.

The userid may be disabled, the userid may be restricted to accessing

specific workstations, or the userid may be restricted to certain hours

of operation.

42

To enable local client or server

authentication for non-root installations, the system administrator must

run the db2rfe script. Alternatively, authentication can be done using a

security plugin.

In order to solve this problem it recommend

that you run the db2rfe command, which enables the supported root

features, in non-root installations of DB2.

Resolving the problem

1.) Stop the DB2 instance by issuing the "db2stop" command.

2.) Log in as root and locate your db2rfe.cfg found in DB2DIR/instance.

3.) Check the file to make sure it has:

RESERVE_REMOTE_CONNECTION=YES

4.) If it doesn't, then update it to match the above. Then run:

db2rfe -f If that doesn't help, then you need to check the permission's on db2ckpw and db2chpw. Do the following:

1.) cd to sqllib/security

2.) run: ls -l

3.) Check the permission's on the db2chpw and db2ckpw they should be:

-r-s--x--x 1 root inst1 51195 Dec 1 15:33 db2chpw

-r-s--x--x 1 root inst1 3534773 Dec 1 15:33 db2ckpw

4.) Also check to see if they are owned by root.

5.) If not owned by root, log in as root and run:

db2iupdt -k and then check if db2ckpw is now owned by root.

6.) If you need to change the permission's of those files run the

following commands (this needs to be done as root, since the files are

owned by root):

chmod 4511 db2chpw

chmod 4511 db2ckpw

Stop and restart the instance.

7.) Also check with your System Administrator Team and make sure your

file systems are not mounted with the NOSUID option. If they are,

re-mount them without NOSUID.

The below links have additional information about SQL30082N, Non-root install and db2rfe:

SQL30082N

Limitations of non-root installations

db2rfe - Enable root features for non-root install command

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Linux系统重启db2数据库命令实例详解全文共4页,当前为第1页。Linux系统重启db2数据库命令实例详解全文共4页,当前为第1页。Linux系统重启db2数据库命令实例详解 Linux系统重启db2数据库命令实例详解全文共4页,当前为第1页。 Linux系统重启db2数据库命令实例详解全文共4页,当前为第1页。 Linux系统中db2数据库的启动关闭可以通过命令来实现。下面由店铺为大家整理了Linux系统重启db2数据库命令实例详解,希望对大家有帮助! Linux系统重启db2数据库命令实例详解 DB2重启数据库实例时,有时停止实例会失败,此时需要先确认没有应用链接数据库,然后再关闭数据库实例,并重新启动。 1.查看是否有活动的链接 命令:db2 list applications for db db_name 发现有两个活动链接,此时需要将链接进行关闭。 2.关闭连接 命令:db2 force application all 3.再执行一次步骤1中的命令,查看链接是否全部关闭。 4.执行停止实例命令 命令:db2stop 注意:命令中没有空格 5.执行实例启动命令 命令:db2start 6.如果此时,发现连接不了数据库,莫慌,需要激活目标数据库 首先查看是否有活跃的数据库 命令:db2 list active databases 如果没有,需要对目标数据库进行激活设置 命令:db2 activate database db_name 然后再次使用上一条命令,就可查看到当前已有活跃的数据库了,此时可进行连接并执行数据库操作。 在停止数据库实例失败时,也有一种直接迅速的方法可以停止实例,不过不建议使用,最好还是按照上述的步骤进行。 快速方法 执行命令:db2stop force Linux系统重启db2数据库命令实例详解全文共4页,当前为第2页。Linux系统重启db2数据库命令实例详解全文共4页,当前为第2页。Linux系统db2数据库常用命令 Linux系统重启db2数据库命令实例详解全文共4页,当前为第2页。 Linux系统重启db2数据库命令实例详解全文共4页,当前为第2页。 启动数据库: 启动db2服务:db2start 激活数据库实例:db2 activate database <db_name> 查看激活状态的数据库:db2 list active databases 关闭数据库: 失效数据库实例:db2 deactivate database <db_name> 关闭数据库服务:db2stop 查看数据库:db2 list db directory 查看数据库应用:db2 list applications 查看数据库应用和进程号:db2 list applications show detail 查看数据库表空间:db2pd -db <db_name> -tablespace 查看数据库配置:db2 get db cfg for <db_name> 连接数据库:db2 connect to <db_name> db2 connect to <db_name> user[user_name] using [password] 断开数据库连接:db2 connect reset/db2 terminate 创建数据库:db2 create db <db_name> 删除数据库:db2 drop database <db_name> (如果不能删除,尝试断开激活的连接或者重启db2) 列出系统表:db2 list tables for system 列出所有用户表:db2 list tables 列出所有表:db2 list tables for all 列出特定用户表:db2 list tables for schema [user] 复制一张表:db2 create table t1 like t2 显示表结构:db2 describe table tablename 查询表:db2 "select * from table tablename where ..." 执行SQL脚本:db2 -tvf scripts.sql 查看错误代码信息:db2 ? 10054 停止激活的连接:db2 force application all;\db2 force Linux系统重启db2数据库命令实例详解全文共4页,当前为第3页。Linux系统重启db2数据库命令实例详解全文共4页,当前为第3页。application all;\db2 force application all;\db2stop Linux系统重启db2数据库命令实例详解全文共4页,当前为第3页。 Linux系统重启db2数据库命令实例详解全文共

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值