Oracle Database estates carry decades of accumulated accounts, ANY privileges, application schemas with shared passwords and audit settings nobody has revisited since the upgrade. Oracle ships most predefined accounts locked and schema only, and its own security guidelines are specific, but upgraded and manually built databases rarely match them. This guide covers how authentication and authorisation work in Oracle Database 19c and later (including Oracle AI Database 26ai), how to control administrative privileges, how to handle application and integration credentials, what unified auditing records by default, and a hardening baseline built from Oracle's guidelines and the CIS Benchmarks. It is written for DBAs, database security engineers and auditors. General database controls across engines are in the Database Security Guide; this page stays on Oracle specifics.
This is an independent guide from NHI Mgmt Group, based on Oracle's public documentation as of November 2026. It is not sponsored or reviewed by Oracle. Product features change, so confirm settings against Oracle's current documentation.
Key takeaways
- Default accounts depend on how the database was built. DBCA locks and expires most predefined accounts, a manual installation locks none, and upgraded databases can keep old default passwords; check DBA_USERS_WITH_DEFPWD everywhere.
- Separate administrative privileges exist for a reason. SYSBACKUP, SYSDG, SYSKM and SYSRAC let you stop handing out SYSDBA for backups, Data Guard, key management and clusters.
- ANY privileges and legacy roles are the real exposure. SELECT ANY TABLE, BECOME USER, EXP_FULL_DATABASE and the CONNECT, RESOURCE and DBA roles on application accounts matter more than password length.
- Only two audit policies are on by default. ORA_LOGON_FAILURES and ORA_SECURECONFIG are enabled in DBCA-created databases; account management, parameter changes and sensitive data access need policies you enable.
- Secure the application tier as well as the database. Applications such as E-Business Suite, WebLogic and Fusion Middleware connect with their own schemas, so the application schema's privileges decide the blast radius.
How identity and access work in Oracle Database
Every database user is also a schema. Users authenticate with a password verifier stored in the dictionary, with operating system or password file authentication for administrators, or with an external directory. Privileges are either system privileges (CREATE SESSION, SELECT ANY TABLE), object privileges (SELECT or READ on a table, EXECUTE on a package) or roles that bundle them. In a multitenant container database, common users exist in the root and every pluggable database (PDB), while local users exist in one PDB only.
| Authentication method | Typical use | Security notes |
|---|---|---|
| Database password | Application schemas, legacy users | Governed by profiles and PASSWORD_VERIFY_FUNCTION; passwords 12 to 1024 bytes per Oracle guidance |
| Schema only (no authentication) | Oracle-maintained schemas, application object owners | Cannot log in directly; AUTHENTICATION_TYPE shows NONE; the safest state for object owners |
| Operating system and password file | SYSDBA and other administrative connections | Membership of OS groups grants admin connections; protect the password file and OS groups |
| Kerberos, PKI certificates | Enterprise users, strong authentication | Oracle recommends strong authentication where possible |
| Directory or cloud identity | Centrally managed users, Microsoft Entra ID, OCI IAM tokens | Entra users map to one schema and optionally database roles; removes local passwords for people |
| Proxy authentication | Middle tier connecting on behalf of end users | Limit the proxy account to CREATE SESSION |
Predefined and Oracle-maintained accounts
Oracle documents SYS and SYSTEM for administration, SYSBACKUP, SYSDG, SYSKM and SYSRAC for task-specific administration, DBSNMP for the Enterprise Manager agent and AUDSYS as the owner of the unified audit trail. Most are locked and created without passwords as schema only. Accounts such as GGSYS and GSMADMIN_INTERNAL should never be unlocked. Query DBA_USERS for ACCOUNT_STATUS, AUTHENTICATION_TYPE and ORACLE_MAINTAINED; Oracle states that an account with ORACLE_MAINTAINED = Y must only be modified by the script that created it. When Enterprise Manager is installed, SYSMAN and DBSNMP are open; when it is not, only SYS and SYSTEM are open. Sample schemas such as SCOTT and HR do not belong in production.
Admin roles and privileged access
| Administrative privilege | Connects as | Use it for | Instead of |
|---|---|---|---|
| SYSDBA | SYS | Instance startup, recovery, upgrades, anything else | Nothing: keep for break-glass and change windows |
| SYSOPER | PUBLIC | Startup, shutdown and basic operations without data access | SYSDBA for operators |
| SYSBACKUP | SYSBACKUP | RMAN backup and recovery | SYSDBA in backup tooling |
| SYSDG | SYSDG | Data Guard administration and monitoring | SYSDBA in broker configurations |
| SYSKM | SYSKM | TDE keystore management, including opening the keystore at mount | SYSDBA for key custodians |
| SYSRAC | SYSRAC | Real Application Clusters operations | SYSDBA for Clusterware |
Oracle's guidelines go further than the administrative privileges. Restrict the number of users with SYS-privileged connections and with ANY privileges such as DROP ANY TABLE or CREATE ANY TABLE. Restrict CREATE ANY JOB, BECOME USER, EXP_FULL_DATABASE, IMP_FULL_DATABASE, CREATE ANY DIRECTORY and the library privileges (CREATE LIBRARY, EXECUTE ANY LIBRARY), which reach the operating system. Treat CREATE PUBLIC SYNONYM and DROP PUBLIC SYNONYM as powerful, because a public synonym can redirect other users' code. Use the READ object privilege (or READ ANY TABLE) for reporting users, since SELECT also allows SELECT ... FOR UPDATE locks.
- Named DBA accounts: give each administrator a personal account with the roles they need and reserve shared SYS logins for documented emergencies. A privileged access management tool can broker and record the sessions. See the Database Credential and Access Security Guide.
- Privilege analysis: run a privilege capture (DBMS_PRIVILEGE_CAPTURE) across a full business cycle, then revoke privileges that were never used. Oracle's guidance names this as the way to find excess grants.
- Database Vault: where licensed, realms and command rules stop even DBA-privileged users from reading application data and add separation of duties for account management.
- Review views: DBA_SYS_PRIVS, DBA_ROLE_PRIVS, DBA_TAB_PRIVS and DBA_ROLES show who holds what; grants WITH ADMIN OPTION and WITH GRANT OPTION deserve their own review.
Integrations, API tokens and service accounts
Application schemas, ETL jobs, reporting tools, monitoring agents and database links are the non-human identities of an Oracle estate. They usually hold the broadest object privileges and the oldest passwords.
| Non-human identity | Common problem | Better pattern |
|---|---|---|
| Application object owner schema | Application connects as the owner, with DDL rights on its own objects | Make the owner schema only; connect as a separate runtime user with object grants through a role |
| Runtime application user | Granted CONNECT, RESOURCE or DBA because an installer asked | CREATE SESSION plus specific object privileges; Oracle advises revoking CONNECT and RESOURCE from typical application accounts |
| Connection pool password | Clear text in data source XML, properties files or scripts | Oracle wallet with the secure external password store, or a secrets manager that injects at start-up |
| Middle tier proxy account | Broad privileges so it can act for any user | Proxy authentication with the proxy limited to CREATE SESSION |
| Database link | Fixed user link with a stored password to a privileged remote account | Least privilege remote account, OUTBOUND_DBLINK_PROTOCOLS=TCPS, review DBA_DB_LINKS |
| Monitoring agent (DBSNMP) | Same password across all databases | Unique managed password per database, rotated by the monitoring platform |
- Secure external password store: Oracle's password guidance points to wallets so scripts and batch jobs connect without passwords in clear text. Protect the wallet files with file permissions: anyone who can read an auto-login wallet can use its credentials.
- Secure application roles: a role enabled only by a PL/SQL package that checks conditions (host, module, time) stops users replaying application credentials from SQL*Plus.
- Rotation: rotate application passwords with a vault or rotation runbook, using the profile's PASSWORD_ROLLOVER_TIME where your release supports gradual rollover. See the Secrets Rotation Runbook Template.
Protect the application tier too: anyone who controls an application can act with that application's database privileges, so keep those privileges narrow and apply Oracle security updates promptly. See the Oracle E-Business Suite and Fusion Security Guide.
Logging and detection
Unified auditing writes to a single read-only trail in the AUDSYS schema, read through the UNIFIED_AUDIT_TRAIL view. Oracle always audits some activity regardless of policy: audit configuration changes, top-level SYSDBA and SYSKM statements while the database is closed or mounted, and RMAN events.
| Predefined policy | Audits | Default |
|---|---|---|
| ORA_LOGON_FAILURES | Failed logons | Enabled in DBCA-created databases |
| ORA_SECURECONFIG | Secure configuration options such as ALTER ANY TABLE, GRANT ANY PRIVILEGE, CREATE USER, ALTER USER, CREATE ROLE, LOGON | Enabled in databases created in 12c or later |
| ORA_ACCOUNT_MGMT | CREATE, ALTER and DROP USER and ROLE, SET ROLE, GRANT, REVOKE | Not enabled |
| ORA_DATABASE_PARAMETER | ALTER DATABASE, ALTER SYSTEM, CREATE SPFILE | Not enabled |
| ORA_CIS_RECOMMENDATIONS | Center for Internet Security recommended audit settings | Not enabled |
| ORA_STIG_RECOMMENDATIONS | DISA STIG recommended audit settings | Not enabled |
| ORA_LOGON_LOGOFF | All logons and logoffs | Not enabled |
- Enable account and parameter policies:
AUDIT POLICY ORA_ACCOUNT_MGMT;andAUDIT POLICY ORA_DATABASE_PARAMETER;cover the changes attackers make to persist. - Audit sensitive objects: create custom policies with
ACTIONS ALL ONthe tables holding personal or payment data, and useONLY TOPLEVELto cut recursive noise. - Manage the trail: move it from SYSAUX with DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION, load OS spillover files with DBMS_AUDIT_MGMT.LOAD_UNIFIED_AUDIT_FILES, archive to a central repository and purge on a schedule. Filter on EVENT_TIMESTAMP_UTC for performance.
- Forward off the host: send records to a SIEM or a dedicated audit repository so a DBA cannot hide activity by purging locally. See the SIEM Guide.
Detections worth building
- Logons to default or dormant accounts: any successful logon by SYSTEM, DBSNMP from an unexpected host or an account in DBA_USERS_WITH_DEFPWD (ATT&CK T1078.001 Default Accounts).
- Failed logon bursts across many users: password spraying against the listener (T1110.003), visible through ORA_LOGON_FAILURES.
- Privilege grants: GRANT of DBA, ANY privileges or BECOME USER outside change windows, and new users created by application accounts.
- Bulk reads: large SELECT volume on sensitive tables by a runtime user or an interactive tool (T1213.006 Databases).
- New PL/SQL in privileged schemas: procedures, jobs or libraries created by unexpected users, a persistence route (T1505.001 SQL Stored Procedures).
- Destructive DDL: DROP or TRUNCATE on production tables and NOLOGGING operations, which Oracle notes can avoid the redo trail (T1485 Data Destruction).
Hardening baseline
CIS publishes Oracle Database Benchmarks for 19c (v2.0.0), 23ai (v1.1.0) and 26ai (v1.0.0), and DISA publishes STIGs. Oracle's free Database Security Assessment Tool (DBSAT) checks configuration, users and roles, discovers sensitive data and reports findings that align with CIS and STIG. The table below gathers the settings from Oracle's own security guidelines.
| Area | Setting or action | Source guidance |
|---|---|---|
| Installation | Custom install, umask 022 for the Oracle owner, no sample schemas in production | Installation and configuration guidelines |
| Default accounts | ALTER USER name PASSWORD EXPIRE ACCOUNT LOCK; for every default account not in use; check DBA_USERS_WITH_DEFPWD | User accounts and password guidelines |
| Passwords | Profiles with PASSWORD_VERIFY_FUNCTION (based on utlpwdmg.sql), lockout and lifetime limits; ALTER USER name DIGEST DISABLE; where HTTP Digest is unused | Password guidelines |
| Privileges | Revoke CONNECT, RESOURCE and unneeded DBA; restrict ANY, BECOME USER, CREATE ANY JOB, DIRECTORY and LIBRARY privileges; revoke access to SYS.USER_HISTORY$ | User accounts and privileges guidelines |
| Listener | ADMIN_RESTRICTIONS_LISTENER=ON, no listener password, bind to specific IPs, run as a separate OS owner, TCPS first in the address list | Network guidelines |
| Client access | tcp.validnode_checking = YES with tcp.invited_nodes; Connection Manager IP_RATE_COUNT, IP_RATE_INTERVAL and IP_RATE_BLOCK | Network guidelines |
| Encryption in transit | TLS (PROTOCOL=TCPS, TLS_SERVER_CERT_DN matching) or native network encryption with SQLNET.ENCRYPTION_SERVER and SQLNET.CRYPTO_CHECKSUM_SERVER set to REQUIRED; SHA-2 rather than SHA-1 | Network and network encryption guidance |
| Database links | OUTBOUND_DBLINK_PROTOCOLS limited to TCPS or NONE; ALLOW_GLOBAL_DBLINKS left OFF | Network guidelines |
| Encryption at rest | TDE tablespace encryption with AES256, keystore in Oracle Key Vault, an HSM or OCI KMS rather than a local file; separate SYSKM custodian | Advanced Security Guide |
| Auditing | Unified auditing with ORA_ACCOUNT_MGMT, ORA_DATABASE_PARAMETER and custom sensitive data policies | Auditing guidelines |
| Patching | Apply Release Updates for each quarterly Critical Patch Update | Security patch guidance |
Transparent Data Encryption choices
TDE uses a two-tier key model: a master key held in a keystore outside the database encrypts the table or tablespace keys that encrypt data. Tablespace encryption covers everything in the tablespace, including redo, and is the usual choice; column encryption suits a few columns and defaults to salted AES192. Auto-login wallets open at start-up, which is convenient for standbys but means file access equals key access; local auto-login wallets only open on the host that created them. In a CDB, united mode shares one keystore across PDBs while isolated mode gives a PDB its own keys, which suits multi-tenant hosting. See the Cryptographic Key Management Guide.
Phased rollout
- Assess: run DBSAT and the CIS-CAT or STIG checks on every database; export DBA_USERS, DBA_SYS_PRIVS and DBA_ROLE_PRIVS.
- Quick wins: lock default and sample accounts, fix default passwords, enable ORA_ACCOUNT_MGMT and ORA_DATABASE_PARAMETER, forward the audit trail.
- Privileges: run privilege capture in a pre-production copy under realistic load, then revoke unused grants in production during a change window.
- Network: enable valid node checking and encryption with REQUESTED on the server first, confirm all clients negotiate, then switch to REQUIRED.
- Credentials: move application passwords to wallets or a vault, separate owner and runtime schemas, and set rotation.
- Encryption at rest: encrypt tablespaces online or offline per Oracle's procedures, back up the keystore separately from the data.
Rollback: keep a script of every revoked privilege so it can be regranted, set network encryption back to REQUESTED if a legacy client fails, and never delete a TDE master key that older backups still need.
Small and large estates
A team with a handful of databases can rely on DBSAT, CIS checks and native unified auditing forwarded to a SIEM. Large estates with hundreds of PDBs need a central audit repository, a PAM tool for SYSDBA sessions, Oracle Key Vault or an HSM for TDE keys, and automated drift checks against a golden profile.
Common misconfigurations
- Manually built or upgraded databases with open default accounts: DBCA's locking never happened. Default credentials and a privileged database login give an automated attacker everything needed in one session, so lock or reset them.
- Applications connecting as the schema owner: a SQL injection or stolen application password then carries DDL rights and every object privilege.
- CONNECT, RESOURCE or DBA on runtime accounts: left over from installers and never reviewed.
- Clear text passwords in tnsnames-adjacent scripts and data source files: backups and source repositories then carry working database credentials (T1552.001 Credentials In Files).
- Auditing left at the defaults: failed logons are recorded but grants, user creation and parameter changes are not.
- TDE with an auto-login wallet on the same host as the data files: a stolen disk image or backup set includes the means to open it.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|---|
| Default accounts, authentication | IA-2, IA-5 | PR.AA-01 | 4, 5 | A.5.17, A.8.5 |
| Administrative privileges, ANY privileges | AC-6, AC-6(5), AC-2 | PR.AA-05 | 5, 6 | A.8.2, A.8.3 |
| Configuration baseline | CM-2, CM-6, CM-7 | PR.PS-01 | 4 | A.8.9 |
| Unified auditing | AU-2, AU-9, AU-11, AU-12 | PR.PS-04, DE.CM-03 | 8 | A.8.15 |
| Network and TDE encryption | SC-8, SC-12, SC-13, SC-28 | PR.DS-01 | 3 | A.8.24 |
Detection and measurement
- Default exposure: rows in DBA_USERS_WITH_DEFPWD and open Oracle-maintained accounts across the estate (target: zero).
- Privilege drift: number of non-DBA accounts holding ANY privileges, BECOME USER or the DBA role, trended monthly.
- Audit coverage: percentage of production databases with ORA_ACCOUNT_MGMT, ORA_DATABASE_PARAMETER and sensitive data policies enabled and forwarded off host.
- Credential hygiene: application accounts with passwords older than the rotation policy, and scripts found with clear text passwords.
- Baseline score: DBSAT high-risk findings or CIS Benchmark pass rate per database.
Practitioner checklist
- Run DBSAT and a CIS or STIG assessment on every production database and record findings with owners.
- Lock and expire every unused default account and remove sample schemas from production.
- Replace SYSDBA use with SYSBACKUP, SYSDG, SYSKM or SYSRAC wherever the task allows.
- Revoke CONNECT, RESOURCE and unneeded DBA from application accounts and review all ANY privileges.
- Split application owner and runtime schemas; make owners schema only.
- Move application and job passwords into wallets or a secrets manager and set a rotation schedule.
- Enable ORA_ACCOUNT_MGMT, ORA_DATABASE_PARAMETER and custom policies for sensitive tables; forward the trail off host.
- Restrict the listener, enable valid node checking and require encryption in transit.
- Encrypt tablespaces holding regulated data with TDE and keep the keystore away from the data files.
Standards and references
- Oracle: Guidelines for Securing User Accounts and Privileges
- Oracle: Guidelines for Securing the Network
- Oracle: Guidelines for Auditing
- Oracle: Guidelines for Securing Passwords
- Oracle: Oracle Database System Privileges, Accounts and Passwords
- Oracle: Introduction to Transparent Data Encryption
- CIS: Oracle Database Benchmarks
- Oracle: Database Security Assessment Tool
Related NHI Mgmt Group resources: Database Security Guide · Database Credential and Access Security Guide · Oracle E-Business Suite and Fusion Security Guide · Oracle WebLogic Server Hardening Guide · Secrets Management Guide