互联网服务数据库

SLQ1084C解决方案

我现在用的是 liunx+db2 9.5。  实例 db2inst1  数据库 sample 第一次出现问题时, connect to sample 报出SQL1084C问题,通过db2 ? SQL1084C (1) 修改shmmax值(2)修改instance_memory值。上述两方法都试过一次,问题不能得到解决。检查db2diag.log,均说是内...显示全部
我现在用的是 liunx+db2 9.5。
  实例 db2inst1
  数据库 sample
第一次出现问题时,
connect to sample
报出SQL1084C问题,通过db2 ? SQL1084C
(1) 修改shmmax值
(2)修改instance_memory值。
上述两方法都试过一次,问题不能得到解决。
检查db2diag.log,均说是内存不够用。

后因数据库是测试用的,因此删除db2inst1内所有数据库,
db2 create database sample后,
问题依旧。
(1) db2set db2_override_bpf=5000
(2)  ./db2iupdt db2inst1
问题仍然存在。
利用db2trc on,跟踪数据,错误码:SQL0903N,同样是说内存不足。


求解?收起
参与27

查看其它 25 个回答zhmwang的回答

zhmwangzhmwangPDOceanBase
各位,请看下,这个是我收集的信息

(1) db2level

[db2inst1@server1 ~]$ db2level
DB21085I  Instance "db2inst1" uses "32" bits and DB2 code release "SQL09052"
with level identifier "03030107".
Informational tokens are "DB2 v9.5.0.2", "s080811", "MI00238", and Fix Pack
"2".
Product is installed at "/opt/ibm/db2/server/exp/V9.5".


(2) db2pd -osinfo


[db2inst1@server1 ~]$ db2pd -osinfo

Operating System Information:

OSName:   Linux
NodeName: server1
Version:  2
Release:  6
Machine:  i686

CPU Information:
TotalCPU    OnlineCPU   ConfigCPU   Speed(MHz)  HMTDegree  Cores/Socket
2           2           2           2095        1           2

Physical Memory and Swap (Megabytes):
TotalMem    FreeMem     AvailMem    TotalSwap   FreeSwap
1654        997         n/a         997         997

Virtual Memory (Megabytes):
Total       Reserved    Available   Free
2651        n/a         n/a         1994

Message Queue Information:
MsgSeg      MsgMax      MsgMap      MsgMni      MsgTql      MsgMnb      MsgSsz
n/a         65536       65536       1024        65536       65536       16

Shared Memory Information:
ShmMax               ShmMin               ShmIds      ShmSeg
3499999999           1                    4096        4096

Semaphore Information:
SemMap      SemMni      SemMns      SemMnu      SemMsl      SemOpm      SemUme      SemUsz      SemVmx      SemAem
32000       1024        32000       32000       250         32          n/a         20          32767       32767

(3) more /etc/sysctl.conf


  # Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 7794967295
#kernel.shmmax =  573741824
#4294967295
# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 862144
kernel.shmall = 86214400


(4) db2 get dbm cfg show detail

[db2inst1@server1 ~]$ db2 get dbm cfg show detail

          Database Manager Configuration

     Node type = Database Server with local and remote clients

Description                                   Parameter   Current Value              Delayed Value
---------------------------------------------------------------------------------------------------------------
Database manager configuration release level            = 0x0c00

CPU speed (millisec/instruction)             (CPUSPEED) = 4.959614e-07               4.959614e-07

Max number of concurrently active databases     (NUMDB) = 8                          8
Federated Database System Support           (FEDERATED) = NO                         NO


Java Development Kit installation path       (JDK_PATH) = /home/db2inst1/sqllib/java/jdk32 /home/db2inst1/sqllib/java/jdk32

Diagnostic error capture level              (DIAGLEVEL) = 3                          3
Notify Level                              (NOTIFYLEVEL) = 3                          3
Diagnostic data directory path               (DIAGPATH) = /home/db2inst1/diagpath    /home/db2inst1/diagpath
Database manager authentication        (AUTHENTICATION) = SERVER                     SERVER
Cataloging allowed without authority   (CATALOG_NOAUTH) = NO                         NO
Trust all clients                      (TRUST_ALLCLNTS) = YES                        YES
Trusted client authentication          (TRUST_CLNTAUTH) = CLIENT                     CLIENT
Bypass federated authentication            (FED_NOAUTH) = NO                         NO

Default database path                       (DFTDBPATH) = /home/db2inst1             /home/db2inst1

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

Agent stack size                       (AGENT_STACK_SZ) = 256                        256
Sort heap threshold (4KB)                  (SHEAPTHRES) = 0                          0

Directory cache support                     (DIR_CACHE) = YES                        YES

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

Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10                         10

Priority of agents                           (AGENTPRI) = SYSTEM                     SYSTEM
Agent pool size                        (NUM_POOLAGENTS) = AUTOMATIC(100)             AUTOMATIC(100)
Initial number of agents in pool       (NUM_INITAGENTS) = 0                          0
Max number of coordinating agents     (MAX_COORDAGENTS) = AUTOMATIC(200)             AUTOMATIC(200)
Max number of client connections      (MAX_CONNECTIONS) = AUTOMATIC(MAX_COORDAGENTS) AUTOMATIC(MAX_COORDAGENTS)

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

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

SPM log size                          (SPM_LOG_FILE_SZ) = 256                        256


No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = AUTOMATIC(1024)            AUTOMATIC(1024)
No. of int. communication channels   (FCM_NUM_CHANNELS) = AUTOMATIC(512)             AUTOMATIC(512)
db2start/db2stop timeout (min)        (START_STOP_TIME) = 10                         10



(5) db2 create database sample

[db2inst1@server1 ~]$ db2 create database sample
SQL1084C  Shared memory segments cannot be allocated.  SQLSTATE=57019
互联网服务 · 2011-05-26
浏览409

回答者

zhmwang
PDOceanBase
擅长领域: 数据库服务器国产数据库

zhmwang 最近回答过的问题

回答状态

  • 发布时间:2011-05-26
  • 关注会员:1 人
  • 回答浏览:409
  • X社区推广