Retrieving object / record metadata present inside a package - Oracle Dataabse
I need to get the RECORD metadata that is inside a package. If the object is created outside of the package, I can get its metadata from the "DBA_TYPE_ATTRS" table . However, it doesn't work if RECORD / OBJECT is inside a 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 do I get MetaData information from pkg_table_row ?
Please help if we have an Oracle managed dictionary or table from where to get the metadata from.
source to share
I need to get the RECORD metadata found inside a package
The RECORD type is not stored as an object in the database, and therefore you cannot get the metadata through the view. If you pass it as an argument, you can request the * _ ARGUMENTS view .
Else, the only way that comes to my mind is to parse the package text from the * _source view.
For example,
SELECT text
FROM user_source
WHERE name = '<name'>
AND type = <program_type>
ORDER BY line;
It will be ugly though.
source to share