Friday, January 11, 2019

Mask data in a table column

Below function helps to mask data in a Table column containing numbers and characters. Special characters will be kept same including the position.

CREATE OR REPLACE function datamask_func(word in varchar2)
return varchar2
as
mask_data varchar2(4000);
begin
select translate(word,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',dbms_random.string('U',26)||dbms_random.string('L',26)||replace(dbms_random.random,'-','1')) into mask_data from dual;
  --  dbms_output.put_line('mask_data: '||mask_data);
return mask_data;
end;
/

I used that function to mask data in one of the column like below.

update mask_data_tbl set COL11=datamask_func(COL11);


Hope this helps.

Sunday, August 11, 2013

Oracle OPatch

To download the latest OPatch version from My Oracle Support (MOS) using the next reference:
Patch 6880880.
Or 
using the next URL:
https://updates.oracle.com/download/6880880.html

2) In the "Platform" field select the relevant platform that corresponds to the Oracle product.

3) Click the Download button

Oracle Database Client


Installing using response file in silent mode:

1. Download the software

2. unzip the software. A directory called client is created at the location.
   unzip <file_name>

3. Copy the original response file to temp location.Original response file location will be <Base_Dir>/client/response.

Saturday, March 16, 2013

Upgrades of Oracle databases from any version to any version on any platform

Oracle Docs:

Upgrade:

1.       Complete checklist for manual upgrades of Oracle databases from any version to any version on any platform (documents only from 7.3.x>>8.0.x>>8.1.x>>9.0.x>>9.2.x>>10.1.x>>10.2.x>>11.1.x>>11.2.x) [ID 421191.1]
 - This document provides only the links to others which clearly explains the steps of migrating Oracle databases manually from any version to any version on any platform.
2.       Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1]
 - This document is created for use as a guideline and checklist when manually upgrading from Oracle 9iR2 (9.2), Oracle 10gR1 (10.1), Oracle 10gR2 (10.2) or Oracle 11gR1 (11.1) to Oracle 11gR2 (11.2).
3.       Complete Checklist to Upgrade the Database to 11gR2 using DBUA [ID 870814.1]
 - The purpose of this article is to minimize the downtime while upgrading the database using DBUA.
4.       Information Center: Upgrading and Migration Oracle Database [ID 1351112.2] .
5.       Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
 - This Master Note is intended to provide an index and references to the most frequently used My Oracle Support Notes with respect to Oracle Database Upgrade and Migration.
6.       Complete checklist for out-of-place manual upgrade from previous 11.2.0.N version to the latest 11.2.0.N patchset. [ID 1276368.1]
 - This document explains how to perform an out-of place manual database upgrade from 11.2.0.1 to 11.2.0.2 or later version of 11.2.0.N.

Thursday, January 10, 2013

AIX for Oracle DBA

A) Memory Consumption:

$ svmon -G
               size       inuse        free         pin     virtual
memory      5079040     5076409        2631      706856     2983249
pg space    7864320       12885

               work        pers        clnt       other
pin          540803           0        2758      163295
in use      2983249           0     2093160