Enable DDL logging in Oracle 12c

We need to enable DDL logging sometimes to track all DDL operations performed in database level.   Step 1:-Please set ENABLE_DDL_LOGGING to TRUE   Enter user-name: / as sysdba SQL> show parameter ENABLE_DDL_LOGGING; NAME TYPE VALUE ———————————— ———– —————————— enable_ddl_logging boolean FALSE SQL> alter system set ENABLE_DDL_LOGGING=TRUE; System altered. Step 2:-Identify where the xml filesContinue reading Enable DDL logging in Oracle 12c

Oracle Database Audit FGA using SYSLOG to capture

Oracle Database Audit using SYSLOG to capture Oracle Database can be configured to log events into a database table, XML files or syslog. To configure Oracle Database to log events using syslog: Configure SYSLOG 1. Execute the following commands: mkdir -p /var/log/oracledb/ touch /var/log/oracledb/oracledb.log 2. Add the following line to /etc/rsyslog.conf: local1.info /var/log/oracledb/oracledb.log 3.Configuring LoggingContinue reading Oracle Database Audit FGA using SYSLOG to capture

DBMS_CRYPTO example

SQL> CONN SYS/SYS AS SYSDBA Connected. SQL> set serveroutput on SQL> SQL> set linesize 121 SQL> SQL> DECLARE l_credit_card_no VARCHAR2(19) := ‘1234-5678-9012-3456’; l_ccn_raw RAW(128) := utl_raw.cast_to_raw(l_credit_card_no); l_key RAW(128) := utl_raw.cast_to_raw(‘abcdefgh’); l_encrypted_raw RAW(2048); l_decrypted_raw RAW(2048); BEGIN dbms_output.put_line(‘Original : ‘ || l_credit_card_no); l_encrypted_raw := dbms_crypto.encrypt(l_ccn_raw, dbms_crypto.des_cbc_pkcs5, l_key); dbms_output.put_line(‘Encrypted : ‘ || RAWTOHEX(utl_raw.cast_to_raw(l_encrypted_raw))); l_decrypted_raw := dbms_crypto.decrypt(src => l_encrypted_raw,Continue reading DBMS_CRYPTO example

Oracle users,roles,audit and security

  MANAGING SECURITY Managing Profiles 1.Creating profile and Granting it to user CONN sys/password AS SYSDBA CREATE PROFILE my_profile LIMIT FAILED_LOGIN_ATTEMPTS 3  — Account locked after 3 failed logins. PASSWORD_LOCK_TIME 5     — Number of days account is locked for. UNLIMITED required explicit unlock by DBA. PASSWORD_LIFE_TIME 30    — Password expires after 90 days. PASSWORD_GRACE_TIME 3   Continue reading Oracle users,roles,audit and security