How to Find the Object With an SQL String in Oracle
SQL, or Structured Query Language, is a database-filtering tool to find information based on conditions or requirements. For example, if you have a box of colored marbles, and you want to pull out only the red marbles, you have created a filter to search for only red marbles and ignore the other ones. In a database, something similar happens. An example of a database is a phone book with name, address, and phone numbers. If you want only the numbers that start with "817," "817" is the filter condition and is the basis for a query, the filtering tool in a database.
Instructions
-
-
1
Launch the Oracle program.
-
2
Type the following command:
"SELECT owner, name, type, line, text FROM dba_source WHERE instr(UPPER(text), UPPER(:srch_str)) > 0."
The "Select" statement tells the database that you are starting a query. The "owner, name, type, line, and text" are the objects that you want to find and pull out of the database. The "where" command is the filter, and the WHERE instr(UPPER(text), UPPER(:srch_str)) > 0" are the filter conditions.
-
-
3
Type the following command:
"select * from user_source."
This command queries the source code. It gets information about the procedures, objects, package and functions.
-
1