db2配置db和dbm
Posted 点点滴滴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了db2配置db和dbm相关的知识,希望对你有一定的参考价值。
----start
DB2 可以在四个不同层面配置:
一:系统环境变量(System Environment Variable)
系统环境变量用来配置DB2 的使用环境:
- 查看:set | grep DB2
- DB2DIR=/opt/ibm/db2/V9.5 --DB2安装目录
- DB2INSTANCE=db2inst1 --当前活动的实例
二:DB2 概要文件注册表(Profile Registry)
有两种DB2 概要文件注册表变量,一种是全局概要文件注册表变量,另一种是实例概要文件注册表变量。全局概要文件注册表变量影响所有的实例,实例概要文件注册表变量只影响特定的实例。它们的名称是相同的。DB2使用db2set 命令来管理这些变量。DB2 概要文件注册表非常多,但我们通常设置的却非常少,如下:
- 显示所有DB2概要文件注册表变量:db2set -lr
- 显示当前设置的所有DB2概要文件注册表变量:db2set -all
- 帮助:db2set -?
- 设置变量:db2set <parameter>=<value>
- 常用的DB2概要文件注册表变量
- DB2COMM
- DB2SYSTEM
- DB2INSTDEF
- DB2ADMINSERVER
三:数据库管理器配置(Database Manager Configuration)
以下参数用来配置实例:
查询命令:db2 get dbm cfg
设置命令:db2 update dbm cfg using <parameter_name> <value>
- 管理(Administration)
- AUTHENTICATION:数据库管理器认证(Database manager authentication)
- CATALOG_NOAUTH:没有权限就允许编目(Cataloging allowed without authority)
- CLNT_PW_PLUGIN:客户机用户标识-密码插件(Client Userid-Password Plugin)
- CLNT_KRB_PLUGIN:客户机 Kerberos 插件(Client Kerberos Plugin)
- CLUSTER_MGR:集群管理器(Cluster manager)
- DFTDBPATH:缺省数据库路径(Default database path)
- FED_NOAUTH:绕过联合认证(Bypass federated authentication)
- GROUP_PLUGIN:组插件(Group Plugin)
- LOCAL_GSSPLUGIN:本地授权的 GSS 插件(GSS Plugin for Local Authorization)
- SRV_PLUGIN_MODE:服务器插件方式(Server Plugin Mode)
- SRVCON_GSSPLUGIN_LIST:GSS 插件的服务器列表(Server List of GSS Plugins)
- SRVCON_PW_PLUGIN:服务器用户标识-密码插件(Server Userid-Password Plugin)
- SYSADM_GROUP:SYSADM 组名(SYSADM group name)
- SYSCTRL_GROUP:SYSCTRL 组名(SYSCTRL group name)
- SYSMAINT_GROUP:SYSMAINT 组名(SYSMAINT group name)
- SYSMON_GROUP:SYSMON 组名(SYSMON group name)
- TRUST_ALLCLNTS:信赖所有客户机(Trust all clients)
- TRUST_CLNTAUTH:可信的客户机认证(Trusted client authentication)
- 应用程序(Applications)
- AGENTPRI:代理程序的优先级(Priority of agents)
- FENCED_POOL:合用受防护的进程的数目(Number of pooled fenced processes)
- KEEPFENCED:保留受防护的进程(Keep fenced process)
- MAX_CONNECTIONS:最大客户机连接数(Max number of client connections)
- MAX_COORDAGENTS:最大协调代理程序数(Max number of coordinating agents)
- NUM_INITAGENTS:池中的初始代理程序数(Initial number of agents in pool)
- NUM_INITFENCED:受防护的进程的初始数目(Initial number of fenced processes)
- NUM_POOLAGENTS:代理程序池大小(Agent pool size)
- 通信(Communications)
- DISCOVER:发现方式(Discovery mode)
- SVCENAME:TCP/IP 服务名称(TCP/IP Service name)
- 诊断(Diagnostic)
- DIAGLEVEL:诊断错误捕获级别(Diagnostic error capture level)
- DIAGPATH:诊断数据目录路径(Diagnostic data directory path)
- INDEXREC:索引重新创建时间和重做索引构建(Index re-creation time and redo index build)
- NOTIFYLEVEL:通知级别(Notify Level)
- 环境(Environment)
- CPUSPEED:CPU 速度(毫秒/指令)(CPU speed (millisec/instruction))
- DFT_ACCOUNT_STR:缺省对方付费帐户(Default charge-back account)
- DISCOVER_INST:发现服务器实例(Discover server instance)
- FEDERATED:联合数据库系统支持(Federated Database System Support)
- JDK_PATH:<a href="http://lib.csdn.net/base/java" class=‘replace_word‘ title="Java 知识库" target=‘_blank‘ style=‘color:#df3434; font-weight:bold;‘>Java </a>Development Kit 安装路径(<a href="http://lib.csdn.net/base/javase" class=‘replace_word‘ title="Java SE知识库" target=‘_blank‘ style=‘color:#df3434; font-weight:bold;‘>Java</a> Development Kit installation path)
- MAXTOTFILOP:最大打开文件数
- NUMDB:最大并发活动数据库数(Max number of concurrently active databases)
- TM_DATABASE:事务管理器数据库名称(Transaction manager database name)
- TP_MON_NAME:事务处理器监视器名(Transaction processor monitor name)
- 监视(Monitor)
- DFT_MON_BUFPOOL:缓冲池(Buffer pool)
- DFT_MON_LOCK:锁定(Lock)
- DFT_MON_SORT:排序(Sort)
- DFT_MON_STMT:语句(Statement)
- DFT_MON_TABLE:表(Table)
- DFT_MON_TIMESTAMP:时间戳记(Timestamp)
- DFT_MON_UOW:工作单元(Unit of work)
- HEALTH_MON:监视实例和数据库的运行状况(Monitor health of instance and databases)
- 并行(Parallel)
- FCM_NUM_BUFFERS:内部通信缓冲区数(4KB)(No. of int. communication buffers(4KB))
- INTRA_PARALLEL:启用分区内并行性(Enable intra-partition parallelism)
- MAX_QUERYDEGREE:最大查询并行度(Maximum query degree of parallelism)
- 性能(Performance)
- AGENT_STACK_SZ:代理程序的堆栈大小(Agent stack size)
- ASLHEAPSZ:应用程序支持层堆大小(4KB)(Application support layer heap size (4KB))
- AUDIT_BUF_SZ:审计缓冲区大小(4KB)(Audit buffer size (4KB))
- BACKBUFSZ:备份缓冲区缺省大小(4KB)(Backup buffer default size (4KB))
- DIR_CACHE:目录高速缓存支持(Directory cache support)
- INSTANCE_MEMORY:实例共享内存(4KB)的大小(Size of instance shared memory (4KB))
- JAVA_HEAP_SZ:Java 虚拟机”堆大小(4KB)(Java Virtual Machine heap size (4KB))
- MON_HEAP_SZ:数据库监视器堆大小(4KB)(Database monitor heap size (4KB))
- RESTBUFSZ:复原缓冲区缺省大小(4KB)(Restore buffer default size (4KB))
- RESYNC_INTERVAL:事务再同步时间间隔(秒)(Transaction resync interval (sec))
- RQRIOBLK:最大请求者 I/O 块大小(以字节计)(Max requester I/O block size (bytes))
- SHEAPTHRES:排序堆阈值(4KB)(Sort heap threshold (4KB))
- SPM_LOG_FILE_SZ:SPM 日志大小(SPM log size)
- SPM_LOG_PATH:SPM 日志路径(SPM log path)
- SPM_MAX_RESYNC:SPM 再同步代理程序限制(SPM resync agent limit)
- SPM_NAME:SPM 名称(SPM name)
- UTIL_IMPACT_LIM:已调速实用程序对工作负载的影响(Workload impact by throttled utilities)
四:数据库配置(db cfg)
以下参数用来配置数据库:
查询命令:db2 get db cfg for <database_name>
设置命令:db2 update db cfg for <database_name> using <parameter_name> <value>
恢复默认设置命令:db2 reset db cfg
- 应用程序(Applications)
- LOCKTIMEOUT:锁定超时(秒)(Lock timeout (sec))
- MAXAPPLS:最大活动应用程序数(Max number of active applications)
- AVG_APPLS:活动应用程序的平均数目(Average number of active applications)
- MAXFILOP:每个应用程序的最大打开数据库文件数(Max DB files open per application)
- DLCHKTIME:检查死锁的时间间隔(毫秒)(Interval for checking deadlock (ms))
- MAXLOCKS:每个应用程序的锁定百分比列表(Percent. of lock lists per application)
- ENABLE_XMLCHAR:启用 XML 字符操作(Enable XML Character operations)
- WLM_COLLECT_INT:WLM 收集时间间隔(分钟)(WLM Collection Interval (minutes))
- 环境(Environment)
- CODESET:数据库代码集(Database code set)
- TERRIRORY:数据库地域(Database territory)
- DFT_MTTB_TYPES:缺省维护的选项的表类型(Default maintained table types for opt)
- SELF_TUNING_MEM:自调整内存(Self tuning memory)
- DFT_SQLMATHWARN:在算术异常时继续(Continue upon arithmetic exceptions)
- RESTRICT_ACCESS:限制访问(Restrict access)
- COLLATION_SEQUENCE:数据库整理顺序(Database collating sequence)
- DISCOVER_DB:对此数据库的发现支持(Discovery support for this database)
- DYN_QUERY_MGMT:动态SQL查询管理(Dynamic SQL Query management)
- PAGE_SIZE:数据库页大小(Database page size)
- DFT_QUERYOPT:缺省查询优化类(Default query optimization class)
- CODEPAGE:数据库代码页(Database code page)
- DB_MEM_THRESH:数据库内存阈值(Database memory threshold)
- DFT_DEGREE:并行度(Degree of parallelism)
- COUNTRY:数据库国家/地区代码(Database country/region code)
- RELEASE:数据库配置发行版级别(Database configuration release level)
- DATABASE_LEVEL:数据库发行版级别(Database release level)
- DFT_REFRESH_AGE:缺省刷新有效期(Default refresh age)
- ALT_COLLATE:备用整理顺序(Alternate collating sequence)
- 日志(Logs)
- LOGARCHMETH1:第一个日志归档方法(First log archive method)
- LOGARCHMETH2:第二个日志归档方法(Second log archive method)
- LOGARCHOPT1:logarchmeth1的选项(Options for logarchmeth1)
- LOGARCHOPT2:logarchmeth2的选项(Options for logarchmeth2)
- LOGPRIMARY:主日志文件的数目(Number of primary log files)
- LOGSECOND:辅助日志文件的数目(Number of secondary log files)
- LOGFILSIZ:日志文件大小(4KB)(Log file size (4KB))
- LOGPATH:日志文件路径(Path to log files)
- NEWLOGPATH:已更改的至日志文件的路径(Changed path to log files)
- OVERFLOWLOGPATH:溢出日志路径(Overflow log path)
- MIRRORLOGPATH:镜像日志路径(Mirror log path)
- USEREXIT:启用的日志记录的用户出口(User exit for logging enabled)
- BLK_LOG_DSK_FUL:磁盘上已满的块日志(Block log on disk full)
- LOGRETAIN:启用的恢复的日志保留(Log retain for recovery enabled)
- NUMARCHRETRY:错误时重试日志归档次数(Number of log archive retries on error)
- ARCHRETRYDELAY:日志归档重试延迟(秒)(Log archive retry Delay (secs))
- SOFTMAX:软检查点前回收的日志文件的百分比(Percent log file reclaimed before soft chckpt)
- MINCOMMIT:组落实计数(Group commit count)
- MAX_LOG:事务使用的最大主日志空间的百分比(Percent max primary log space by transaction)
- NUM_LOG_SPAN:1 个活动 UOW 的活动日志文件的数目(Num. of active log files for 1 active UOW)
- LOGHEAD:首个活动日志文件(First active log file)
- FAILARCHPATH:故障转移日志归档路径(Failover log archive path)
- VENDOROPT:供应商选项(Vendor options)
- 维护(Maintenance)
- AUTO_MAINT:自动维护(Automatic maintenance)
- AUTO_DB_BACKUP:自动数据库备份(Automatic database backup)
- AUTO_TBL_MAINT:自动表维护(Automatic table maintenance)
- AUTO_RUNSTATS:自动 runstats(Automatic runstats)
- AUTO_REORG:自动重组(Automatic reorganization)
- AUTO_STMT_STATS:自动语句统计信息(Automatic statement statistics)
- AUTO_STATS_PROF:自动统计信息概要分析(Automatic statistics profiling)
- AUTO_PROF_UPD:自动概要文件更新(Automatic profile updates)
- 性能(Performance)
- INDEXSORT:索引排序标志(Index sort flag)
- SEQDETECT:顺序检测标志(Sequential detect flag)
- MULTIPAGE_ALLOC:启用的多页文件分配(Multi-page file allocation enabled)
- STAT_HEAP_SZ:统计信息堆大小(4KB)(Statistics heap size (4KB))
- DFT_PREFETCH_SZ:缺省预取大小(页)(Default prefetch size (pages))
- APPL_MEMORY:应用程序内存大小(4KB)(Application Memory Size (4KB))
- NUM_iosERVERS:I/O 服务器的数目(Number of I/O servers)
- APPLHEAPSZ:缺省应用程序堆(4KB)(Default application heap (4KB))
- STMTHEAP:SQL 语句堆(4KB)(SQL statement heap (4KB))
- DBHEAP:数据库堆(4KB)(Database heap (4KB))
- NUM_IOCLEANERS:异步页清除程序的数目(Number of asynchronous page cleaners)
- PCKCACHESZ:程序包高速缓存大小(4KB)(Package cache size (4KB))
- LOGBUFSZ:日志缓冲区大小(4KB)(Log buffer size (4KB))
- CHNGPGS_THRESH:更改的页阈值(Changed pages threshold)
- UTIL_HEAP_SZ:实用程序堆大小(4KB)(Utilities heap size (4KB))
- SHEAPTHRES_SHR:共享排序的排序堆域值(4KB)(Sort heap thres for shared sorts (4KB))
- DFT_EXTENT_SZ:缺省表空间扩展数据块大小(页)(Default tablespace extentsize (pages))
- SORTHEAP:排序列表堆(4KB)(Sort list heap (4KB))
- DATABASE_MEMORY:数据库共享内存大小(4KB)(Size of database shared memory (4KB))
- BUFFPAGE:缓冲池大小(页)(Buffer pool size (pages))
- LOCKLIST:锁定列表的最大存储量(4KB)(Max storage for lock list (4KB))
- CATALOGCACHE_SZ:目录高速缓存大小(4KB)(Catalog cache size (4KB))
- 恢复(Recovery)
- INDEXREC:索引重新创建时间和重做索引构建(Index re-creation time and redo index build)
- AUTORESTART:启用的自动重新启动(Auto restart enabled)
- TRACKMOD:跟踪修改的页数(Track modified pages)
- LOGINDEXBUILD:在索引构建期间记录页(Log pages during index build)
- REC_HIS_RETENTN:恢复历史记录保留时间(天数)(Recovery history retention (days))
- NUM_DB_BACKUPS:要保留的数据库备份的数目(Number of database backups to retain)
- DFT_LOADREC_SES:loadrec 会话的缺省数目(Default number of loadrec sessions)
- AUTO_DEL_REC_OBJ:自动删除恢复对象(Auto deletion of recovery objects)
- TSM_PASSWORD:TSM 密码(TSM password)
- TSM_OWNER:TSM 所有者(TSM owner)
- TSM_NODENAME:TSM 节点名(TSM node name)
- TSM_MGMTCLASS:TSM 管理类(TSM management class)
- HADR_DB_ROLE:HADR 数据库角色(HADR database role)
- HADR_LOCAL_HOST:HADR 本地主机名(HADR local host name)
- HADR_LOCAL_SVC:HADR 本地服务名称(HADR local service name)
- HADR_REMOTE_HOST:HADR 远程主机名(HADR remote host name)
- HADR_REMOTE_SVC:HADR 远程服务名称(HADR remote service name)
- HADR_REMOTE_INST:远程服务器的 HADR 实例名(HADR instance name of remote server)
- HADR_PEER_WINDOW:HADR 对等窗口持续时间(秒)(HADR peer window duration (seconds))
- HADR_TIMEOUT:HADR 超时值(HADR timeout value)
- HADR_SYNCMODE:HADR 日志写同步方式(HADR log write synchronization mode)
- 状态(Status)
- CONSISTENT:(Database is consistent)
- BACKUP_PENDING:备份暂挂(Backup pending)
- ROLLFWD_PENDING:前滚暂挂(Rollforward pending)
- RESTORE_PENDING:复原暂挂(Restore pending)
- USER_EXIT_STATUS:日志记录状态的用户出口(User exit for logging status)
- LOG_RETAIN_STATUS:恢复状态的日志保留(Log retain for recovery status)
- NUM_QUANTILES:保留的分位点数目(Number of quantiles retained)
- NUM_FREQVALUES:保留的高频值的数目(Number of frequent values retained)
- 其他(UNKNOWN)
- DECFLT_ROUNDING:十进制浮点舍入方式(Decimal floating point rounding mode)
---更多参见:DB2 精萃
----声明:转载请注明出处。
----last updated on 2010.3.15
----written by ShangBo on 2009.11.13
----end
以上是关于db2配置db和dbm的主要内容,如果未能解决你的问题,请参考以下文章