Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Default User Profile Oracle
  • get_vmstat.ksh for Solaris Oracle
  • To see only files and/or folders using LS command Linux/Unix
  • Sort with ASCII order and Numeric Order Linux/Unix
  • Find all users who have DML privileges Oracle
  • Changing default shell Linux/Unix
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • Oracle 10g for solaris 10 Oracle
  • VIvek Encryption Package and Its Usage Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • import-export with multiple files Oracle
  • Find_planinfo.sql Oracle
  • good note for shared pool tunnig Oracle

Category: Oracle

findx.sql /* Find Indexes on specified USER.TABLE_NAME */

Posted on 02-Aug-2005 By Admin No Comments on findx.sql /* Find Indexes on specified USER.TABLE_NAME */

accept usrnm prompt “Enter The User Name -> ” accept tblnm prompt “Enter The Table Name -> ” select index_name, substr(column_name,1,15) “Colm Name”, column_position “Position” from dba_ind_columns where table_name = upper(‘&tblnm’) and table_owner = upper(‘&usrid’) order by index_name, column_position;

Oracle, SQL scripts

tab.sql

Posted on 02-Aug-2005 By Admin No Comments on tab.sql

select table_name, tablespace_name from dba_tables where owner = upper(‘&usrnm’) order by table_name /

Oracle, SQL scripts

login.sql

Posted on 02-Aug-2005 By Admin No Comments on login.sql

REM Author : Paresh Mehta REM Created : June 4, 2004 REM Purpose : Change the look of sql prompt (for 9i). set echo off set numwidth 9 set linesize 100 set pagesize 24 Set head off set time on set timing on define _PVMUSRNM=”” column USERNAME new_value _PVMUSRNM; column name new_value _PVMDBSTR; select username…

Read More “login.sql” »

Oracle, SQL scripts

block_ident.sql

Posted on 02-Aug-2005 By Admin No Comments on block_ident.sql

select /*+ all_rows */ distinct owner, segment_name, segment_type from dba_extents where file_id = &filid and &blkid between block_id and block_id+blocks-1;

Oracle, SQL scripts

eplan.sql

Posted on 02-Aug-2005 By Admin No Comments on eplan.sql

truncate table plan_table; EXPLAIN PLAN SET STATEMENT_ID = ‘pvm’ FOR select distinct owner, segment_name, segment_type from dba_extents where file_id = &filid and &blkid between block_id and block_id+blocks-1; — syntax for viewing information from plan_table SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position) “Query Plan” FROM plan_table START WITH id =…

Read More “eplan.sql” »

Oracle, SQL scripts

refre.sql

Posted on 02-Aug-2005 By Admin No Comments on refre.sql

REM Author : Paresh Mehta REM Created : June 4, 2004 REM Purpose : Change the look of sql prompt (for 9i). set echo off set numwidth 9 set linesize 100 set pagesize 24 Set head off set time on set timing on define _PVMUSRNM=”” column USERNAME new_value _PVMUSRNM; column name new_value _PVMDBSTR; select username…

Read More “refre.sql” »

Oracle, SQL scripts

ext#.sql

Posted on 02-Aug-2005 By Admin No Comments on ext#.sql

/* USER_EXTENTS describes the extents comprising the segments owned by the current user’s objects. This view does not display the OWNER, FILE_ID, BLOCK_ID, or RELATIVE_FNO columns. Column Datatype NULL Description ————————————————————————————————————— OWNER VARCHAR2(30) Owner of the segment associated with the extent SEGMENT_NAME VARCHAR2(81) Name of the segment associated with the extent PARTITION_NAME VARCHAR2(30) Object Partition…

Read More “ext#.sql” »

Oracle, SQL scripts

sesswait.sql

Posted on 02-Aug-2005 By Admin No Comments on sesswait.sql

set pages 300 set lines 151 column event format a30 column p1_detail format a25 column p2_detail format a15 column p3_detail format a5 column sid format a15 column wait_time format 999999 column seconds_in_wait format 999999999 column state format a30 word_wrapped select A.SID ||’,’ || A.seq# sid , A.EVENT, A.P1TEXT || ‘=’ || A.P1 p1_detail, A.P2TEXT ||…

Read More “sesswait.sql” »

Oracle, SQL scripts

Wait time tuning research

Posted on 02-Aug-2005 By Admin No Comments on Wait time tuning research

http://www.dba-oracle.com/art_otn_waits.htm v$session.paddr = v$process.addr v$session.sid = v$session_wait.sid v$session.sql_address = v$sqlarea.address v$session.sql_hash_value = v$sqlarea.hash_value v$session.sql_id = v$sqlares.sql_id v$session.server shows Dedicated or MTS configuration. The fields module and action of v$session can be set with dbms_application_info.set_module. The field client_info can be set with dbms_application_info.set_client_info Join sid with v$sesstat if you want to get some statistical information for…

Read More “Wait time tuning research” »

Oracle, SQL scripts

crtgr.sql /* For creating trigger from data dictionary */

Posted on 02-Aug-2005 By Admin No Comments on crtgr.sql /* For creating trigger from data dictionary */

SET LONG 1000000 UNDEFINE trigger_name SET PAGES 0 SET FEEDBACK OFF SET LINES 132 set echo off set numwidth 9 Set head off set verify off set time off set timing off COLUMN text FORMAT A302 word_wrapped COLUMN spool_name NEW_VALUE spool_name NOPRINT SELECT lower(trigger_name||’.ctr’) spool_name FROM dba_triggers WHERE trigger_NAME = UPPER(‘&&trigger_name’); SPOOL &spool_name select ‘CREATE…

Read More “crtgr.sql /* For creating trigger from data dictionary */” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 35 36 37 … 40 Next

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • to see when crontab is changed. Linux/Unix
  • perf_today.sql Oracle
  • Index Range Scan Oracle
  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • database trigger failing Oracle
  • More info about /proc folder and its relation with processes. Linux/Unix
  • AWR settings- MMON is not taking snapshot. Oracle
  • Sequence Resetting Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme