To create a test environment on the DB2 UDB server:
In our example, we will create an instance called VALIDATE by entering the following commands:
mkgroup testers mkuser pgrp='testers' groups='testers' home='/home/validate' validate /usr/lpp/db2_07_01/instance/db2icrt -u validate validate
db2 get instance
This command should return the following output:
The current database manager instance is: VALIDATE
If you did not receive this output, enter the following commands:
set DB2INSTANCE=VALIDATE db2 get instance
db2 update dbm cfg using datalinks yes
To disable DB2 Data Links Manager functionality on your DB2 server, set the DATALINKS database manager configuration parameter to no.
Note: | If you change a setting in an instance's database manager configuration file, you must ensure that you stop and restart the instance (using the db2stop and db2start commands) for the changes to take effect. In our example, we had not started the VALIDATE instance and that is why we only issued the db2start command. For more information, refer to the Administration Guide. |
For our example, create a database called STAFF by entering the following command:
db2 create database staff
db2 connect to staff
db2 "create table employee (id int, fname varchar(30), lname varchar(30), picture datalink linktype url file link control integrity all read permission db write permission blocked recovery yes on unlink restore)"
db2 connect reset