Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • SQL Server: How to see current transactions or requests SQL Server
  • Find Stale DR Physical Standby Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Monitor Long Running Job Oracle
  • scripts to take listener.log backup Linux/Unix
  • create a folder in multiple places Linux/Unix
  • import-export with multiple files Oracle
  • cif crons Linux/Unix
  • Running select from V$ views from remote server Linux/Unix
  • ORA-01220 Oracle
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • crontab syntax Linux/Unix
  • MYSQL for Oracle DBA MYSQL
  • Goldengate document from Porus Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle

Category: Oracle

fkwoindex.sql /* Find FK without Index */

Posted on 02-Aug-2005 By Admin No Comments on fkwoindex.sql /* Find FK without Index */

set pagesize 300 set linesize 205 set head on set echo off spool fkwoind accept usrid prompt ‘Enter User Name : ‘ col “Cons Name” format a30 heading “Cons Name” word_wrapped col status format a10 heading status col “Cons Type” format a12 heading “Cons Type” col “Column Name” format a30 heading “Column Name” col “Cons…

Read More “fkwoindex.sql /* Find FK without Index */” »

Oracle, SQL scripts

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

Posts pagination

Previous 1 … 35 36 37 … 40 Next

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Set Role explaination. Oracle
  • crontab syntax Linux/Unix
  • Check Oracle installed products using one command Oracle
  • Committing distributed transaction using commit force Oracle
  • move_arch_files.ksh Linux/Unix
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • RAC with RHEL4 and 11g Oracle
  • Transfer SQL Profiles from One database to other database. Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme