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,384 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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.

744 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

12 Experts available now in Live!

Get 1:1 Help Now