How to Secure an Oracle Database 19c: Best Practices for DBAs

Oracle Database 19c is a powerful and feature-rich relational database management system. But with power comes responsibility—especially when it comes to data security. If you're a DBA, IT administrator, or developer, securing your Oracle 19c environment should be a top priority.

In this post, we’ll walk through practical steps to harden and secure your Oracle 19c database against common threats and vulnerabilities.


Why Database Security Matters

Databases are prime targets for attackers. A breach can expose sensitive information like personal data, credit card numbers, or business secrets. Oracle 19c includes many built-in security features, but they must be properly configured.


1. Keep Your Oracle Software Updated

Always apply the latest Patch Set Updates (PSUs) and Critical Patch Updates (CPUs) from Oracle.

 Tip: Schedule regular patch cycles and test in a staging environment first.


2. Enforce Strong Password Policies

Weak passwords are the easiest way into a database. Enforce complexity and expiration policies:


ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME 90 PASSWORD_REUSE_TIME 365 PASSWORD_REUSE_MAX 5 PASSWORD_VERIFY_FUNCTION ora12c_verify_function;

Also, disable or delete default accounts (like SCOTT) that aren’t in use.


3. Implement Least Privilege Access

  • Use roles to group privileges.

  • Never grant users more privileges than they need.

  • Avoid using GRANT ALL—it’s a red flag in audits.


GRANT SELECT, INSERT ON employees TO hr_user;

4. Enable Transparent Data Encryption (TDE)

TDE encrypts sensitive data at rest—perfect for complying with regulations like GDPR and HIPAA.


-- Create a wallet ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/admin/ORCL/wallet' IDENTIFIED BY MyPassword; -- Open the wallet ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY MyPassword; -- Set the master key ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY MyPassword WITH BACKUP;

Encrypt tablespaces or individual columns as needed.


 5. Configure Oracle Database Vault

Oracle Database Vault restricts access to sensitive data—even from DBAs. You can create realms to protect objects and control access to them.

  • Prevent users from executing SELECT on HR tables unless authorized.

  • Enforce separation of duties.

This feature requires extra licensing but adds strong internal security.


6. Monitor and Audit Activities

Enable Oracle Unified Auditing to log database activities:


AUDIT SELECT ON hr.employees BY hr_user;

You can also use tools like:

  • Oracle Audit Vault

  • Oracle Enterprise Manager

  • SIEM solutions (Splunk, ELK)

Regularly review logs and alerts for suspicious activities.


7. Use Network Encryption and Firewalls

Secure communication channels using Oracle Native Network Encryption or SSL/TLS.

Edit sqlnet.ora to enforce encryption:


SQLNET.ENCRYPTION_SERVER = REQUIRED SQLNET.ENCRYPTION_TYPES_SERVER = (AES256)

Restrict database access via:

  • Firewalls and VPCs

  • Database listener restrictions in listener.ora


8. Disable Unused Features and Services

The more features enabled, the bigger your attack surface. Disable or remove:

  • Unused database components

  • Unused ports

  • Unused listener endpoints

You can check what's installed using:


SELECT comp_name, status FROM dba_registry;

 9. Regular Backups and Recovery Testing

A secure database is also one that can be restored. Use RMAN to take encrypted backups and regularly test your restore process.


RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Encrypt backup files for added security:


CONFIGURE ENCRYPTION FOR DATABASE ON; CONFIGURE ENCRYPTION ALGORITHM 'AES256';

10. Use Security Tools and Automation

Oracle 19c comes with tools that can help:

  • Data Masking and Subsetting for test environments

  • Oracle Label Security for row-level access control

  • SQL Developer Security Assessment Tool


Final Thoughts

Securing Oracle Database 19c isn’t a one-time job—it’s a continuous process. Start with these essentials and evolve your strategy as threats change. A proactive approach to database security not only protects your data but also your organization’s reputation and compliance posture.

Comments

Popular posts from this blog

How to Solve - "WAIT FOR EMON PROCESS NTFNS"

Query Regression - "OR" Transformation Oracle 19c

Error Processing Request. - Oracle APEX Post upgrade (Invalid WWV_FLOW_SESSION_RAS)