Search

Monday 30 March 2015

Difference between dba_source and all_source

In short the difference between dba_source and all_source is:

ALL_SOURCE describes the text source (all the code) of the stored objectsaccessible to the current user. Whereas DBA_SOURCE is not limited for a particular user, it describes the text source of all stored objects in the database.

Wait that's not all there is!

Both dba_source and all_source have 5 columns: OWNER, NAME,TYPE, LINE and TEXT. Other then these two there is one more view called USER_SOURCE which describes the text source of the stored objects owned by the current user.

Just tell me how to use it!

Most common way to use these:
1
SELECT * FROM dba_source where TEXT like '%package.procedure/function_name%'
view rawfirst_post hosted with ❤ by GitHub

Source: Oracle Docs for DBA_SOURCEALL_SOURCE