cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the database users in DB2

former_member185257
Participant
0 Kudos

Hello experts,

I'm new to the DB2 database.

Can anyone please tell me how to find the database users in DB2? In which table it exactly stored information ?

Thanks,

Sunny

Accepted Solutions (1)

Accepted Solutions (1)

former_member189725
Active Contributor
0 Kudos

Please use the following SQL

db2 => select SCHEMANAME from syscat.schemata

SCHEMANAME

-------------------------

NULLID

NULLIDR1

NULLIDRA

SAPSR3

SAPSR3DB

SAPTOOLS

SQLJ

SYSCAT

SYSFUN

SYSIBM

SYSIBMADM

SYSIBMINTERNAL

SYSIBMTS

SYSPROC

SYSPUBLIC

SYSSTAT

SYSTOOLS

 

Regards

Ratnajit

former_member185257
Participant
0 Kudos

Dear Ratnajit,

I need to reset the password of SAP<SID>DB user from DB side.

Can u share the sql statement for DB2 database?

Regards,

Sunny

former_member189725
Active Contributor
0 Kudos

In DB2 , the users  exist in the OS level. In the database they exist as schema.

Request you to change the password of SAP<SID>DB in the OS level as you do for any OS user.

Then maintain the same password in the configtool as well.

That should be fine.

Regards

Ratnajit

former_member189725
Active Contributor
0 Kudos

Kindly close the thread if your question is answered.

Regards

Ratnajit

Answers (1)

Answers (1)

paul_power
Active Contributor
0 Kudos

Hi Sunny,

Here is some info about passwords on db2

As already mentioned, on db2 udb, we use operating system passwords, if you change the password on operating system level, you need to ensure the same password is updated in the encrupted db6conf file, or else logon will fail as the passwords dont match.

Connect directly to the database at command line to check connection at
database level
db2 connect to <sid> user <sid>adm using <password>
db2 connect to <sid> user db2<sid> using <password>

If you found userid or password problems at operating system level.
i.e. the password for the one of the users is expired.

Please use the following command to set the password for the users:
passwd <sid>adm <password> ,
passwd sap<sid> <password> or if the system is created via a upgrade
passwd sapr3 <password>

after you have done this, perform the following:

logon as <sid>adm
dscdb6up <sid>adm <password>
dscdb6up sap<sid> <password> or if the system is created via a upgrade
dscdb6up sapr3 <password>


Please note this applies for the Abap schema, to update the java connect
user, use the following method:
To change the sap<sid>db password you have to change it on OS level
and afterwards through the configtool.  To change with the configtool,
start the configtool, then click on secure store, then change the
value for the key jdbc/pool/<SID>/Password, click add then click on
file>apply. You will have to restart the system.

SAP Note 582875 DB6: SAP cannot log onto the database

Hope this helps.

Regards,

Paul

Former Member
0 Kudos

Hi Paul,

I have run the command

as root user > passwd sapr3

Entered twice sapr3's new password.

Then, as sidadm:

dscdb6up sapr3 <password> 

and getting the below response -

Password file '/usr/sap/RW2/SYS/global/dscdb6.conf' successfully written

Effective userid is not root.  OS passwords can not be changed.

ABORTING! Please check permissions and ownership

What does this mean?  Has the sapr3 user password changed or not?

Thanks

Abdul

former_member189725
Active Contributor
0 Kudos

Can you please raise a new thread with the problem ?

This thread is already answered .

Regards

Ratnajit