Posts

Column and Tablespace Encryption using Transparent Data Encryption (TDE)

Image
Transparent Data Encryption (TDE): Oracle Transparent Data Encryption (TDE) enables the organizations to encrypt sensitive application  data on storage media completely transparent to the application. TDE addresses encryption requirements associated with public and private privacy and security regulations such as PCI DSS. TDE column encryption was introduced in Oracle Database 10g Release 2, enabling encryption of table columns containing sensitive information. The TDE tablespace encryption and the support for hardware security modules (HSM) were introduced in Oracle Database 11gR1. TDE is protecting the data at rest. It is encrypting the data in the datafiles so that in case they are obtained by other parties it will not be possible to access the clear text data.  TDE cannot be used to obfuscate the data for the users who have privileges to access the tables. In the databases where TDE is configured any user who has access on an encrypted table will be able to see the ...

PL/SQL STORED PROCEDURE for DATA Insert and Capture activity in the Log table:

Simple stored procedure to insert data into the EMP table in SCOTT schema and each successful insert will be logged into the log table( scott.procedure_logtable ) and the data in the log table  records will be purged if the  Create_timestamp of  Log table  is 180 days old by scheduling the Purge Procedure " Purge_scott_logtable"   with the schedular Job " Run_Purge_scott_logtable_job" Also, the log table will capture the user info on who changed data and from which machine the SQL was executed. LOG TABLE: SQL> Create table scott.procedure_logtable( Activity Varchar2(40), Created_by Varchar(10), Create_timestamp Date, From_machine Varchar(50) ) tablespace users; EMP TABLE: Name     Null?    Type          -------- -------- ------------  EMPNO    NOT NULL NUMBER(4)     ENAME             VARCHAR2(...

Creating and Altering User Profiles

User profiles: ------------------ Specifying a Profile. You also specify a profile when you create a user. A profile is a set of limits on database resources and password access to the database. If no profile is specified, then the user is assigned a default profile. Views: DBA_PROFILES This view contains info about the profiles SQL> desc dba_profiles  Name                                                 Null?    Type  ---------------------------------------------------- -------- ------------------------------------  PROFILE                                              NOT NULL VARCHAR2(128)  RESOURCE_NAME                            ...

Killing Blocking Sessions

Finding Blocking sessions: ---------------------------------- Views: --------- v$session v$lock dba_blockers dba_waiters 1.From v$session: SQL> select  blocking_session,  sid,  serial#,  wait_class, seconds_in_wait from v$session where blocking_session is not NULL order by  blocking_session; 2. From v$lock SQL> select * from v$lock; ###If attribute block=1 in v$lock then the Sid relating to that row is blocking session. we can also find which session is waiting by comparing the ID1 and ID2 attributes of the v$lock. If ID1 and ID2 have same values with blocking and other session. Then session other than blocking session is waiting session.### 3. From dba_blockers SQL> select * from dba_blockers; ###From the above query we will get session id of the particular blocking session.### 4. From dba_waiters SQL> select holding_session, blocking_session from dba_waiters; ###From the above statement, holding session is the blocking...

Query parameter in Datapump(EXPDP/IMPDP)

create a directory in server and database as follow: [oracle@pavanorcl101 admin ] $ mkdir -p /u01/app/export SQL>create directory exportdirectory as '/u01/app/export'; we are exporting records in   EMP table in KRISHNA Schema with city name 'BHIMAVARAM' SQL> conn krishna Enter password: Connected. SQL> select * from emp;         ID NAME                 CITY ---------- -------------------- --------------------          1 Sai                  Vijayawada          2 Ram                 Vijayawada          3 Pavan                Bhimavaram          4 Krishna             Bhimavaram creating a export par file with required ...