linux sql30082n,db2 connect SQL30082N failed with reason 24

db2 connect SQL30082N failed with reason 24

db2 grant connect on database to user USERNAME

db2 "select * from syscat.dbauth where grantee='USERNAME'"

### 授予权限后还是报同样的错误

[hostname:/db2home/db2inst2/sqllib/db2dump] #

[hostname:/db2home/db2inst2/sqllib/db2dump] # db2 connect to dbname user  USERNAME using 'xxxxxxx'

SQL30082N  Security processing failed with reason "24" ("USERNAME AND/OR

PASSWORD INVALID").  SQLSTATE=08001

[hostname:/db2home/db2inst2/sqllib/db2dump] #

db2 ?  SQL30082N

24

Solutions to specific problem causes described above are:

1. Run DB2IUPDT to update the instance.

2. Ensure that the username created is valid. Review the DB2

General Naming Rules.

3. Ensure that catalog information is correct.

### 发现OS id 是大写的

[hostname:/db2home/db2inst2/sqllib/db2dump] # id username

User not found in /etc/passwd file

[hostname:/db2home/db2inst2/sqllib/db2dump] # id USERNAME

uid=238(USERNAME) gid=1(staff) groups=209(cmwauto)

[hostname:/db2home/db2inst2/sqllib/db2dump] #

2014-09-15-09.40.29.334627+120 I201587A437        LEVEL: Warning

PID     : 57671740             TID  : 5399        PROC : db2sysc 0

INSTANCE: db2inst2             NODE : 000         DB   : dbname

APPHDL  : 0-95

EDUID   : 5399                 EDUNAME: db2agent (dbname) 0

FUNCTION: DB2 UDB, bsu security, sqlexLogPluginMessage, probe:20

DATA #1 : String with size, 66 bytes

Password validation for user USERNAME failed with rc = -2146500502

### 自己在Linux下测试 , 发现大写用户会报同上的错误

[db2inst1@bbbbbb migration]$ db2 connect to bbb user AAAA using aaaa

SQL30082N  Security processing failed with reason "24" ("USERNAME AND/OR

PASSWORD INVALID").  SQLSTATE=08001

[db2inst1@bbbbbb migration]$

[db2inst1@bbbbbb migration]$ db2 connect to bbb user aaaa using aaaa

Database Connection Information

Database server        = DB2/LINUXX8664 9.7.8

SQL authorization ID   = AAAA

Local database alias   = BBB

[db2inst1@bbbbbb migration]$

### 最终找到官方的说明

%2Fcom.ibm.installingcm.doc%2Fdcmcw128.htm

Rules for user IDs

Some of these rules are specific to the platform you are working on. For example, there is a rule regarding the use of uppercase and lowercase letters in a name.

Linux, AIX? or Solaris

Names must be in lowercase.

Windows

Names can be in uppercase, lowercase, and mixed case.

Unless otherwise specified, all names can include the following characters:

A through Z. When used in most names, characters A through Z are converted from lowercase to uppercase.

0 through 9.

! % ( ) { } . – ^ ~ _ (underscore) @, #, $, and space.

\ (backlash).

Restrictions:

Names cannot begin with a number or with the underscore character.

Do not use SQL reserved words to name tables, views, columns, indexes, or authorization IDs.

Do not start the name of a system administration or a connection ID with SYS, SQL, IBM?, or sql.

阅读(5643) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值