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,426 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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:Kdo
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:Kdo
ID: 22703150
Good catch, momi.

  :)


0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle - Stored Procedure Privilge access 3 39
Schema creation in Oracle12c 6 39
Oracle - SQL Parse String 5 17
Oracle Listener Not Starting 11 21
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Via a live example, show how to take different types of Oracle backups using RMAN.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now