DB2笔记Word格式文档下载.docx
《DB2笔记Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《DB2笔记Word格式文档下载.docx(26页珍藏版)》请在冰豆网上搜索。
优化每个实例的数据库管理器配置。
限制实例失败所带来的影响。
若一个实例失败,则只影响一个实例。
其它实例可继续正常运行。
应注意多个实例存在一些小缺点:
每个实例都需要额外的系统资源(虚拟内存和磁盘空间)。
由于要管理附加实例,因此增加了管理工作量。
实例目录存储着与一个数据库实例相关的所有信息。
实例目录一旦创建,就不能更改其位置。
该目录包含:
数据库管理器配置文件
系统数据库目录
节点目录
节点配置文件(db2nodes.cfg)
包含调试信息(例如异常或寄存器转储或用于DB2(R)通用数据库(DB2UDB)进程的调用堆栈)的其它任何文件。
在UNIX(R)操作系统上,该实例目录位于INSTHOME/sqllib目录,其中INSTHOME是实例所有者的主目录。
二、安装DB2UDB修订包
这文章网上也有,自己去下载最新的或者你需要的fixpack,ftp,compress-d,tar之类的命令折腾之后,开始准备安装。
不过安装之前要注意如下几点:
A、在每个DB2实例上,您都必需注册为实例所有者并执行:
1.DB2“forceapplicationsall”命令,以强制执行该实例的所有应用程序。
2.DB2“terminate”,以停止所有后端DB2进程。
3.db2stop,以停止实例服务。
4.db2licdend,以停止许可证守护程序。
B、注册为admin服务器所有者并用db2adminstop命令停止admin服务器。
然后就可以安装了,用Root用户执行
./installFixPak-y
CheckinglevelofDB2V8installation...
Runningupdateall
现在就开始update了。
+-----------------------------------------------------------------------------+
Summaries:
InstallationSummary
--------------------
Name
Level
Part
Event
Result
-------------------------------------------------------------------------------
db2_08_01.ch.zh_CN.eucCN
8.1.1.104
USR
APPLY
SUCCESS
db2_08_01.ch.en_US.iso885918.1.1.104
db2_08_01.cc
db2_08_01.sqlproc
8.1.1.104
db2_08_01.repl
db2_08_01.pext
db2_08_01.msg.zh_CN.utf8
db2_08_01.msg.zh_CN.gbk
db2_08_01.msg.zh_CN.eucCN
db2_08_01.msg.en_US.iso88598.1.1.104
db2_08_01.ldap
db2_08_01.jhlp.zh_CN.eucCN
db2_08_01.jhlp.en_US.iso8858.1.1.104
db2_08_01.jdbc
db2_08_01.inst
db2_08_01.icut
db2_08_01.icuc
db2_08_01.fs
db2_08_01.essg
db2_08_01.dj
db2_08_01.db2.samples
db2_08_01.db2.rte
db2_08_01.das
db2_08_01.cs.rte
db2_08_01.conv
db2_08_01.conn
db2_08_vucs
db2_08_01.client
db2_08_01.cj
db2_08_01.ca
db2_08_01.db2.engn
COMMIT
SUCCESS
Logsavedin/tmp/installFixPak.log.8.1.1.104
太慢了,等了将近15分钟,updateover.不过不能着急,还需要update一下instance才行。
/usr/opt/db2_08_01/instance#./db2iupdt-aSERVER-w64-udb2fenc1-edb2inst1
DBI1070IProgramdb2iupdtcompletedsuccessfully.
Ok,现在可以重新启动instance了。
三、基本设置
启动instance
$db2start
04/20/200603:
33:
37
0
SQL5043N
Supportforoneormorecommunicationsprotocolsfailedtostartsuccessfully.However,coredatabasemanagerfunctionalitystartedsuccessfully.
SQL1063N
DB2STARTprocessingwassuccessful.
有failed的字样,看来还需要设置些什么
1、db2set-idb2inst1DB2COMM=tcpip
2、db2updatedbmcfgusingSVCENAMEDB2_db2inst1
再次启动INSTANCE
db2stop
42:
38
SQL1064N
DB2STOPprocessingwassuccessful.
45
呵呵,那个failed没有了。
要允许实例在每次系统重新启动后自动启动,输入以下命令:
db2iauto-ondb2inst1
要阻止实例在每次系统重新启动后自动启动,输入以下命令:
db2iauto-offdb2inst1
删除实例的命令:
[r6test]/usr/opt/db2_08_01/instance#./db2idropdb2inst1
四、一些命令
1、db2licm许可管理工具
db2licm-l
或者db2licm-?
看看结果就知道了。
DBI1401ICommandlineDB2LicenseManager.
Explanation:
Thedb2licmtoolperformsbasiclicensefunctionsintheabsence
oftheControlCenter.
Itadds,removes,lists,andmodifies
licensesinstalledonthelocalsystem.
Todeterminetheproductidentifierforyourproductissuethe
db2licm-lcommand.
db2licm[-afilename]
[-eproduct-identifierHARD|SOFT]
[-pproduct-identifier
REGISTERED|CONCURRENT|OFF]
[-rproduct-identifier]
[-uproduct-identifiernum-users]
[-cproduct-identifiernum-connectors]
[-nproduct-identifiernum-processors]
[-l]
[-v]
[-?
]
Thecommandoptionsare:
-aAddsalicenseforaproduct.
Specifyafilenamecontaining
validlicenseinformation.Thiscanbeobtainedfromyour
licensedproductCDorcontactyourIBMrepresentativeor
authorizeddealer.
-eUpdatestheenforcementpolicyonthesystem.
Validvalues
are:
HARDandSOFT.HARDspecifiesthatunlicensedrequestswill
notbeallowed.SOFTspecifiesthatunlicensedrequestswillbe
loggedbutnotrestricted.
-pUpdatesthelicensepolicytypetouseonthesystem.
The
keywordsCONCURRENT,REGISTERED,orCONCURRENTREGISTEREDcanbe
specified.
SpecifyOFFtoturnoffallpolicies.
-rRemovesthelicenseforaproduct.
Afterthelicenseis
removed,theproductfunctionsin"
Try&
Buy"
mode.
-uUpdatesthenumberofuserentitlementsthathavebeen
purchased.
Specifythepasswordoftheproductforwhichthe
entitlementswerepurchasedandthenumberofusers.
-cUpdatesthenumberofconnectorentitlementsthathavebeen
entitlementswerepurchasedandthenumberofconnectors.
-nUpdatesthenumberofentitledprocessors.
Speci