Friday, 4 March 2016

Create a New DB2 Database and Granting All privileges to User in Linux

Step 1: Login a db2inst1 user
Step 2: Issue the following command to create a New Database
db2inst1$ db2 CREATE DATABASE <Database_Name>
E.g. #db2 CREATE DATABASE TESTDB
Step 3: Create a new user in Linux as root
#useradd -m testuser
Step 4: Grant All the privileges to user by connecting to newly created DB
"GRANT CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,DBADM,SECADM ON DATABASE TO USER testuser;"

No comments:

Post a Comment