免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7117 | 回复: 11
打印 上一主题 下一主题

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-18 23:07 |只看该作者 |倒序浏览
DB2上运行我们一个应用系统,当时想重起数据库。停掉应用系统,db2stop停掉数据库实例,再连接的时候报SQL30081N错误。

环境:
aix v5.2
myhost/home/db2udbp$db2level
DB21085I  Instance "db2udbp" uses "64" bits and DB2 code release "SQL08020"
with level identifier "03010106".
Informational tokens are "DB2 v8.1.1.64", "s040812", "U498350", and FixPak "7".
Product is installed at "/usr/opt/db2_08_01".
---------------------------------------------------------------------------------
db cfg 信息因连接不上看不到了
dbm cfg 如下:

          Database Manager Configuration

     Node type = Enterprise Server Edition with local and remote clients

Database manager configuration release level            = 0x0a00

CPU speed (millisec/instruction)             (CPUSPEED) = 5.668131e-07
Communications bandwidth (MB/sec)      (COMM_BANDWIDTH) = 1.000000e+02

Max number of concurrently active databases     (NUMDB) = 8
Data Links support                          (DATALINKS) = NO
Federated Database System Support           (FEDERATED) = YES
Transaction processor monitor name        (TP_MON_NAME) =

Default charge-back account           (DFT_ACCOUNT_STR) =

Java Development Kit installation path       (JDK_PATH) = /usr/java13_64

Diagnostic error capture level              (DIAGLEVEL) = 3
Notify Level                              (NOTIFYLEVEL) = 3
Diagnostic data directory path               (DIAGPATH) = /home/db2udbp/sqllib/db2dump

Default database monitor switches
   Buffer pool                         (DFT_MON_BUFPOOL) = OFF
   Lock                                   (DFT_MON_LOCK) = OFF
   Sort                                   (DFT_MON_SORT) = OFF
   Statement                              (DFT_MON_STMT) = OFF
   Table                                 (DFT_MON_TABLE) = OFF
   Timestamp                         (DFT_MON_TIMESTAMP) = ON
   Unit of work                            (DFT_MON_UOW) = OFF
Monitor health of instance and databases   (HEALTH_MON) = ON

SYSADM group name                        (SYSADM_GROUP) = DB2GRP1
SYSCTRL group name                      (SYSCTRL_GROUP) =
SYSMAINT group name                    (SYSMAINT_GROUP) =
SYSMON group name                        (SYSMON_GROUP) =

Client Userid-Password Plugin          (CLNT_PW_PLUGIN) =
Client Kerberos Plugin                (CLNT_KRB_PLUGIN) =
Group Plugin                             (GROUP_PLUGIN) =
GSS Plugin for Local Authorization    (LOCAL_GSSPLUGIN) =
Server Plugin Mode                    (SRV_PLUGIN_MODE) = UNFENCED
Server List of GSS Plugins      (SRVCON_GSSPLUGIN_LIST) =
Server Userid-Password Plugin        (SRVCON_PW_PLUGIN) =
Server Connection Authentication          (SRVCON_AUTH) = NOT_SPECIFIED
Database manager authentication        (AUTHENTICATION) = SERVER
Cataloging allowed without authority   (CATALOG_NOAUTH) = NO
Trust all clients                      (TRUST_ALLCLNTS) = YES
Trusted client authentication          (TRUST_CLNTAUTH) = CLIENT
Bypass federated authentication            (FED_NOAUTH) = NO

Default database path                       (DFTDBPATH) = /home/db2udbp

Database monitor heap size (4KB)          (MON_HEAP_SZ) = 90
Java Virtual Machine heap size (4KB)     (JAVA_HEAP_SZ) = 2048
Audit buffer size (4KB)                  (AUDIT_BUF_SZ) = 0
Size of instance shared memory (4KB)  (INSTANCE_MEMORY) = AUTOMATIC
Backup buffer default size (4KB)            (BACKBUFSZ) = 1024
Restore buffer default size (4KB)           (RESTBUFSZ) = 1024

Sort heap threshold (4KB)                  (SHEAPTHRES) = 20000

Directory cache support                     (DIR_CACHE) = YES

Application support layer heap size (4KB)   (ASLHEAPSZ) = 15
Max requester I/O block size (bytes)         (RQRIOBLK) = 32767
Query heap size (4KB)                   (QUERY_HEAP_SZ) = 1000

Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10

Priority of agents                           (AGENTPRI) = SYSTEM
Max number of existing agents               (MAXAGENTS) = 400
Agent pool size                        (NUM_POOLAGENTS) = 200(calculated)
Initial number of agents in pool       (NUM_INITAGENTS) = 0
Max number of coordinating agents     (MAX_COORDAGENTS) = (MAXAGENTS - NUM_INITAGENTS)
Max no. of concurrent coordinating agents  (MAXCAGENTS) = MAX_COORDAGENTS
Max number of client connections      (MAX_CONNECTIONS) = MAX_COORDAGENTS

Keep fenced process                        (KEEPFENCED) = YES
Number of pooled fenced processes         (FENCED_POOL) = MAX_COORDAGENTS
Initial number of fenced processes     (NUM_INITFENCED) = 0

Index re-creation time and redo index build  (INDEXREC) = RESTART

Transaction manager database name         (TM_DATABASE) = 1ST_CONN
Transaction resync interval (sec)     (RESYNC_INTERVAL) = 180

SPM name                                     (SPM_NAME) = htcwdb2
SPM log size                          (SPM_LOG_FILE_SZ) = 256
SPM resync agent limit                 (SPM_MAX_RESYNC) = 20
SPM log path                             (SPM_LOG_PATH) =

TCP/IP Service name                          (SVCENAME) = db2c_db2udbp
Discovery mode                               (DISCOVER) = SEARCH
Discover server instance                (DISCOVER_INST) = ENABLE

Maximum query degree of parallelism   (MAX_QUERYDEGREE) = ANY
Enable intra-partition parallelism     (INTRA_PARALLEL) = NO

No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = 4096
Number of FCM request blocks              (FCM_NUM_RQB) = AUTOMATIC
Number of FCM connection entries      (FCM_NUM_CONNECT) = AUTOMATIC
Number of FCM message anchors         (FCM_NUM_ANCHORS) = AUTOMATIC

Node connection elapse time (sec)         (CONN_ELAPSE) = 10
Max number of node connection retries (MAX_CONNRETRIES) = 5
Max time difference between nodes (min) (MAX_TIME_DIFF) = 60

db2start/db2stop timeout (min)        (START_STOP_TIME) = 10

---------------------------------------------------------------------------------
以下都是通过Xmanager在服务器端的操作:

db2实例用户是db2udbp
实例可以启动:
myhost#su - db2udbp
myhost/home/db2udbp$db2start
03/18/2005 22:12:30     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.

但是连接不上数据库mydb
myhost/home/db2udbp$db2 connect to mydb
SQL30082N  Attempt to establish connection failed with security reason "3"
("ASSWORD MISSING".  SQLSTATE=08001
不知道为什么现在实例用户也必须要输入密码了???(同事说几天前就这样了)

输入密码后报30081N错误
myhost/home/db2udbp$db2 connect to mydb user db2udbp using xxxxxx
SQL30081N  A communication error has been detected.  Communication protocol
being used: "TCP/IP".  Communication API being used: "SOCKETS".  Location
where the error was detected: "10.1.1.1".  Communication function detecting
the error: "recv".  Protocol specific error code(s): "*", "*", "0".  
SQLSTATE=08001
myhost/home/db2udbp$

重起AIX系统后还是同样的错误!
偶是新手,刚接手db2就碰到个问题,用户周一就要用了,我哭啊(
请各位老大帮忙看看什么问题,先多谢了!

msn: cyber_flying@hotmail.com
qq:  19464332

论坛徽章:
0
2 [报告]
发表于 2005-03-19 09:39 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

等下有时间帮你查查,应该不需要密码,那你加上user db2udbp  using pass 看看呢

论坛徽章:
0
3 [报告]
发表于 2005-03-19 10:02 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

使用db2 connect to dbname user  dbuser using dbpass可以的。
db2 list db directory 显示是什么?

论坛徽章:
0
4 [报告]
发表于 2005-03-19 13:17 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

多谢两位关注!
加上密码后就报了SQL30081N的错误了啊!

db2 list db directory显示的信息如下:

System Database Directory

Number of entries in the directory = 2

Database 1 entry:

Database alias                       = mydb
Database name                        = mydb
Node name                            = NDE9EF20
Database release level               = a.00
Comment                              =
Directory entry type                 = Remote
Authentication                       = SERVER
Catalog database partition number    = -1
Alternate server hostname            =
Alternate server port number         =

Database 2 entry:

Database alias                       = SAMPLE
Database name                        = SAMPLE
Local database directory             = /home/db2udbp
Database release level               = a.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0
Alternate server hostname            =
Alternate server port number         =

论坛徽章:
0
5 [报告]
发表于 2005-03-20 12:11 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

首先你连的不是本的数据库,Directory entry type     = Remote ,所以你必须输入你所连接的远程数据库已grant的用户名和密码,你要明白你所su 的用户名只是本机上的实例的用户名,而远程的数据库并不一定grant你所su 的用户,因为mydb只是远程的一个数据库的在本地一个编目。

论坛徽章:
0
6 [报告]
发表于 2005-03-20 17:34 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

重新编目一下你的数据库试试吧。

论坛徽章:
0
7 [报告]
发表于 2005-03-21 09:48 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

感觉你的数据库的实例没有启,执行:db2start吧!

论坛徽章:
0
8 [报告]
发表于 2005-03-22 08:38 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

问题解决了,有两个错误:
数据库本来是本底的,不知道被谁改成远程的了;
同事改变了日志路径,但是路径还写错了!

论坛徽章:
0
9 [报告]
发表于 2005-03-22 11:11 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

F/T,还有这样大意的事!!!!

论坛徽章:
0
10 [报告]
发表于 2005-03-22 12:19 |只看该作者

求救: SQL30081N错误,数据库实例可启动,但是不能连接数据库

再次倒了! :em11:
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP