How to create a user in DB2

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.