Join our Newsletter — 33% off our NHI Course
Home› Guides› Oracle Database Security Guide: Accounts, Privileges, Auditing and…
Guide Data Security

Oracle Database Security Guide: Accounts, Privileges, Auditing and Encryption

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 15 min read
On this page

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 methodTypical useSecurity notes
Database passwordApplication schemas, legacy usersGoverned by profiles and PASSWORD_VERIFY_FUNCTION; passwords 12 to 1024 bytes per Oracle guidance
Schema only (no authentication)Oracle-maintained schemas, application object ownersCannot log in directly; AUTHENTICATION_TYPE shows NONE; the safest state for object owners
Operating system and password fileSYSDBA and other administrative connectionsMembership of OS groups grants admin connections; protect the password file and OS groups
Kerberos, PKI certificatesEnterprise users, strong authenticationOracle recommends strong authentication where possible
Directory or cloud identityCentrally managed users, Microsoft Entra ID, OCI IAM tokensEntra users map to one schema and optionally database roles; removes local passwords for people
Proxy authenticationMiddle tier connecting on behalf of end usersLimit 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 privilegeConnects asUse it forInstead of
SYSDBASYSInstance startup, recovery, upgrades, anything elseNothing: keep for break-glass and change windows
SYSOPERPUBLICStartup, shutdown and basic operations without data accessSYSDBA for operators
SYSBACKUPSYSBACKUPRMAN backup and recoverySYSDBA in backup tooling
SYSDGSYSDGData Guard administration and monitoringSYSDBA in broker configurations
SYSKMSYSKMTDE keystore management, including opening the keystore at mountSYSDBA for key custodians
SYSRACSYSRACReal Application Clusters operationsSYSDBA 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 identityCommon problemBetter pattern
Application object owner schemaApplication connects as the owner, with DDL rights on its own objectsMake the owner schema only; connect as a separate runtime user with object grants through a role
Runtime application userGranted CONNECT, RESOURCE or DBA because an installer askedCREATE SESSION plus specific object privileges; Oracle advises revoking CONNECT and RESOURCE from typical application accounts
Connection pool passwordClear text in data source XML, properties files or scriptsOracle wallet with the secure external password store, or a secrets manager that injects at start-up
Middle tier proxy accountBroad privileges so it can act for any userProxy authentication with the proxy limited to CREATE SESSION
Database linkFixed user link with a stored password to a privileged remote accountLeast privilege remote account, OUTBOUND_DBLINK_PROTOCOLS=TCPS, review DBA_DB_LINKS
Monitoring agent (DBSNMP)Same password across all databasesUnique 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 policyAuditsDefault
ORA_LOGON_FAILURESFailed logonsEnabled in DBCA-created databases
ORA_SECURECONFIGSecure configuration options such as ALTER ANY TABLE, GRANT ANY PRIVILEGE, CREATE USER, ALTER USER, CREATE ROLE, LOGONEnabled in databases created in 12c or later
ORA_ACCOUNT_MGMTCREATE, ALTER and DROP USER and ROLE, SET ROLE, GRANT, REVOKENot enabled
ORA_DATABASE_PARAMETERALTER DATABASE, ALTER SYSTEM, CREATE SPFILENot enabled
ORA_CIS_RECOMMENDATIONSCenter for Internet Security recommended audit settingsNot enabled
ORA_STIG_RECOMMENDATIONSDISA STIG recommended audit settingsNot enabled
ORA_LOGON_LOGOFFAll logons and logoffsNot enabled
  • Enable account and parameter policies: AUDIT POLICY ORA_ACCOUNT_MGMT; and AUDIT POLICY ORA_DATABASE_PARAMETER; cover the changes attackers make to persist.
  • Audit sensitive objects: create custom policies with ACTIONS ALL ON the tables holding personal or payment data, and use ONLY TOPLEVEL to 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.

AreaSetting or actionSource guidance
InstallationCustom install, umask 022 for the Oracle owner, no sample schemas in productionInstallation and configuration guidelines
Default accountsALTER USER name PASSWORD EXPIRE ACCOUNT LOCK; for every default account not in use; check DBA_USERS_WITH_DEFPWDUser accounts and password guidelines
PasswordsProfiles with PASSWORD_VERIFY_FUNCTION (based on utlpwdmg.sql), lockout and lifetime limits; ALTER USER name DIGEST DISABLE; where HTTP Digest is unusedPassword guidelines
PrivilegesRevoke 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
ListenerADMIN_RESTRICTIONS_LISTENER=ON, no listener password, bind to specific IPs, run as a separate OS owner, TCPS first in the address listNetwork guidelines
Client accesstcp.validnode_checking = YES with tcp.invited_nodes; Connection Manager IP_RATE_COUNT, IP_RATE_INTERVAL and IP_RATE_BLOCKNetwork guidelines
Encryption in transitTLS (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-1Network and network encryption guidance
Database linksOUTBOUND_DBLINK_PROTOCOLS limited to TCPS or NONE; ALLOW_GLOBAL_DBLINKS left OFFNetwork guidelines
Encryption at restTDE tablespace encryption with AES256, keystore in Oracle Key Vault, an HSM or OCI KMS rather than a local file; separate SYSKM custodianAdvanced Security Guide
AuditingUnified auditing with ORA_ACCOUNT_MGMT, ORA_DATABASE_PARAMETER and custom sensitive data policiesAuditing guidelines
PatchingApply Release Updates for each quarterly Critical Patch UpdateSecurity 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

  1. Assess: run DBSAT and the CIS-CAT or STIG checks on every database; export DBA_USERS, DBA_SYS_PRIVS and DBA_ROLE_PRIVS.
  2. Quick wins: lock default and sample accounts, fix default passwords, enable ORA_ACCOUNT_MGMT and ORA_DATABASE_PARAMETER, forward the audit trail.
  3. Privileges: run privilege capture in a pre-production copy under realistic load, then revoke unused grants in production during a change window.
  4. Network: enable valid node checking and encryption with REQUESTED on the server first, confirm all clients negotiate, then switch to REQUIRED.
  5. Credentials: move application passwords to wallets or a vault, separate owner and runtime schemas, and set rotation.
  6. 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 areaNIST SP 800-53 Rev. 5NIST CSF 2.0CIS Controls v8.1ISO/IEC 27001:2022 Annex A
Default accounts, authenticationIA-2, IA-5PR.AA-014, 5A.5.17, A.8.5
Administrative privileges, ANY privilegesAC-6, AC-6(5), AC-2PR.AA-055, 6A.8.2, A.8.3
Configuration baselineCM-2, CM-6, CM-7PR.PS-014A.8.9
Unified auditingAU-2, AU-9, AU-11, AU-12PR.PS-04, DE.CM-038A.8.15
Network and TDE encryptionSC-8, SC-12, SC-13, SC-28PR.DS-013A.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

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

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.