Skip to content

How to Check Group of OSDBA

  • Oracle

OSDBA or OSOPER

OSDBA and OSOPER are just a symbol name defined by Oracle database, users belonged to either group are natively granted to use SYSDBA or SYSOPER system privilege.

For Windows platforms, OSDBA is always ORA_DBA whereas OSOPER is ORA_OPER. So there's no need to guess in Windows database servers.

For Linux and Unix, since their actual group names may not be so obvious in database server, it might become difficult if we need to add an user to OSDBA group.

Solutions

To know and determine the actual group of OSDBA, OSOPER, OSDGDBA, OSKMDBA or OSBACKUPDBA in Linux database server, we should trace back our installation logs for sure.

OSDBA

For example, we'd like to know the actual group of OSDBA, we can search for "DBA_GROUP" string among installation logs in $ORACLE_HOME/cfgtoollogs/.

[oracle@test ~]$ grep -R "VAR = DBA_GROUP" $ORACLE_HOME/cfgtoollogs/
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[main] [ 2020-07-02 01:37:04.072 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DBA_GROUP VAL = null
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:01.788 EDT ] [CVUVariables.secureVariableValueTrace:776] setting CVUVariable : VAR = DBA_GROUP VAL = dba
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:01.907 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DBA_GROUP VAL = dba
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:02.003 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DBA_GROUP VAL = dba
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:39.186 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DBA_GROUP VAL = dba

Now we have known the real value of OSDBA group is dba.

OSDGDBA

In a similar way, we can search for "DGDBA_GROUP" string for OSDGDBA which has SYSDG privileges to perform Data Guard operations.

[oracle@test ~]$ grep -R "VAR = DGDBA_GROUP" $ORACLE_HOME/cfgtoollogs/
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[main] [ 2020-07-02 01:37:04.080 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DGDBA_GROUP VAL = null
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:01.792 EDT ] [CVUVariables.secureVariableValueTrace:776] setting CVUVariableConstant : VAR = DGDBA_GROUP VAL = dgdba
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:01.911 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DGDBA_GROUP VAL = dgdba
/u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/oui/InstallActions2020-07-02_01-36-47AM/installActions2020-07-02_01-36-47AM.out:[pool-1-thread-1] [ 2020-07-02 01:40:02.007 EDT ] [CVUVariables.secureVariableValueTrace:776] getting variable : VAR = DGDBA_GROUP VAL = dgdba

Consequently, the OSDGDBA is dgdba.

RAC Databases

To determine OSDBA and OSOPER in a RAC database system, we have a more convenient way to find out.

[oracle@primary01 ~]$ srvctl config database -d ORCLCDB
...
OSDBA group: dba
OSOPER group: oper
...

That's it.

Leave a Reply

Your email address will not be published. Required fields are marked *