How do I create a user with DBA permissions in DB2 similar to in Oracle - create user user1 identified by user1;grant dba to user1;grant connect to user1;

How do I create a user with DBA permissions in DB2 similar to in Oracle - create user user1 identified by user1;grant dba to user1;grant connect to user1;
smahadevappaAsked:
Who is Participating?
 
Peter KwanConnect With a Mentor Analyst ProgrammerCommented:
db2admin create /user:user1 /password:user1
db2admin setid user1
GRANT DBADM ON DATABASE TO USER user1

0
 
smahadevappaAuthor Commented:
hi
tried

a) was logged in as admin adn tried create /user:user1 /password:user1

b) db2admin create /user:user1 /password:user1

both say not a valid DBA command.



below you can find error message.

create /user:user1  /password:user1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "create" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "SELECT". SQLSTATE=42601
db2 => db2admin create /user:portalCS71SP1 /password:portalCS71SP1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "db2admin" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "<values>".
SQLSTATE=42601

Is there anything else I need to do ?
0
 
Peter KwanAnalyst ProgrammerCommented:
can you try to create the user account in the OS?
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
smahadevappaAuthor Commented:
Hmm.. I am not aware of creating user in AIX where I can set privileges to DB2 user.

Letting me know how to do will be helpfull.

0
 
Kent OlsenData Warehouse Architect / DBACommented:
Your unix administrator (someone with access to the *root* account) should be able to create the user(s) for you.

Then it's just a matter of executing the GRANT statement.


Kent
0
 
momi_sabagConnect With a Mentor Commented:
try to issue the above commands but not from within the command line processor
just use a plain shell of your use and issue the above commands
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Good catch, momi.

  :)


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.