Index internal oracle using simple test case

Index internal oracle using simple test case First of all I will create a table with char(1000) so that in one block I can fit 6-7 entries . Here are some relevant notes regarding Index split For Leaf block kdxlespl: bytes of uncommitted data at time of block split that have been cleaned out kdxlende:Continue reading Index internal oracle using simple test case

How histogram can affect query plan change hence performance

How histogram can affect query plan change hence performance. 1.Let me create a test case.I am loading the table with following distribution.Obviously it means data is somewhat skewed. Value:-1 Range:-10 Value:-2 Range:-100 Value:-3 Range:-1000 Value:-4 Range:-10000 Value:-5 Range:-100000 C##TEST@TESTDB1> create table tt1(c1 number,c2 char(10)); Table created. C##TEST@TESTDB1> declare begin for j in 1..10 loop 2Continue reading How histogram can affect query plan change hence performance

Poor index identify and resolve manually or using sql tuning advisor

1.Let us create a test case first:- oracle@TST:TESTDB1[/home/oracle]$ sqlplus c##test/test C##TEST@TESTDB1> create table mytst1 as select * from dba_objects; Table created. C##TEST@TESTDB1> create table mytst2 as select * from dba_objects where rownum<5000; Table created. 2.Let us see what application executes SQL query and complaining poor performance select a.owner,a.OBJECT_NAME,a.OBJECT_TYPE,b.STATUS from mytst1 a,mytst2 b where a.OBJECT_ID=b.OBJECT_ID andContinue reading Poor index identify and resolve manually or using sql tuning advisor

RAC one node to another node clone if another rac crash due to file deletion or permission change in grid home

1. On the source node to target node, create a copy of the Oracle Grid Infrastructure home. For example, as root on Linux systems, run the cp command:- # cp -prf root@rac1:/u01/app/product/12.1.0/grid/* root@rac2:/u01/app/product/12.1.0/grid 2. Delete unnecessary files from the copy.The Oracle Grid Infrastructure home contains files that are relevant only to the source node, soContinue reading RAC one node to another node clone if another rac crash due to file deletion or permission change in grid home

Installation of Oracle 12c RAC Flex cluster infrastructure on Virtual Box

Introduction This document will help to guide you for installation of Oracle 12cR1 RAC Flex cluster infrastructure on Virtual Box which is very popular because of shared storage simulation feature. Below is overall requirement in nut-shell. We need 3 servers for now.I will install RAC on First 2 servers and 3rd server will act asContinue reading Installation of Oracle 12c RAC Flex cluster infrastructure on Virtual Box

EXPDP and IMPDP command reference 12c

  A.Very useful method to upgrade 11gR2 to 12c using┬átransportable=always Full transportable export/import is a new feature in Oracle Database 12c that greatly simplifies the process of database migration. Combining the ease of use of Oracle Data Pump with the performance of transportable tablespaces, full transportable export/import gives you the ability to upgrade or migrateContinue reading EXPDP and IMPDP command reference 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

Script for checking tablespace growth

with t as ( select ss.run_time,ts.name,round(su.tablespace_size*dt.block_size/1024/1024/1024,2) alloc_size_gb, round(su.tablespace_usedsize*dt.block_size/1024/1024/1024,2) used_size_gb from dba_hist_tbspc_space_usage su, (select trunc(BEGIN_INTERVAL_TIME) run_time,max(snap_id) snap_id from dba_hist_snapshot group by trunc(BEGIN_INTERVAL_TIME) ) ss, v$tablespace ts, dba_tablespaces dt where su.snap_id = ss.snap_id and su.tablespace_id = ts.ts# and ts.name =upper(‘USERS’) and ts.name = dt.tablespace_name ) select e.run_time,e.name,e.alloc_size_gb,e.used_size_gb curr_used_size_gb, b.used_size_gb prev_used_size_gb, case when e.used_size_gb > b.used_size_gb then to_char(e.used_size_gbContinue reading Script for checking tablespace growth

script to get query for reclaim space from auto extensible datafile

set linesize 1000 pagesize 0 feedback off trimspool on with hwm as ( — get highest block id from each datafiles ( from x$ktfbue as we don’t need all joins from dba_extents ) select /*+ materialize */ ktfbuesegtsn ts#,ktfbuefno relative_fno,max(ktfbuebno+ktfbueblks-1) hwm_blocks from sys.x$ktfbue group by ktfbuefno,ktfbuesegtsn ), hwmts as ( — join ts# with tablespace_nameContinue reading script to get query for reclaim space from auto extensible datafile