Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Sending SQLPLUS output in HTML format Oracle
  • catall.sh Linux/Unix
  • Wait.sql Oracle
  • ipcs -l Linux/Unix
  • Directory wise folder wise space usage Linux/Unix
  • TRUNCATE table and disabling referential constraints. Oracle
  • chk_space_SID.ksh Linux/Unix
  • configUOCIOTTO.ora Oracle
  • Temporary Tablespace Information and restriction. Oracle
  • Finding Oracle Patches with opatch Oracle
  • Renaming the column name Oracle
  • Temporary tablespace explaination Oracle
  • get_vmstat_solaris Oracle
  • Default User Profile Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix

find_string_in_database.sql

Posted on 02-Jun-2009 By Admin No Comments on find_string_in_database.sql

set lines 120 pages 2000

accept pvm prompt “Enter The String You Want to Search -> ”

select distinct owner, name, type from dba_source where

instr(upper(text), upper(‘&pvm’)) != 0 ;

set serveroutput on

DECLARE

CURSOR cur_triggers IS

SELECT owner, trigger_name, table_name, trigger_body

FROM dba_triggers;

v_position INTEGER;

BEGIN

DBMS_OUTPUT.ENABLE(NULL);

DBMS_OUTPUT.PUT_LINE(‘OWNER TABLE NAME TRIGGER NAME ‘);

DBMS_OUTPUT.PUT_LINE(‘===================================================================================================’)

;

FOR pvm1 IN cur_triggers LOOP

v_position := INSTR(upper(pvm1.trigger_body), upper(‘&pvm’));

IF v_position > 0 THEN

DBMS_OUTPUT.PUT_LINE(rpad(pvm1.owner,30, ‘ ‘) || ‘ ‘|| rpad(pvm1.table_name, 30, ‘ ‘) || ‘ ‘|| rpad(pvm1.trigger_name,

30, ‘ ‘));

END IF;

END LOOP;

END;

/

Oracle, SQL scripts

Post navigation

Previous Post: How to Make Trace Files Created by Oracle Readable by All Users ?
Next Post: check_copy_progress.sh

Related Posts

  • Good notes on Oracle Events Oracle
  • block_ident.sql Oracle
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • Good RAC & Standby Notes Oracle
  • Caching sequence in Memory Oracle
  • eplan9i.sql Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

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

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • Goog notes on X$ tables Oracle
  • Reading config file from other folder inside class Python/PySpark
  • Removing first line Linux/Unix
  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • Rollback force for distributed transactions Oracle
  • How can I tell if ASO is installed ? Oracle
  • currwait.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme