Posts by Doyensys

Script to generate gather table stats for all the tables which dont have upto date statistics

set serveroutput on set serveroutput on size 1000000 declare sql_string varchar2(2000); CURSOR OBJ IS select owner,table_name from dba_tables where last_analyzed is null –and OWNER=’&owner’ ; begin for REC1 IN OBJ…

Read More

Script to know the procedure of a schema owner

ACCEPT user_namen CHAR PROMPT 'Schema Owner: ' set feed off; set pagesize 10000; set wrap off; set linesize 200; set heading on; set tab on; set scan on; set verify…

Read More

OracleHomeInventory was not able to create a lock file

OUI-67076: opatch lsinventory Error Faced an issue with command ‘opatch lsinventory’ and reports below error in log file. Cause: OUI-67076:OracleHomeInventory was not able to create a lock file, probably due…

Read More

Privilage Analysis Basic 12cR2

Oracle 12c introduced the DBMS_PRIVILEGE_CAPTURE package, which allows you to track the privileges being used, making it much simpler to perform privilege analysis, which in turn allows you to revoke…

Read More

How to resolve the "The file could not be uploaded because file size is too large Issue" in OEM 12c

How to resolve the “The file could not be uploaded because file size is too large Issue” in OEM 12c Step 1: Copy the patch to the staging area. Ex:…

Read More

Rebuild the DATAPUMP utility in Internal Error situations

Rebuild the DATAPUMP utility in Internal Error situations Step1 : Run the Catproc.sql in affected database: SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql Step 2: Compile the invalid objects, if any SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql Step 3:…

Read More

How To Setup Partitioned Linux Block Devices Using UDEV (Non-ASMLIB) for ASM

How To Setup Partitioned Linux Block Devices Using UDEV (Non-ASMLIB) 1) This example was performed on an OEL 6.3 configuration: [grid@asmlnx2 ~]$ uname -a Linux asmlnx2 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat…

Read More

RAC Message Flow

RAC Message Flow                            Instance 1                        …

Read More

How to find out the active sql details

column sid format 9999 column username format a12 column sql_text form a64 select a.sid,a.serial#,a.username,c.executions,status, b.sql_text from v$session a ,v$sqltext b ,v$sqlarea c where a.username is not null and status=’ACTIVE’ –and…

Read More

Scriprt For Finding Unusable Index :

This scripts using finding unusable index. SET VERIFY OFF LINESIZE 200 COLUMN owner FORMAT A30 COLUMN index_name FORMAT A30 COLUMN table_owner FORMAT A30 COLUMN table_name FORMAT A30 SELECT owner,  …

Read More