Posts

Showing posts from October, 2017

Oracle 11gR2 Grid Infrastructure Services - Part I

Image
Discussion about startup sequence and service features of Grid InfraStructure Services This is a three part series which discusses exhaustively about 11gR2 GRID Infrastructure Services. Assuming that we are discussing about a unix like operating system or a linux. Once the OS finishes the bootstrap process, it reads the /etc/initab file via the initialization daemon init.d At the end of the file "/etc/inittab" is a line, which looks something like this "h1:35:respawn:/etc/init.d/init.ohasd run > /dev/null 2>&1 </dev/null" the above line inidicates the initialization daemon to trigger the Oracle High Availability Services Daemon. OHASD is of two types - OHASD for cluster(also known as crs) - OHASD for non-rac environments(also known as has) ; has - high availability service Oracle Restart is bundled with GI software/Clusterware which is usually installed as part of non-rac environment installation OHASD starts 3 com...

DBMS_XPLAN.DISPLAY_CURSOR

Image
How to Use DBMS_XPLAN.DISPLAY_CURSOR to examine execution plans As you all know we can get to know the execution plan of the optimizer in several different ways. In this post, we are going to examine, DBMS_XPLAN.DISPLAY_CURSOR which shows the actual/running execution plan of a SQL query. DBMS_XPLAN is a package inside SYS schema. DISPLAY_CURSOR is a function inside the package. Let us see how we can use the above to benefit us in fixing problematic and long running queries. SELECT * FROM table(dbms_xplan.display_cursor());  The SQL Statement executed above will pick the SQL that has been last executed in the current session. It returns the SQL_ID, the child Number, the Plan Hash Value, the Execution Plan. The * in the execution plan as indicated will have the predicate information below the execution plan. Sample DBMS_XPLAN.DISPLAY_CURSOR output The Rows column & the Time Column in the above plan are only the estimated Values for each operation as indica...