Before you begin
When you are creating a database, you must log in to the system where the database is hosted by using the database administrator account. The default values for DB2
® are db2admin
™ and db2inst1
™ and AIX
About this task
This procedure is required for the IBM
- Optional: This step is required only if the database server and IBM Docs are installed on different systems. Copy the IBM Docs SQL scripts to the DB2 database system and authorize a user ID to create the databases.
Note: The required SQL scripts are in the IBMDocs_Install_Package/setupDB subdirectory directory of the IBM Docs setup directory.
Note: Ensure that the user ID also has write privileges for the directory that includes these scripts.
- Log in to the DB2 database system with the user ID of the database instance owner. This user ID must have privileges to create a database, a table space, tables, and indexes.
- Start the DB2 command line processor in command mode and enter the following command:
Run the script to create the database.
- Windows: db2start
- Linux: db2start
Run the script to update the database schema:
- Windows: createDb.bat
- Linux: . ./createDb.sh
Close the DB2 command line processor.
- Windows: updateDBSchema.bat
- Linux: . ./updateDBSchema.sh
Note: Make sure that the user ID has the write privilege for the directory of these scripts.
Parent topic: Creating a DB2 database for IBM Docs
Creating a dedicated database instance
Creating a dedicated DB2 user
The default database name of IBM Docs is CONCORD. If you want to use another name, run prepare_db_name.py before you create the database, as follows:
python prepare_db_name.py [db_name]
The Python file replaces all script files (.sql, .bat, .sh) with new database name. The database server must support the Python runtime environment. The prepare_db_name.py file runs only once before it creates the database. So make sure that the database name is valid (for example, that name length is less than 8).