Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasleplus/dbgrep
Oracle PL/SQL stored procedure to search a regular expression across all text columns of a database.
https://github.com/thomasleplus/dbgrep
database grep grepping oracle oracle-database oracle-db plsql regex regular-expression search
Last synced: about 1 month ago
JSON representation
Oracle PL/SQL stored procedure to search a regular expression across all text columns of a database.
- Host: GitHub
- URL: https://github.com/thomasleplus/dbgrep
- Owner: thomasleplus
- License: apache-2.0
- Created: 2016-03-18T14:48:25.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T21:40:31.000Z (3 months ago)
- Last Synced: 2024-10-24T10:11:34.765Z (3 months ago)
- Topics: database, grep, grepping, oracle, oracle-database, oracle-db, plsql, regex, regular-expression, search
- Homepage:
- Size: 456 KB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# DBGrep
Oracle PL/SQL stored procedure to search a regular expression across all text
columns of a database.To import the `grep()` procedure in your current database, download the
file [grep.sql](grep.sql) and then run the following command in SQLPlus:```text
SQL> @grep.sql
```The `grep()` procedure takes two arguments: the name of the schema to
search and a pattern compatible with the SQL operator LIKE. For
example:```text
SQL> EXECUTE grep('HR', '%John%');
```The output of the procedure is in CSV format (without headers). Each
row is a match found in the database. For each match, the columns are
the searched pattern, the schema name, the table name, the column name
and the column value. For example, the output might look like this:```text
"%John%","HR","employees","first_name","John"
"%John%","HR","employees","full_name","John Doe"
"%John%","HR","employees","email_address","[email protected]"
```See [test.sql](test.sql) for a full-fledged example.