Sybernet / Supplied Procedures Reference
Release 3.00
Apr 21, 2005
backwards forwards

HTTP.WHEREUSED

This procedure allows you to search for specific text in the source of your database procedures, functions, and packages. You can search for multiple strings at the same time by separating your request by commas. If you need to search for text that contains commas (since this is a delimiter), you can quote this text with single or double quotes.

If run from the Sybernet Interactive SQL and Editor, you can click on each procedure name to view or edit the source of each procedure found containing this text.


Syntax

Procedure WHEREUSED
(
    OWNER                         VARCHAR2
,   TEXT                          VARCHAR2
,   CASESENSITIVE                 PL/SQL BOOLEAN
,   PATINDEX                      PL/SQL BOOLEAN
,   LINES                         NUMBER
,   SORT                          VARCHAR2
,   DEBUG                         PL/SQL BOOLEAN
)   ;

Parameters

Parameter Description
owner
 
The schema to search or NULL if searching all schemas.
text
 
The text to search. You can search for several strings at the same time by separating each string with a comma. If you want to search for strings containing a comma, then you need to quote (single-quote or double-quote) your request.
casesensitive
 
TRUE if the search is case-sensitive. FALSE if the search is case-insensitive.
patindex
 
This option tells this application that your text string contains one or more patterns.
lines
 
The number of lines of source text to display before and after each line containing this text. A value of zero means you are only interesting in displaying the line that contains this text. A value less than zero means you are only interested in the object name that contains this text.
sort
 
This option allows you specify the order by clause. Any column from all_source is allowed. Any column that is not in all_source will induce a syntax error. The default is owner, type, name, line.
debug
 
This option displays extra information about what is being searched and how the database is searched.


Example

The following example illustrates how to display all objects that reference sp_html_frame:

HTTP.WHEREUSED
(
    OWNER                         => NULL
,   TEXT                          => 'HTTP.SP_HTML_FRAME'
,   CASESENSITIVE                 => FALSE
,   PATINDEX                      => FALSE
,   LINES                         => -1
)


Example

The following example illustrates how to search for multiple targets. In this example only those lines containing this target is displayed:

HTTP.WHEREUSED
(
    OWNER                         => 'PSHRPRD'
,   TEXT                          => '4Z,4Y,4T,4S,4R,4X,4U,4V'
,   CASESENSITIVE                 => TRUE
,   PATINDEX                      => FALSE
,   LINES                         => 0
)


Example

The following example illustrates how to search for all occurrences of sp_cron_insert_parameter and displays 3 lines before and after each affected line:

HTTP.WHEREUSED
(
    OWNER                         => NULL
,   TEXT                          => 'SP_CRON_INSERT_PARAMETER'
,   CASESENSITIVE                 => FALSE
,   PATINDEX                      => FALSE
,   LINES                         => 3
)


Example

The following example illustrates how to search for a pattern instead of literal text:

HTTP.WHEREUSED
(
    OWNER                         => 'PSHRPRD'
,   TEXT                          => '%PLAN_TYPE%10%'
,   CASESENSITIVE                 => FALSE
,   PATINDEX                      => TRUE
,   LINES                         => 3
)


See Also

PATINDEX
SP_DEPENDS
SP_HTML_ISQL



Sybernet is a trademark of SRI International.
Copyright © 1996-2009 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/