The setupGSDB script lets you provide information on the
command line to reduce the number of prompts from the script.
Procedure
From a command line, run the script for your operating
system.
Operating system |
Script |
Windows |
setupGSDB.bat |
Linux or UNIX |
setupGSDB.sh |
You can run the setupGSDB scripts with the following options:
- -createdb
- Creates the database. This option drops any existing database
with the same name. It creates the required buffer pool and table
space.
- -database
- Specifies the name of the database. This value overrides the default
value of GDSB.
- -userid administration_user_ID
- Specifies the name of the DB2 administrator
user ID that is used to create the database.
- -password administration_user_ID
- Specifies the password for the DB2 administrator
user ID.
- -noprompt
- Indicates that no prompts will display. This option runs the script
in silent mode. Any missing information causes the script to fail.
Example
- Example 1: You are a DB2 administrator
and want to create the default GSDB database on the local node. You
run the following command:
setupGSDB -createDB -noprompt
- Example 2: You want to create the tables in an existing
database named GSDB2, and you want to use the administrator user ID
db2admin. Run the following command:
setupGSDB -database GSDB2 -userid db2admin
The
script prompts you for the password when it connects to GSDB2. The
script deletes any existing sample tables or views and replaces them.