Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
32 lines (26 loc) · 1.19 KB

File metadata and controls

32 lines (26 loc) · 1.19 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- | CLASS : Database Administration |
-- | PURPOSE : Prompt the user for a query string and look for any object that |
-- | contains that string. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET PAGESIZE 9999
COLUMN owner FORMAT A15 HEADING "Owner"
COLUMN object_name FORMAT A35 HEADING "Object Name"
COLUMN object_type FORMAT A18 HEADING "Object Type"
COLUMN created HEADING "Created"
COLUMN status HEADING "Status"
ACCEPT sch prompt 'Enter Search String (i.e. table name or view name) : '
ACCEPT owner prompt 'Enter owner name or hit enter to search all user : '
SELECT
owner
, object_name
, object_type
, TO_CHAR(created, 'DD-MON-YYYY HH24:MI:SS') created
, LPAD(status, 7) status
FROM all_objects
WHERE object_name like UPPER('%&sch%')
and
owner like upper(nvl('%&owner%',owner))
ORDER BY owner, object_name, object_type
/
Morty Proxy This is a proxified and sanitized view of the page, visit original site.