zytham
zytham

Reputation: 623

Retrieve meta-data of Object/Record present inside package - Oracle Dataabse

I have to retrieve meta-data of RECORD residing inside a package. If Object is created outside package I am able to retrieve its meta-data from "DBA_TYPE_ATTRS" table.However, it is not working if RECORD/OBJECT is inside package.

create or replace Package sp_fun_package 
is 
 TYPE pkg_table_row IS RECORD ( 
  name varchar2(100),
  age NUMBER,
  place varchar2(100)   
 );
TYPE pkg_table_type is table of pkg_table_row;
end sp_fun_package;

How to get MetaData info of pkg_table_row?

Please help , if we have some dictionary or table managed by Oracle from where metadata can be retrieved.

Upvotes: 3

Views: 117

Answers (1)

Lalit Kumar B
Lalit Kumar B

Reputation: 49082

I have to retrieve meta-data of RECORD residing inside a package

A RECORD type is not stored in the database as an object, and hence you cannot retrieve the metadata via a view. If you are passing it as an argument, then you could query the *_ARGUMENTS view.

Else, the only way that comes to my mind is to parse the Package text from *_source view.

For example,

SELECT   text 
FROM     user_source 
WHERE    name = '<name'> 
AND      type = <program_type> 
ORDER BY line;

It is going to be ugly though.

Upvotes: 2

Related Questions