IBM BPM, V8.0.1, All platforms > Install IBM BPM > IBM BPM Advanced for z/OS: Process Server > Configure IBM BPM Advanced for z/OS: Process Server > Create the databases > Create databases in the DB2 for z/OS subsystem
Configure the DB2 command line processor
Before you run the createDB2.sh script, configure the DB2 command line processor by defining a set of environment variables and a db2 command alias. You must also define alias names that can be used to connect to the DB2 for z/OS server.
Ensure that a properties file, for example, clp.properties, exists for the DB2 command line processor. If required, you can create your own properties file by using the sample properties file that is available in the directory where the command line processor is installed. See your DB2 for z/OS documentation.
Procedure
- Configure the DB2 command line processor for each user ID that will work with DB2 for z/OS from the command line. You can update the personal or shared user profiles as follows:
- Modify the CLASSPATH environment variable to include the clp.jar file.
- Use the CLPPROPERTIESFILE environment variable to define the fully qualified name of the properties file for the command line processor.
- Define the db2 command as an alias for the command that starts the command line processor.
- Specify the DB2JccConfiguration.properties file that defines the JDBC properties to be applied to the command line processor.
You can use the following syntax to add the required entries to the .profile or /etc/profile file:
export CLPHOME= clp_install_dir export CLASSPATH=$CLASSPATH:$CLPHOME/lib/clp.jar export CLPPROPERTIESFILE= clp_properties_file_path alias db2="java -Ddb2.jcc.propertiesFile=/ file_path/DB2JccConfiguration.properties com.ibm.db2.clp.db2"
For example:
export CLPHOME=/shared/db2910_base export CLASSPATH=$CLASSPATH:$CLPHOME/lib/clp.jar export CLPPROPERTIESFILE=/wasv8config/clp.properties alias db2="java -Ddb2.jcc.propertiesFile=/wasv8config/DB2JccConfiguration.properties com.ibm.db2.clp.db2"- In the properties file for the command line processor, define alias names that can be used to connect to the DB2 for z/OS server. An alias name definition can include the following entities:
- A URL that specifies the domain name or IP address of the database server, the port on which the server listens, and the DB2 location name defined during installation. The URL can take the form: server: port/ database. The port is optional, and the DB2 location name must be specified in uppercase characters.
- A user ID and an associated password that can be used to connect to the DB2 server. This user ID should correspond to the user ID (with SYSADM authority) that the DB2 system administrator uses to run the createDB2.sh script.
You can add the required alias name entries to the properties file by using the following syntax:
DB2ALIASNAME= URL, user_ID, password
For example:
DSNXWBD=localhost:9446/DSNXWBD,SYSADM1,SYSPWRD1When you define a DB2ALIASNAME value in the properties file, ensure that the correct connection details are specified to avoid connecting to the wrong database and inadvertently overwriting its contents.
- Configure the DB2 DBACRVW subsystem parameter to enable user IDs with DBADM authority on a database to perform the following tasks for other user IDs: create views on tables in the database, create aliases for tables, and create materialized query tables. You can use the installation Command List (CLIST) to access the DSNTIPP ISPF panel and update the DBADM CREATE AUTH field to set DB2 ZPARM DBACRVW=YES.
What to do next
Use the createDB2.sh script to either run the SQL to create the database objects for a specified database, or to consolidate the SQL statements into two .sql files that you can run later using other database tools.
Create databases in the DB2 for z/OS subsystem
Related tasks:
Create DB2 for z/OS database objects using the createDB2.sh script
Create DB2 for z/OS database objects using the DB2 command line processor
Related information:
createDB2.sh script