ibm DB2服务器安装配置
- 格式:docx
- 大小:1.07 MB
- 文档页数:17
DB2安装手册(Windows)、安装数据库运行setup.exeT宜u.■e安装产品/■^k・出-saWfFfi--:«?:r=*ep=nfiyt俣:士*mn通加=艮急■演而立・力・朔图1a.I J}«.同降言同"EffiEi^rai市如划CH归,s密国ms:苑国南症章&■石,"■—■■鼻..则利・MET*5?吗LMHU跖四|£.■工件4隙期片胸电工DB2仁LeiOiMXtUft-Kia^跑知的或I.孙:JH=GE■正任■#》[从f CR.if.€JHl日图OPU:i n山UL UhIXEWrfM?/弄■_匕口出主篁I快M.8用不01鲍氏毒企史胤tSLE斑3ms.珀螂司蜗射皿TF=大再好讣针苦H SHH*.SEH I聒?式.4Hr况壬*ME■EtE3・・£把口鼻麻二立工.S«M7制他的两足・烟砂西拜・嗟古开丁访即同"开元Effi冷E:呼闲.mftlSfffiBSSNUe.gWs晌月4■町『口出金IdVEja金航匕用产五口UH0M.**登.地0甘U30河^>3啪幽啊ffl;幅WSFIB1L号加件加皿JtaEEELHl,:I1HfcttjOJ二|W高辑里界日七江机口上)319上航工局11£+1工=于C€?K Mm,3iMmiKT用户KUlKHE工世:IL而口ED??—Q^_耐,箱E>BH亚<A-5C1O-.COlE.iCU JDDOS匚L」OLEEC HETPUP n PariU ftunr r EHn事昭咫1・q库丁口国E4M丽叫&»uin।Ki酬」盍汨总・I:C L P J rFimE・m8WiJD£MSE£j-ZfllW«¥::Hl»^lJMC..HET.PHPIDRltT^□0»ii4.Jddna faiX*ail皿知3015.阜联5ED:前1匚与《疾聚基*5hEF二羽弓叼东笳鼻IBMEUUMU-JkSfl-lhil:»r WtUM晶但蛆7DH下一步下一步点DB2空装-D02EnterpriseServerEdition-DB2COPY1软件许可协议请仔细阅读下列讦可证协议。
前言:为了方便的连接到IBM小型机,管理数据库,我们使用DB2客户端连接到DB2服务端,同oracle的模式差不多,下面就将客户端的安装及配置做一个说明一、DB2 client的安装1.找到安装介质DB2FORWINDOWS2. 运行setup.exe3.看到上面的界面,在安装产品上点击,可以看到DB2客户机,选择安装新产品按钮。
4.点击下一步5.点击下一步选择典型安装点击完成,安成DB2客户端的安装二、DB2 client的配置1.打开控制中心.在新安装的DB2客户端程序处依次选择IBM DB2--->DB2 COPY1(缺省值)--->一般管理工具--->控制中心2.所有系统--->添加这里需要修改一个host文件,可以在C:\WINDOWS\system32\drivers\etc 下面找到输入10.46.120.46 xxzx0202按照下图输入下面的信息3.在实例上点击右键点击添加出现下面的界面点击发现:出现下面的界面.现有实例与数据库的对应表:实例2(db2inst2) 下有三个数据库连接端口50001Database name = EOS87Database name = CKBWXTDatabase name = XMGL2实例3(db2inst3) 下有二个数据库连接端口50002Database name = TESTDatabase name = CLRDB_KF点击db2inst2或db2inst3 ,勿用db2inst1(这是测试使用的空间数据库)按照上面的对照表, 这里我们以db2inst2为例,将实例增加在操作系统下面.在这里实例节点名称处填写DB2INST2,这里查验一下端口号,看是否正常. 最后点击确定4.在数据库处点右键添加点击发现,出现此实例下面的三个数据库选择实例下面的一个数据库加入到实例下面。
要加多个重复第4步。
5.要增加新的实例重复3,4二个步骤。
db2的使用DB2是IBM公司开发的关系型数据库管理系统,它可以运行在多个操作系统平台上,如Windows、Linux、Unix和IBM的主机操作系统等。
DB2的功能非常强大,可以用于各种企业级应用程序的开发和部署。
在本文中,我们将详细介绍DB2的使用,包括安装、配置、管理和编程等方面。
一、DB2的安装和配置1、先前准备(1)确定需要安装的DB2版本和操作系统平台,以及应用场景和需求;(2)确保计算机符合DB2的最低系统要求,包括硬件和软件配置等;(3)获取适用于操作系统的DB2安装介质,可以从IBM官网或授权渠道获取。
2、安装过程(1)下载安装介质并解压缩至指定位置;(2)运行安装程序,按照提示进行安装,可以根据需要选择安装路径和组件;(3)在安装向导中选择“完整安装”,可以安装DB2服务器、客户端、控制台和示例数据库等组件;(4)在安装向导中设置DB2实例的参数,如实例名称、端口、用户名和密码等,这些参数将决定DB2服务器的启动和运行方式;(5)完成安装后,可以通过命令行或控制台查看DB2实例状态,控制服务器的启停和配置。
3、基本配置(1)启动DB2服务器可以通过控制台或命令行方式启动DB2服务器,如下:Linux/Unix平台:db2startWindows平台:db2cmd,进入命令行模式,输入db2start启动服务器。
(2)连接DB2实例db2 connect to DATABASE user USERNAME using PASSWORDDATABASE为数据库名称,USERNAME为用户名,PASSWORD为密码。
(3)创建数据库db2 create database DATABASEDATABASE为数据库名称。
(4)设定权限和用户PRIVILEGE为权限名称,USER为用户名,OBJECT为对象名称。
二、DB2的管理1、数据库的备份和还原2、数据库的维护TABLENAME为表名称。
Linux系统环境下DB2服务器的安装与配置一、系统环境:Centos Linux 5.4 Enterprise Edition(默认已安装)二、服务器前期基本配置1.更改主机名为DB2servervi /etc/sysconfig/network#修改成如下配置NETWORKING=yesNETWORKING_IPV6=noHOSTNAME=DB2serverGATEWAY=192.168.1.1vi /etc/hosts添加如下一行:192.168.1.49 DB2server(注:这里服务器的ip为当前机器的ip地址)2.修改系统时间date -s 07/13/2013date -s 15:41:003.关闭selinuxvi /etc/selinux/config#修改如下行SELINUX=disabled4.设置eth0的IP地址为192.168.1.49/24vi /etc/sysconfig/network-scripts/ifcfg-eth0# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth0BOOTPROTO=staticBROADCAST=192.168.1.255HWADDR=00:0C:29:8B:14:B2IPADDR=192.168.1.49NETMASK=255.255.255.0NETWORK=192.168.1.0ONBOOT=yes5.设置DNS地址为192.168.1.1vi /etc/resolv.conf#添加如下一行nameserver 192.168.1.16.关闭不需要的服务注:在日常的服务器维护过程中,原则上只保留syslog,network,sshd,Crond 服务chkconfig list|grep 3:onchkconfig network onchkconfig syslog onchkconfig sshd onchkconfig crond on对于其他的服务,采用service XXX stopchkconfig XXX off即可。
DB2V10.5PureScale安装指导书forLinuxandAIX(⾮infiniband)IBM DB2 V10.5 PureScale forLinux and AIX安装指导书1⽬录1⽬录 (1)2⽂档说明 (3)2.1⽂档版本 (3)2.2⽂档类型 (3)2.3⽂档摘要 (3)3准备⼯作 (4)3.1缩写释义 (4)3.2实验安装环境 (4)3.3预安装检查 (4)3.3.1AIX安装要求 (4)3.3.2AIX集群环境配置 (10)3.3.3Linux安装要求 (14)3.3.4Linux集群环境配置 (19)3.4介质准备 (24)3.4.1AIX系统介质准备 (24)3.4.2Linux系统介质准备 (24)3.5核⼼⽂件安装 (26)3.5.1使⽤ db2_install安装 (26)3.5.2GPFS ⽂件系统配置与挂载 (30)3.5.3db2 许可证配置 (32)4DB2实例配置及验证 (34)4.1创建数据库组和⽤户标识 (34)4.1.1⽤户和组命名说明 (34)4.1.2创建组和⽤户 (36)4.2创建实例及版本验证 (37)4.2.1创建实例 (37)4.2.2db2 版本检查 (39)4.3查看实例的集群状态 (40)4.4启动实例 (40)4.5添加member (41)4.6添加CF (42)4.7为实例配置 TCP/IP 通信 (43)4.7.1更新 services ⽂件 (43)4.7.2更新数据库管理器配置 (44)4.8配置 DB2 服务器通信 (44)5数据库创建 (44)5.1实例注册变量设置 (44)5.1.1注册变量设置 (44)5.1.2注册变量检查 (45)5.2创建SAMPLE数据库 (45)2⽂档说明2.1⽂档版本⽂档历史2.2⽂档类型2.3⽂档摘要本⽂档描述数据库产品 DB2 V10.5.0.4 PureScale在Linux 和 Unix平台的安装、配置等内容。
总部数据仓库DB2 9.7 客户端安装说明1.安装系统环境:Windows 7 32位专业版(中文版)2.安装流程:在Windows7的环境下,必须使用系统内置的Administrator账户,使用自己建立的账户无法进行安装。
下载压缩包后,解压缩到指定的目录,然后到\DB2客户端\ESE\image\db2\Windows目录中执行IBM Data Server Client.msi出现如下安装界面:注意:如果使用非Administrator账户,否则安装可能会提示用户不符合db2对用户的要求。
单击安装界面中的“next”按钮,出现如下界面:选择"I accept the terms in the license agreement"点击"next"按钮,出现以下界面:选择"Typical"点击"next"按钮,出现以下界面:选择"Install IBM Data Server Client on this computer"点击"next"按钮,出现以下界面:可以变更安装目录,建议安装在默认的C盘下,点击"next"继续出现以下画面:这个界面不需要更改内容,直接"next"进入下一个画面:这个界面不需要更改内容,直接"next"进入下一个画面:这个界面不需要更改内容,直接"install"进入下一个安装进度画面:等待进度条完成以后出现以下画面:点击"Finish"完成安装。
会跳出一个配置画面,如下:该窗口可以直接关闭。
进行手动配置3.配置数据库连接:完成了db2客户端安装以后,在"开始"-"程序"-"IBM DB2"-" Command Line Tools"-"DB2COPY1 (Default)"点击" Command Window - Administrator"打开命令行配置界面如下:在配置界面中复制粘贴一下内容:DB2 CATALOG TCPIP NODE saspub REMOTE 190.2.242.173 SERVER 60000DB2 CATALOG db saspub AS saspub AT NODE saspub显示DB20000I CATALOG TCPIP NODE 命令成功完成。
DB2、Websphere的安装、配置及程序发布DB2、Websphere 从安装到配置到最终的程序发布共需要三个主要的工具:DB2、Websphere 和WSstudio Application Developer。
其中WSstudio Application Developer是一个打包工具。
1.WSstudio Application Developer的安装插入WSstudio安装盘,启动安装程序(目录为:Wsstudio/setup.exe)即可进行Wsstudio的安装。
安装过程中,除了安装目录可以根据各人的需求更改,其他选项都建议使用默认值。
2.ear 文件的生成•Wsstudio安装完毕后执行如下操作来生成ear文件:选择开始→程序→IBM Websphere Studio Application Developer→IBM Websphere Studio Application Developer。
Websphere Studio Application Developer启动后可看到如图1所示界面。
图1•在已打开的Application Developer中新建项目:“企业应用程序”点击右键,选择“新建”→“企业应用程序”项目(如图2所示,图中蓝条项为所选项)。
图2•选择“企业应用程序”项目后会出现创建“企业应用程序”项目对话框(如图3所示)图3其中:“企业应用程序”项目名是您为您所创建的项目起的名字(例如此处起名为’tjltest’);由于只有Web服务,因此在“想要创建哪些附加模块项目?”中只选择“Web项目名”(如图3中的操作)。
点击“确认”,完成创建工作。
•项目创建好后把需要发布的页面文件放入Application Developer中,为最终发布做准备。
待发布文件页面放入的路径为:Wsstudio的安装目录 \IBM \ ApplicationDeveloper\ workspace \tjltestWeb(根据前面所创建的项目名产生的) \webapplication•放好待发布文件后刷新webapplication :选择(导航器中)tjltestWeb(根据前面所创建的项目名产生的)→webapplication右键→从本地刷新(操作实例如图4)图4•导出ear文件:选择(导航器中)tjltest右键→导出ear文件(操作如图5所示)。
DB2的参数配置说明1.数据库配置参数:-DFT_DEGREE:默认配置为1,表示数据库服务器可以并行处理的任务数量。
可以根据服务器硬件配置调整此参数,以提高并行处理能力。
-MAXAPPLS:默认配置为100,表示数据库支持的最大并发连接数。
如果数据库负载较高,可以适当增加此值。
-LOCKLIST:默认配置为200,表示数据库锁的最大数量。
如果数据库经常出现锁冲突,可以适当增加此值。
-SHEAPTHRES:默认配置为0,表示数据库共享内存区域的大小。
可以根据数据库工作负载的大小调整此值,以提高性能。
2.缓冲池参数配置:-PCKCACHESZ:控制预编译包缓冲池的大小,为了提高性能,可以根据实际需求调整此参数。
-HADR_SYNCMODE:用于配置DB2的高可用性和灾难恢复功能。
可以根据实际需求选择异步或同步模式。
-LOGFILSIZ:表示数据库日志文件的最大大小。
可以根据数据库运行情况和可用存储空间来调整此参数。
-UTIL_HEAP_SZ:用于配置数据库工具的堆大小。
可以根据数据库工具的需求来调整此值,以提高操作效率。
3.SQL优化参数配置:-STMTHEAP:用于配置SQL语句的堆大小。
可以根据SQL语句的复杂度和数据量来调整此参数,以提高查询性能。
-STMM:表示是否开启自动内存管理功能。
可以根据实际需求选择开启或关闭。
-OPT_MEMORY:表示查询优化器使用的内存大小。
可以根据查询复杂度和数据量来调整此值,以提高查询性能。
-DIAGLEVEL:用于配置记录诊断信息的级别。
可以根据需要调整此参数,进行问题排查和性能优化。
以上是一些常见的DB2参数配置说明,根据实际需求和数据库运行情况,可以调整这些参数来达到最佳的性能和可靠性。
需要注意的是,调整参数配置时应谨慎,并进行充分测试和验证,以避免潜在的风险和问题。
IBM® DB2® Web Query for i™5733WQXInstall Instructions – Version 2.2.0(Updated 03/29/2017)This document provides the instructions for installation and setup of DB2 Web Query, 5733WQX, version 2.2.0. It is recommended that the steps be completed in the order listed. All steps should be performed under the sign-on of QSECOFR or a user with *SECADM and *ALLOBJ authority, unless stated otherwise.1. Install prerequisite products, options, and PTFsReview the 5733WQX prerequisite programs, options and PTFs listed in Info APAR II14818, and verify that all prerequisites are installed for your version of IBM i. The APAR is located athttps:///BdirFq.2. Restore the DB2 Web Query licensed programThe IBM i standard and keyed media set will include DB2 Web Query 2.2.0 when ordered afterApril 15, 2016. The 5733WQX base product and all options are included on one disc. If your Web Query discs are older than 2.2.0, order a new copy or download it from Entitled Software Support (ESS). Detailed steps for ESS can be found in the FAQ at http://ibm.co/db2wqfaq. The 2.2.0 disc is identified by the following label information.IBM iDB2 Web Query for i5733-WQX V2.2.0F_MULTI_NLVLCD8-1900-02To install the base product and optional features, use the Restore Licensed Program(RSTLICPGM) command. Minimally, you must install the base product, Express or StandardEdition, and Developer User options. Example commands are shown below. Substitute OPT01with your optical drive. For each restore command, read the license agreement and press F14 toaccept it.•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) –Base product•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(1) –Express Edition•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(2) –Standard Edition•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(4) –Developer Users•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(5) –Developer Workbench Users•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(6) – Runtime Enablement Groups•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(7) –JD Edwards Adapter•RSTLICPGM LICPGM(5733WQX) DEV(OPT01) OPTION(8) –DataMigrator for i3. Set a password and CCSID for the QWQADMIN profileWhen the product is installed, it creates a user profile QWQADMIN with no password. Set apassword for the profile using the command CHGUSRPRF USRPRF(QWQADMIN)PASSWORD(<yourpwd>). Failure to do so will prevent DB2 Web Query from starting.The Web Query server’s code page should correspond to the CCSID of your data to reduce dataconversions. If one of the following conditions apply, set the CCSID in the QWQADMIN profile to override the default system CCSID for server jobs:- The default system CCSID is 65535.- The default system CCSID is different than the CCSID of the data accessed by your reports.To check the value of the default system CCSID, use the command DSPSYSVAL QCCSID.To set the CCSID in the QWQADMIN profile, use the CHGUSRPRF command. Here is anexample command for the English CCSID: CHGUSRPRF USRPRF(QWQADMIN) CCSID(37).4. Add license keysFor new installations, you have a 70-day trial period before you are required to enter license keys.Add license keys for the base product and each optional feature using the Add License KeyInformation (ADDLICKEY) command.5. Start DB2 Web QueryTo start DB2 Web Query, use option 1 of the Work with Web Query (WRKWEBQRY) tool.Alternatively, you can use the Start Web Query (STRWEBQRY) command.To end DB2 Web Query, use the WRKWEBQRY tool, the End Web Query (ENDWEBQRY)command, or the End Subsystem (ENDSBS) command for the Web Query subsystem. Whenending the subsystem, do not use the default DELAY(*NOLIMIT) parameter on the ENDSBScommand. Instead, specify a number of seconds to delay for a controlled end or specifyOPTION(*IMMED). Here is example syntax:ENDSBS SBS(QWEBQRY21) DELAY(60)ENDSBS SBS(QWEBQRY21) OPTION(*IMMED)6. Add licensed usersWhen DB2 Web Query is active, go to http://your_system:12331/webquery, where your_system is the name or IP address of the system with Web Query installed. Login using the administrativeprofile, QWQADMIN. Click Administration and then click Security Center.From the Security Center you can add licensed users and assign permissions. For moreinformation, refer to the Security Concepts section of the DB2 Web Query 2.1.0 New Featuresdocument at http://ibm.co/db2wqnewfeatures.7. Install the Developer Workbench client (optional)If you installed option 5, Developer Workbench Users, then the licensed users of this optionshould download and install the Developer Workbench client on their PCs. To install the client,follow these steps.A.Download the three files in binary from the IFS directory/qibm/ProdData/QWEBQRY/DeveloperWorkbench to a folder on the Windows PC. The filenames are:WQDevWork220.sfx.part1.exeWQDevWork220.sfx.part2.rarWQDevWork220.sfx.part3.rarB.Run WQDevWork220.sfx.part1.exe.The Dev Workbench Package Install dialog box displays, as shown in the following image.Note: Clicking Install will create a new WQDevWork220.exe file in the same folder whereyou are running WQDevWork220.sfx.part1.exe. Optionally, you can change the destinationfolder for the new file.C.Click Install. The WQDevWork220.exe file will be created in the Destination folder. TheWQDevWork220.exe will then automatically run, and the Developer Workbench installationwizard will start.The installation and setup of DB2 Web Query is now complete and you are ready to create and run reports. Details on configuring the product’s features can be found in the Product Manual at https:///Bd4vj6. You can also refer to the Web Query wiki at http://ibm.co/db2wqwiki for links to the user forum, videos, service levels, feature articles, and other getting started information.APPENDIX A: NLS ConfigurationFollow the instructions in this appendix if you wish to configure Web Query for any of these:•Language other than English•NLS settings such as1.Setting the default currency symbol2.Setting the default numeric formattingThe Web Query user interface currently supports the following languages:Arabic-2954Brazilian-Portuguese-2980Chinese-Simplified-2989Chinese-Traditional-2987Croatian-2912Czech-2975Danish-2926Dutch-2923Dutch-Belgium-2963English-2924English DBCS-2984English Uppercase DBCS-2938Finnish-2925French-2928French-Belgium-2966French-MNCS-2940French Canadian-2981German-2929German-MNCS-2939Hebrew-2961Hungarian-2976Italian-2932Italian-MNCS-2942Japanese-Upper/Lower-2930Japanese-DBCS-2962Korean-2986Norwegian-2933Polish-2978Portuguese-2922Portuguese-MNCS-2996Romanian-2992Russian-2979Slovakian-2994Spanish-2931Swedish-2937Turkish-2956Post installation steps for NLS configurationStep 1: Enable the languages for the drop-down listGo to URL http://sysname:12331/webquery. Login using the QWQADMIN user ID. Click on Administration, then Administration Console.Click on Configuration, and then Dynamic Language Switch. This switch enables the selection of languages that will appear on the Language drop down list on the login page. It is used for the DB2 Web Query user tools and GUI.In the Dynamic Language Switch window, the languages shipped with DB2 Web Query are displayed. By default, the Dynamic Language Switch and the language check boxes are unchecked. Click the Dynamic Language Switch check box to enable it. Doing so activates the Enable option check boxes for all languages. The default language (English) is automatically enabled. Click the check boxes for additional languages you want to appear in the Language drop-down list on logon pages.Once you select a language, only those that share the same character encoding will be available to be enabled. For example, Asian languages may only be enabled with English. European languages may be enabled with each other and English.Click on Save to apply the changes to the configuration. You must restart Web Query for the changes to take effect.Step 2: Set the default numeric formattingIf you wish to change the default numeric formatting, click on Custom Settings. By setting the value for Continental Decimal Notation (CDN), you can adjust the default behavior for numeric data.SET CDN= [ ON | OFF | SPACE | QUOTE | QUOTEP ]ON enables CDN. For example, the number 3,045,000.76 is represented as 3.045.000,76.OFF disables CDN. For example, the number 3,045,000.76 is represented as 3,045,000.76. OFF is the default value.SPACE separates groups of three significant digits with a space instead of a comma, and marks a decimal position with a comma instead of a period. For example, the number 3,045,000.76 is represented as 3 045 000,76.QUOTE separates groups of three significant digits with a single quotation mark instead of a comma, and marks a decimal position with a comma instead of a period. For example, the number 3,045,000.76 is represented as 3'045'000,76.QUOTEP separates groups of three significant digits with a single quotation mark instead of a comma, and marks a decimal position with a comma. For example, the number 3,045,000.76 is represented as 3'045'000.76.Example syntax:_site_profile=SET CDN = OFFNote that if the display format of a Web Query report is Excel 2000 or later, CDN is controlled by the settings on an end user’s computer. That is, numbers in report output are formatted according to the convention of the locale (location) set in regional or browser language options.Step 3: Set the default currencyIf you wish to change the default currency, edit the file/qibm/userdata/qwebqry/ibi/srv77/wfs/etc/nlscfg.err.The file is created when Web Query is started. Add the three letter code for the currency symbol you would like to use. The options are:EUR (Euro)USD (United States dollar)GBP (Pound sterling)JPY (Japanese yen)NIS (Israeli new shekel)For example, to specify the Euro, set CURRENCY = EUR.You must end DB2 Web Query and restart it for the change to take effect.Step 4: Enable visual data supportOnly perform this step if you are configuring Hebrew bi-directional language support. Enable Visual data support by editing the file/QIBM/userdata/qwebqry/base80/client/wfc/etc/cgivars.wfs. Change the WFTRANSINOUT setting to add the path com.srl.exits.WFExit. Note that it is case sensitive. Following is an example of how it should look:WFTRANSINOUT =com.srl.exits.WFExitSave and close the file.Step 5: Set the CCSID for QshellIf you are using the Arabic language and CCSID 420, the following steps are needed to specify an alternative CCSID for Web Query programs that run in Qshell, because Qshell does not support CCSID 420.1. Enter the command: wrklnk‘/qibm/userdata/qwebqry/WQLIB85/conf/i5OSStartup.properties'2. Select option 2=Edit.3. Edit the file to add this line: sid=4254. Press F3 to save the changed file.APPENDIX B: Code page mapping tableThe table below contains a mapping from the i CCSID to the Web Query Reporting Server codepage. By default, the client codepage is 65001 Unicode (UTF-8) for use with any server codepage.。