Solved

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;

Posted on 2008-10-12
9
2,600 Views
Last Modified: 2013-12-07
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;
0
Comment
Question by:smahadevappa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
9 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 250 total points
ID: 22700344
db2admin create /user:user1 /password:user1
db2admin setid user1
GRANT DBADM ON DATABASE TO USER user1

0
 

Author Comment

by:smahadevappa
ID: 22700373
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
 
LVL 16

Expert Comment

by:Peter Kwan
ID: 22700391
can you try to create the user account in the OS?
0
 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

 

Author Comment

by:smahadevappa
ID: 22700414
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
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 22701590
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
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 250 total points
ID: 22703013
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
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 22703150
Good catch, momi.

  :)


0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question