This document describes how to configure an IBM DB2 v9.5 for Linux, Unix, and Windows (LUW) Data Server to Work with vCenter Server. These configuration tasks are mandatory to use a DB2 database with vCenter Server. General Setup Considerations As a prerequisite, review the software requirements for vCenter Server with DB2. (See the ESX and vCenter Server Installation Guide.) A DB2 database for vCenter Server can be configured either locally on the same machine as vCenter Server (Microsoft Windows) or remotely on a network-connected host (Microsoft Windows or Linux). The following procedure instructs you on how to prepare a DB2 instance and database for the vCenter Server installation option "Use an existing database server." Before you begin, a DB2 instance must be created and configured for incoming TCP connections. For more details on basic DB2 installation and setup, see "Getting Started with DB2 Installation and Administration on Linux and Windows" on the DB2 documentation Web site: http://www.ibm.com/support/docview.wss?rs=71&uid=swg27009727. Basic Setup for Local and Remote Database Scenarios 1. DB2 by default uses the operating system authentication for all its database users. An initial user must therefore be created on the operating system. The following instructions assume you have created a user called "vcx". 2. If the database is hosted on a Windows machine, add the user "vcx" as a member to the group "DB2USERS". Ignore this step if you are running the database on DB2 for Unix or Linux on a remote system. 3. Create a user group "DBSYSMON" and add the user "vcx" as a member. 4. Add the group "DBSYSMON" to the group of users capable of database system monitoring. For this and the following steps, open a DB2 Command Window or Command Line Processor (CLP) as DB2 instance owner. On Windows, select Start menu > IBM DB2 > DB2COPY1 > Command Line Tools > Command Window. On Linux and Unix, open a terminal and switch your user to the DB2 instance owner. Execute the following commands to make sure the DB2 instance is started: db2start db2 update dbm cfg using sysmon_group dbsysmon 5. Enable the DB2 Administrative Task Scheduler (ATS) and restart the instance. Run the following commands to restart the instance. This affects all databases in this instance. db2set DB2_ATS_ENABLE=YES db2stop force db2start 6. Create the database, including all necessary buffer pools, table spaces and privileges. To simplify this process, you can use the DB2 script shown here. Three default values in the DB2 script can be customized as needed using a text editor. However it is recommended not to modify anything else. Changing the setup for table spaces or buffer pools might prevent a successful installation of Virtual Center. Customizable values: - Database name: VCDB(same value must be used for the ODBC setup) - Database path: C:\ for Windows or UNIX path with sufficient permissions - User name: VCX (same value must be used for the ODBC setup) To execute the script, open a DB2 Command Window and run the following command: db2 -svtf vcdbinit_windows.db2 =================================================== CREATE DATABASE VCDB AUTOMATIC STORAGE YES ON 'C:\' DBPATH ON 'C:\' USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 4096 ; UPDATE DB CFG FOR VCDB USING AUTO_MAINT ON; UPDATE DB CFG FOR VCDB USING AUTO_TBL_MAINT ON; UPDATE DB CFG FOR VCDB USING AUTO_RUNSTATS ON; UPDATE ALERT CFG FOR DATABASE ON VCDB USING db.db_backup_req SET THRESHOLDSCHECKED YES; UPDATE ALERT CFG FOR DATABASE ON VCDB USING db.tb_reorg_req SET THRESHOLDSCHECKED YES; UPDATE ALERT CFG FOR DATABASE ON VCDB USING db.tb_runstats_req SET THRESHOLDSCHECKED YES; CONNECT TO VCDB; grant select on sysibmadm.applications to user VCX; CREATE BUFFERPOOL VCBP_8K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 8 K ; CREATE LARGE TABLESPACE VCTS_8k PAGESIZE 8 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 32 OVERHEAD 12.67 PREFETCHSIZE 32 TRANSFERRATE 0.18 BUFFERPOOL VCBP_8K; CREATE BUFFERPOOL VCBP_16K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 16 K ; CREATE LARGE TABLESPACE VCTS_16k PAGESIZE 16 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 32 OVERHEAD 12.67 PREFETCHSIZE 32 TRANSFERRATE 0.18 BUFFERPOOL VCBP_16K; CREATE BUFFERPOOL VCBP_32K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 32 K ; CREATE LARGE TABLESPACE VCTS_32k PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 32 OVERHEAD 12.67 PREFETCHSIZE 32 TRANSFERRATE 0.18 BUFFERPOOL VCBP_32K; connect reset; terminate; CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4; CREATE USER TEMPORARY TABLESPACE SYSTOOLSTMPSPACE IN IBMCATGROUP MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4; CREATE SYSTEM TEMPORARY TABLESPACE VCTEMPTS_8K PAGESIZE 8 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL VCBP_8K ; CREATE SYSTEM TEMPORARY TABLESPACE VCTEMPTS_16K PAGESIZE 16 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL VCBP_16K ; CREATE SYSTEM TEMPORARY TABLESPACE VCTEMPTS_32K PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL VCBP_32K ; GRANT USE OF TABLESPACE VCTS_16K TO USER VCX WITH GRANT OPTION; GRANT USE OF TABLESPACE VCTS_32K TO USER VCX WITH GRANT OPTION; GRANT USE OF TABLESPACE VCTS_8K TO USER VCX WITH GRANT OPTION; commit work; ============================================= Configuring a DB2 Connection to Work locally (Windows) Configure an ODBC connection: 1. Open the "Microsoft ODBC Administrator" utility. Click Start menu > Run and enter "odbcad32.exe". 2. On the "System DSN" tab, click on "Add". 3. Select the correct driver (for example, IBM DB2 ODBC Driver - DB2COPY1). 4. Enter a new name for the DSN (for example, VCDB2) and select the previously created database from the pulldown menu. 5. To test whether the connection to the database works, select the new DSN and click "Configure." 6. Enter the database username (for example, vcx) and password and click "Connect." Note: You do not need to save the user ID and password. Configuring a DB2 Connection to Work remotely (Unix or Linux) In a remote database setup, the IBM data server runtime client needs to be installed on the Windows machine that hosts the vCenter Server application. For more information, go to http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.client.doc/doc/t0007315.html. 1. Open the "Microsoft ODBC Administrator" utility. Select Start menu > Run and enter "odbcad32.exe". 2. On the "System DSN" tab, click "Add." 3. Select the correct driver (for example, IBM DB2 ODBC Driver - DB2COPY1) and click "Finish." 4. Enter a new data source name (for example, vcdbremote) and click "Add." 5. In the CLI/ODBC settings dialog, click the "TCP/IP" tab. 6. For TCP/IP settings, insert the following values: - Database name: vcdb (default value) - Database Alias: - Host name: The hostname or IP-address of your data server - Port number: 50000 (default on Windows), 50001 (default on Linux and Unix) Check the value for dbm cfg SVCENAME and its associated numerical value in the file C:\Windows\system32\drivers\etc\services or /etc/services on Unix and Linux).