Tuesday, May 30, 2023

DB_DEVELOPER_ROLE for Developers on 23c

 Oracle 23c comes with a new role called "DB_DEVELOPER_ROLE" packed with sufficient privileges for most developers on non-production systems, rather than assigning them the DBA role which violates the least-privilege security principle.

DB_DEVELOPER_ROLE role is packed with the following privileges:

CREATE TYPE
CREATE MATERIALIZED VIEW
CREATE TRIGGER
CREATE PROCEDURE
CREATE JOB
CREATE SEQUENCE
CREATE VIEW
CREATE SYNONYM
CREATE TABLE
CREATE SESSION
CREATE DOMAIN
CREATE MLE
CREATE ANALYTIC VIEW
CREATE HIERARCHY
CREATE ATTRIBUTE DIMENSION
EXECUTE DYNAMIC MLE
CREATE CUBE BUILD PROCESS
CREATE CUBE
CREATE CUBE DIMENSION
CREATE MINING MODEL
DEBUG CONNECT SESSION
ON COMMIT REFRESH
CREATE DIMENSION
FORCE TRANSACTION
EXECUTE ON SYS.JAVASCRIPT
SELECT ON SYS.DBA_PENDING_TRANSACTIONS
READ ON SYS.V_$STATNAME
READ ON SYS.V_$PARAMETER

Reference:

https://docs.oracle.com/en/database/oracle/oracle-database/23/dbseg/managing-security-for-application-developers.html#GUID-DCEEC563-4F6C-4B0A-9EB2-9F88CDF351D7

TOP command is not showing the processes in a right order

Problem:

I came across a weird problem where top Linux command is not sorting the processes by the top consumer processes under oracle user, but when running top Linux command with any other user it sorts the processes in a right order.
If you still unable to understand the issue, look at this screenshot which shows top command output under oracle user on the left side where the processes are listed randomly, and the same command output ran by opc user on the right side where the processes are sorted by the top consumers.

There is no alias being invoked for top command:

 

Analysis:

There is a file with name ".toprc" under /home/oracle saves top command settings, where it influences top command output. This file get created when you press "W" after calling top command to save its current call setting:

Solution:

I've simply renamed the .toprc file and the top command output is back to its normal setting sorting the processes by top CPU consumers.

# cd ~
# mv .toprc  .toprc.old

 

Conclusion:

This is not a problem, but it's just a wrong configuration impacted the output of top command and also impacted the behavior of all monitoring script that depend on top command output for reporting the top consuming processes.

References:

https://www.thegeekstuff.com/2010/01/15-practical-unix-linux-top-command-examples/