Monday, May 25, 2026

ISO 2700 For Database administrators

  For Database Administrators (DBAs), ISO/IEC 27001 (often loosely referred to as ISO 2700) provides the gold standard framework for securing organizational data. The core goal is to protect databases from breaches, unauthorized access, and data loss by strictly maintaining the Confidentiality, Integrity, and Availability (CIA) of information. 

Understanding the standard's impact involves looking at four core pillars:
1. Access and Identity Control
  • Principle of Least Privilege: Grant permissions only to the extent required for users to perform their jobs.
  • Privileged Access Rights (Annex A 8.2): Limit super-admin privileges (e.g., sysadmin or root) to an absolute minimum and closely monitor their usage.
  • Segregation of Duties: Ensure developers and DBAs cannot push code/schema changes to production without peer reviews or management approval 
2. Data Protection and Masking
  • Encryption: Protect data at rest (using Transparent Data Encryption) and in transit (using TLS).
  • Data Masking: Prevent developers and QA engineers from viewing sensitive Personally Identifiable Information (PII) or financial data in non-production environments.
  • Cryptographic Keys (Annex A 8.24): Manage, rotate, and securely store encryption keys independently of the database files. 
3. Monitoring and Vulnerability Management
  • Audit Logging: Retain immutable, time-stamped logs of all database queries, schema changes, and login attempts.
  • Technical Vulnerabilities (Annex A 8.8): Perform routine patching, configure security baselines, and scan databases for known CVEs.
  • Real-Time Threat Detection: Implement tools like database firewalls to actively block SQL injections and unauthorized bulk exports.  
4. Backups and Business Continuity
  • Information Backup (Annex A 8.13): Enforce strict backup schedules, test data restoration procedures, and securely store offsite or immutable backup copies in case of ransomware or hardware failures.
Actionable DBA Tasks for ISO 27001 Compliance
  • Access Review: Conduct quarterly audits to remove terminated employees and revoke stale database accounts.
  • Hardening: Disable unnecessary database features, sample schemas, and extended stored procedures that can serve as attack vectors.
  • Vendor & Framework Resources: Reference the ISO 27001 Azure SQL Blueprint or the ISO 27001 Official Standard Guide for specific cloud and enterprise requirements

Thursday, March 19, 2026

Oracle Impdp options views_as_tables and DATA_OPTIONS =trust_existing_table_partitons



VIEWS_AS_TABLES (used in expdp to materialize views as physical tables) and TRUST_EXISTING_TABLE_PARTITIONS (used in impdp to optimize partition loading) are Data Pump features to manage complex data structures and performance. 

VIEWS_AS_TABLES enables exporting view data as tables, while TRUST_EXISTING_TABLE_PARTITIONS skips unnecessary partition validation, accelerating imports. 


VIEWS_AS_TABLES


VIEWS_AS_TABLES is a neat feature in Oracle Data Pump that allows you to export the contents of a view and import them as tables.


The idea is to export a view as if it were a table. The dump file contains a table definition:

With the same name as the view
With the same columns as the view
With the same data as the view
SQL> CREATE VIEW oraview as SELECT * FROM oracledbwr;
View created.

Now export the view using the VIEWS_AS_TABLES parameter.

[oracle@prod101:admin orcl101] expdp scott/tiger views_as_tables=oraview directory=test_dir dumpf



TRUST_EXISTING_TABLE_PARTITIONS 


Another important option is TRUST_EXISTING_TABLE_PARTITIONS  .
TRUST_EXISTING_TABLE_PARTITIONS Loads partition data in parallel into existing partitions on the destination database. The partitions must already be present with the correct attributes.

Full list of data options are below 

# Export
DATA_OPTIONS = [XML_CLOBS | GROUP_PARTITION_TABLE_DATA | VERIFY_STREAM_FORMAT]

# Import
DATA_OPTIONS = [DISABLE_APPEND_HINT | SKIP_CONSTRAINT_ERRORS | 
               ENABLE_NETWORK_COMPRESSION | REJECT_ROWS_WITH_REPL_CHAR | 
               TRUST_EXISTING_TABLE_PARTITIONS | VALIDATE_TABLE_DATA]

These settings are described in the manuals (export, import), but they are briefly described below.

  • GROUP_PARTITION_TABLE_DATA : Unloads all partitions as a single operation producing a single partition of data in the dump file. Subsequent imports will not know this was originally made up of multiple partitions.
  • VERIFY_STREAM_FORMAT : Validates the format of the data stream before it is written to the dump file, so you are less likely to have problems with the contents of the dumpfile.
  • ENABLE_NETWORK_COMPRESSION : Compresses data during network imports using the ACCESS_METHOD of DIRECT_PATH. There are some caveats described here.
  • TRUST_EXISTING_TABLE_PARTITIONS : Loads partition data in parallel into existing partitions on the destination database. The partitions must already be present with the correct attributes.
  • VALIDATE_TABLE_DATA : Validates numbers and dates during imports. Writes ORA-39376 errors inclduing the column information to the log file if it finds invalid data.