In different environments, the methods for creating a DB2 instance are different. The following describes how to create a DB2 instance in Windows.
In Windows, run the following command to create a DB2 instance: db2icrt instance_name
Note that instance_name must follow the following rule command:
1) cannot exceed 8 characters
2) It cannot start with "SQL", "ibm", or "sys"
3) it cannot start with a number or contain characters other than a-z, $, #, @, _, or 0-9.
For example:
DB2BIN> db2icrt insttest
The DB20000I DB2ICRT command is successfully completed.
DB2BIN> db2ilist -- list DB2 instances on the server
INSTTEST
D: DB2BIN>
To delete an instance, disconnect all databases and run the following command to stop the instance:
Db2idrop-f instance_name
For example:
DB2BIN> db2idrop-f insttest
The DB20000I DB2IDROP command is successfully completed.
DB2BIN>
View the instance configuration file
-- Default
DB2 GET DBM CFG
-- Split-screen display
DB2 get dbm cfg | More
-- Save the displayed result to the cfg. out file.
DB2 get dbm cfg> cfg. out
DB2 common table expression usage
Cross-database access to DB2 tables
Lotus Notes calls the DB2 Stored Procedure
DB2 connection Server Configuration
DB2 lock compatibility and deadlock