Creating users in DB2 is a common operation. The following describes how to create users in DB2 in detail. If you have encountered similar problems when creating users in DB2, take a look.
1. Create an instance user
Mkdir/db2/db2test
Smitty user
Select Add a User
* User NAME [db2test]
User ID []
Administrative user? False
Primary GROUP [db2iadm1]
Group SET [staff]
Administrative groups []
ROLES []
Another user can su to user? True
Su groups [ALL]
HOME directory [/db2/db2test]
Initial PROGRAM [/usr/bin/ksh]
2. Create an instance DB2_install =/usr/opt/db2_08_01/instance
./Db2icrt-u db2test db2test
3. Create a database
Su-db2test
Db2start # If you do not start the instance, SQL1032N No start database manager command was issued. SQLSTATE = 57019
Db2 create db db2test
4. delete a database
Db2 drop db db2test
Db2stop
5. delete an instance
Cd DB2_install
./The db2idrop-f db2test #-f parameter must be added. Otherwise, an error will be reported after deletion!
6. delete a user
Smitty user
Select Remove a User
* User NAME [db2test] +
Remove AUTHENTICATION information? Yes
Delete user directory
Rm-rf db2test
Top 10 considerations for DB2 Performance Optimization
Connect SQL SERVER to the DB2 database
Implementation of DB2 circular Query
Rollback of A DB2 partitioned Database
Two Methods for restoring DB2 partitioned Database