Alternative to Allowing the vCenter Server Installer to Create the Database Schema To prepare a DB2 database to work with vCenter Server, you generally need to create a DB2 database user that owns the database schema objects. When you do this, you must make sure that the database user login is the owner of the database schema for the vCenter Server system. For environments in which the user cannot have the DB2 SYSADMIN permissions on the vCenter Server database, you can instead run scripts that create the vCenter Server database schema before you run the vCenter Server installer. To create the vCenter Server database schema 1) Create the vCenter Server database. -- ============================================================================== -- Run with DB2 SYSADMIN authorization for every new vCenter Server database repository. -- ============================================================================== Use the Command Editor (Start -> Programs -> IBM DB2 -> Command Line Tools -> Command Editor) to create the DB2 database using the following scripts: CREATE DATABASE VCDB AUTOMATIC STORAGE YES ON 'C:\' DBPATH ON 'C:\' USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 4096; -- Hard coding the default settings in DB2 Version 9.5 UPDATE DB CFG FOR VCDBTEST USING SELF_TUNING_MEM ON; UPDATE DB CFG FOR VCDBTEST USING AUTO_MAINT ON; UPDATE DB CFG FOR VCDBTEST USING AUTO_TBL_MAINT ON; UPDATE DB CFG FOR VCDBTEST USING AUTO_RUNSTATS ON; -- Enforcing alerts 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; --Creating the buffer pools and tablespaces (No changes are required for this script. The installer checks for the specific tablenames and bufferpools.) CONNECT TO VCDB; 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; 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 ; commit work; connect reset; terminate; 2) Create a vCenter Server database user with the correct permissions. -- ============================================================================== -- Run with DB2 SYSADMIN authorization for every new vCenter Server schema. The script uses the default schema of the user. -- ============================================================================== Create a user on the OS first. Then run the following script to create the schema. Usually the schema name and username are the same. Make the DB2 OS user a member of db2users group in Windows. For Linux installations, create an OS user and an OS group. The OS user must be a member of the OS group. This is required for the sysmon_group privilege. Grant table space and user defined function privileges to user (OS user created) GRANT USE OF TABLESPACE VCTS_16K TO USER VPX WITH GRANT OPTION; GRANT USE OF TABLESPACE VCTS_32K TO USER VPX WITH GRANT OPTION; GRANT USE OF TABLESPACE VCTS_8K TO USER VPX WITH GRANT OPTION; commit work; 3) Open a DB2 Command window with the user that you created on the vCenter Server database. 4) Locate the dbschema scripts in the vCenter Server installation package bin/dbschema directory. 5) Run the script on the database. Open the script in the Command Editor window and press Ctrl+Return to execute the script. VCDB_db2.SQL 6) Run the scripts on the database. Change the statement termination character from ';' to '@'. Open the scripts one at a time in the Command Editor window and press Ctrl+Return to execute each script in the order shown here: purge_stat1_proc_db2.sql purge_stat2_proc_db2.sql purge_stat3_proc_db2.sql purge_usage_stats_proc_db2.sql stats_rollup1_proc_db2.sql stats_rollup2_proc_db2.sql stats_rollup3_proc_db2.sql cleanup_events_db2.sql delete_stats_proc_db2.sql 7) Ensure that the DB2_ATS_ENABLE registry variable is set. Run these scripts to set up scheduled jobs on the database. a) -- ============================================================================== -- Run with DB2 SYSADMIN authorization from the DB2 Command Editor window for every new vCenter Server database repository. -- ============================================================================== # Usergroup creation, i.e., "DBSYSMON" is needed - dependent on the OS (alternatively use DB2USERS on Windows) db2set DB2_ATS_ENABLE=YES db2 update dbm cfg using SYSMON_GROUP DBSYSMON db2stop force db2start b)Run the following scripts to set up scheduled jobs in Command Editor with statement termination character set to '@' job_schedule1_db2.sql job_schedule2_db2.sql job_schedule3_db2.sql job_cleanup_events_db2.sql 8) On the machine on which you intend to install vCenter Server, create a data source name (DSN) that points to the database server with the vCenter Server schema that you created. 9) Run the vCenter Server installer and, when prompted, provide the database user login that you created.