Profile Metadata

Run this query first, so that it will print the complete metadata

set long 20000 longchunksize 20000 pagesize 0 linesize 1000 feedback off verify off trimspool on
column ddl format a1000

begin
   dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SQLTERMINATOR', true);
   dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'PRETTY', true);
end;
/

Now use DBMS_Meta_Data

SELECT DBMS_METADATA.GET_DDL('PROFILE', 'C##'_Profile_roll') AS profile_ddl
FROM dual;