Preparing the Database
Now we need to configure the database so that the plug-in can work with it. This requires coping some files from the plug-in's folder to the necessary SQLLIB locations.
We also need to create the schema, tables, and stored procedures necessary to run the plug-in.
Steps:
- Open a DB2 Command Window from the Start Programs menu, or open a command window and type db2cmd.
- If DB2 has not been started yet, do so with the command, db2start. Alternatively, you can also start DB2 from the control center.
- If you have not yet created a database with the name that you specified in the db2auth_key.txt file, you can easily create one and issue it the name of your choice with the command:
db2 create db (your database name here)
- Connect to the authentication database:
db2 connect to (your database name here)
- Next, type the command:
db2auth_preparedb.bat > out.txt 2 > &1
This will run the batch script that prepares the DB2 database for plug-in use.
It copies some plug-in files to the necessary SQLLIB locations. It also creates a schema called DB2AUTH, tables (USERS, GROUPS, GROUP_MEMBERSHIPS), and stored procedures.
- Check the file, out.txt, to verify that the process completed successfully.
- Keep the DB2 Command Window open