您的位置:首页 > 数据库

DB2数据库SQL1366N错误处理

2017-09-15 15:18 591 查看
近日为了安全基线的检查,不停地在更新已上线系统的数据库参数设置,结果在更改了目录sqllib下的文件权限后,导致数据起停,连接等命令无法执行。

1、报错为:SQL1366N A Security plug-in "IBMOSauthclient" pfocessing error occurred on the client ,Reason code="3"。

2、研究发现:目录sqllib下security64(我的系统为64位的aix)的访问权限出现了问题。

3、解决办法:让实例用户具有访问和执行的权限。root用户登录,

     chmod -R +rw  /home/sjxt/sqllib/security64/plugin/IBM/client;

      chmod +x  /home/sjxt/sqllib/security64/plugin/IBM/client/IBMOsauthclient.a

结果上述问题解决后出现了:SQL0332N  Character conversion from the source code page "1386" to the target  code page "819" is not supported SQLSTATE=57017

针对这个现象的解决方法:db2set db2codepage=1386 ,

结果又出现了以下问题:DBI1306N The instance profile is not defined .

                                       Explanation: The instance is not defined in the target machine registry.

                                       User response: Specify an existing instance name or create the required instance.

针对这个问题,通过上网查找,发现有类似案例,现将访案例及处理方法贴如下:

APAR status

Closed as program error.

Error description

db2set throws the following error:

$ db2set db2_workload=sap
DBI1306N  The instance profile is not defined.
Explanation:
The instance is not defined in the target machine registry.
User response:
Specify an existing instance name or create the required
instance.

This problem can be caused by a dirty record in the DB2 global
registry.
You can list the content of the DB2 global registry with this
command: "<DB2DIR>/bin/db2greg -dump"
If, for example, your instance is called "db2inst1" the output
will contain a record like this:
I,DB2,9.7.0.1,db2inst1,/home/db2inst1/sqllib,,1,0,/opt/IBM/v97,,

The error from db2set is triggered because the InstallPath
record (/opt/IBM/v97) is different than the path where your copy
of DB2 is installed.


Local fix

a813

Execute this command as root, where <DB2DIR> is the path where
your DB2 copy is installed:
<DB2DIR>/instance/db2iupdt <INSTANCE NAME>


Problem summary

****************************************************************
* USERS AFFECTED:                                              *
* ALL                                                          *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* db2set throws the following error:                           *
*                                                              *
*                                                              *
*                                                              *
* $ db2set db2_workload=sap                                    *
*                                                              *
* DBI1306N  The instance profile is not defined.               *
*                                                              *
* Explanation:                                                 *
*                                                              *
* The instance is not defined in the target machine registry.  *
*                                                              *
* User response:                                               *
*                                                              *
* Specify an existing instance name or create the required     *
*                                                              *
* instance.                                                    *
*                                                              *
*                                                              *
*                                                              *
*                                                              *
*                                                              *
* This problem can be caused by a dirty record in the DB2      *
* global                                                       *
* registry.                                                    *
*                                                              *
* You can list the content of the DB2 global registry with     *
* this                                                         *
* command: "<DB2DIR>/bin/db2greg -dump"                        *
*                                                              *
* If, for example, your instance is called "db2inst1" the      *
* output                                                       *
* will contain a record like this:                             *
*                                                              *
* I,DB2,9.7.0.1,db2inst1,/home/db2inst1/sqllib,,1,0,/opt/IBM/v97
*                                                              *
*                                                              *
* The error from db2set is triggered because the InstallPath   *
*                                                              *
* record (/opt/IBM/v97) is different than the path where your  *
* copy                                                         *
* of DB2 is installed.                                         *
*                                                              *
*                                                              *
*                                                              *
* You can fix the issue by running db2iupdt against your       *
* instance:                                                    *
* <DB2DIR>/instance/db2iupdt <INSTANCE NAME>                   *
****************************************************************
* RECOMMENDATION:                                              *
* You can fix the issue by running db2iupdt against your       *
* instance:                                                    *
* <DB2DIR>/instance/db2iupdt <INSTANCE NAME>                   *
****************************************************************


Problem conclusion

Problem was first fixed in Version 9.7 Fix Pack 2


具体链接见如下:http://www-01.ibm.com/support/docview.wss?uid=swg1IC67080

本人按这个案例成功解决了问题。

                                               


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: