Forum Stats

  • 3,874,696 Users
  • 2,266,767 Discussions
  • 7,911,952 Comments

Discussions

views to be included in ~source metadata view (~=dba_ (or) user_ (or) all_ )

Manik
Manik Member Posts: 2,908 Gold Trophy
edited Jun 24, 2016 3:27AM in Database Ideas - Ideas

This may sound very basic.. but I think it would be good to include views also in dba_source  (or user_source/all_source)

Lets say I search for a text called "HELLOWORLD" in the code base, we use :

--------------------------------
DROP TABLE tbl_vw_dba_views;

CREATE TABLE tbl_vw_dba_views
AS
   SELECT owner, view_name, TO_LOB (text) text FROM dba_views;  ---- this is again because of the limitation of text column being LONG so converting this into lob. -----------------------------------
SELECT distinct owner,name,typ
  FROM (SELECT owner, name, TO_CLOB (text) text, TYPE typ FROM dba_source
        UNION ALL
        SELECT owner, view_name, TO_CLOB (text), 'VIEW' FROM tbl_vw_dba_views)
WHERE UPPER (text) LIKE '%HELLOWORLD%'; ------------------------------------

Instead, if the  views are also included in the source it would be helpful..

May be a small thing but can help I guess...

Please let me know if this is already implemented somewhere in some other form/approach or am I missing something here?

Thanks!

Cheers,

Manik.

ManikSven W.William RobertsonPaulDdddd
4 votes

Active · Last Updated

Comments

  • Sven W.
    Sven W. Member Posts: 10,559 Gold Crown

    >> Please let me know if this is already implemented somewhere in some other form/approach or am I missing something here?


    The more recent versions of SQL Developer have a very nice search functionality. The tool is able to search through all the code, including views.

    But still the database could provide a more consistent access to code.

    Manik