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 -aLinux asmlnx2 2.6.39-200.24.1.el6uek.x86_64 #1...
View ArticleRebuild the DATAPUMP utility in Internal Error situations
Rebuild the DATAPUMP utility in Internal Error situationsStep1 :Run the Catproc.sql in affected database:SQL> @$ORACLE_HOME/rdbms/admin/catproc.sqlStep 2:Compile the invalid objects, if anySQL>...
View ArticleHow to resolve the "The file could not be uploaded because file size is too...
How to resolve the "The file could not be uploaded because file size is too large Issue" in OEM 12cStep 1:Copy the patch to the staging area.Ex: /home/oracle/emStep 2:Using emcil issue the following...
View ArticlePrivilage 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...
View ArticleOracleHomeInventory was not able to create a lock file
OUI-67076: opatch lsinventory ErrorFaced 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...
View ArticleScript 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 off;--spool show_procedures.lstttitle...
View ArticleScript to generate gather table stats for all the tables which dont have upto...
set serveroutput onset serveroutput on size 1000000declaresql_string varchar2(2000);CURSOR OBJ ISselect owner,table_namefrom dba_tableswhere last_analyzed is null--and OWNER='&owner';beginfor REC1...
View ArticleScript will create a report of reads,writes on your data files
col PHYRDS format 99,999,999col PHYWRTS format 99,999,999ttitle "Disk Balancing Report"col READTIM format 99,999,999col WRITETIM format 99,999,999col name format a30select name, phyrds, phywrts,...
View ArticleScript will generate the list of users which are currently under waiting
set pages 50000 lines 32767col username format a12col sid format 9999col state format a15col event format a50col wait_time format 99999999set pagesize 100set linesize 120select s.sid, s.username,...
View ArticleScript to know the history of an sql_id and its plan change details
selectSQL_ID, PLAN_HASH_VALUE, sum(EXECUTIONS_DELTA) EXECUTIONS, sum(ROWS_PROCESSED_DELTA) CROWS, trunc(sum(CPU_TIME_DELTA)/1000000/60) CPU_MINS, trunc(sum(ELAPSED_TIME_DELTA)/1000000/60) ELA_MINSfrom...
View ArticleORA-04044: procedure, function, package, or type is not allowed here
Note:Tables containing '$' SYMBOL and when ever we use tables like v$session,v$log,v$logfile etc shell script take '$' SYMBOL as shell variables and then while reading script it gives...
View ArticleUse of TABLE_EXISTS_ACTION parameter in IMPDP
Table_Exists_Action used in impdp if table is already exists in the database where you want to import.TABLE_EXISTS_ACTION = SKIPTable_Exists_Action =Skip: skip is for skipping the table which are...
View ArticleORA-12154: TNS:could not resolve service name
If you are using local naming (TNSNAMES.ORA file):Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)Verify that a...
View ArticleQuery to find which user using temp tablespace
select username, tablespace ,sql_id from v$tempseg_usage;(or)select S.sid,S.username,U.tablespace,S.sql_hash_value ||'/'|| U.sqlhash hash_value,U.segtype,u.contents,U.blocks from v$session S,...
View ArticleQuery to find the table with most physica i/o
select table_name,total_phys_iofrom (select owner ||'.'|| object_name as table_name,sum(value) as total_phys_io from v$segment_statisticswhere owner!='SYS' and object_type='TABLE'and statistic_name in...
View ArticleQuery to find all constraints in a table
col type format a10col cons_name format a30selectdecode(constraint_type,'C', 'Check','O', 'R/O View','P', 'Primary','R', 'Foreign','U', 'Unique','V', 'Check view') type,constraint_name...
View ArticleQuery to find all executing sql
Query to find all executing sqlselect sql_textfrom v$sqlareawhere users_executing > 0/Query to find a particular users current sqlSelect sql_text from v$sqlareawhere (address, hash_value) in(select...
View ArticleFind the sql_text using ospid
Find top pids of oracle user$top -u oracleEnter the os pid and find the sql id select sid, sql_id from v$session s, v$process pwhere s.paddr = p.addrand p.spid = &OS_PID;Enter the sql_id to find...
View ArticleQuery to find datafile used and free space
SELECT Substr(df.tablespace_name,1,20) "Tablespace Name",Substr(df.file_name,1,40) "File Name",Round(df.bytes/1024/1024,2) "Size (M)",Round(e.used_bytes/1024/1024,2) "Used...
View Article