← Oracle// SCRIPTS

Security

How to list all roles and privileges granted to a user in Oracle

Show every role, system privilege, and object privilege granted to one account, from DBA_ROLE_PRIVS, DBA_SYS_PRIVS, and DBA_TAB_PRIVS.

11g12c18c19c21c23ai26ai

How to revoke a system privilege from a user or role in Oracle

Revoke a system privilege from a user or role, after checking the current grant, then verify it is gone.

11g12c18c19c21c23ai26ai

How to create and enable a Unified Auditing policy in Oracle

Create a Unified Auditing policy with CREATE AUDIT POLICY and turn it on with AUDIT POLICY, then verify it is enabled.

12c18c19c21c23ai26ai

How to list encrypted tablespaces and columns in Oracle

List what TDE actually protects: encrypted tablespaces (V$ENCRYPTED_TABLESPACES) and encrypted columns (DBA_ENCRYPTED_COLUMNS).

11g12c18c19c21c23ai26ai

How to check the TDE wallet status in Oracle

Check the TDE keystore (wallet): whether it is open, its location, and type, from V$ENCRYPTION_WALLET.

11g12c18c19c21c23ai26ai

How to check traditional audit settings in Oracle

Show the traditional (pre-Unified) audit configuration: statement, privilege, and object audit options.

11g12c18c19c

How to list enabled Unified Auditing policies in Oracle

List which Unified Auditing policies are currently enabled and for whom, from AUDIT_UNIFIED_ENABLED_POLICIES.

12c18c19c21c23ai26ai

How to query the Unified Audit Trail in Oracle

Read recent activity from UNIFIED_AUDIT_TRAIL: who did what, from which host, and whether it succeeded.

12c18c19c21c23ai26ai

How to check if Unified Auditing is enabled in Oracle

Check whether Unified Auditing is linked into the instance using V$OPTION, which decides where audit records are written.

12c18c19c21c23ai26ai

How to review password and lockout policy per profile in Oracle

Review password and lockout limits for each profile (failed-login lockout, password lifetime, reuse, complexity) from DBA_PROFILES.

11g12c18c19c21c23ai26ai

How to find users with default passwords in Oracle

Find accounts still using a known default password with the built-in DBA_USERS_WITH_DEFPWD view, joined to account status.

11g12c18c19c21c23ai26ai

How to list all database links in Oracle

List every database link, its owner, the connect user, and the target host from DBA_DB_LINKS for a security review.

11g12c18c19c21c23ai26ai

How to find objects granted to PUBLIC in Oracle

Hunt for object privileges granted to PUBLIC, a common over-permission, using DBA_TAB_PRIVS filtered to grantee PUBLIC.

11g12c18c19c21c23ai26ai

How to find users with powerful privileges in Oracle

Find accounts holding the DBA role, SYSDBA/SYSOPER, or sweeping ANY privileges, using DBA_ROLE_PRIVS, V$PWFILE_USERS, and DBA_SYS_PRIVS.

11g12c18c19c21c23ai26ai

How to query the SYS.AUD$ audit trail in Oracle

Query Oracle SYS.AUD$ audit trail: list audit action codes, filter by ACTION# and user, and get SQL text from DBA_AUDIT_TRAIL.

11g12c18c19c21c23ai26ai