To generate one call for each profile:
SELECT UNIQUE 'SELECT DBMS_METADATA.GET_DDL(''PROFILE'',' || ''''|| PROFILE || ''') FROM DUAL;' FROM DBA_PROFILES;
In my case, the result was a total of three profiles. Use the resulting rows in the script below:
SET HEADING OFF SET TRIMSPOOL ON SET FEEDBACK OFF EXECUTE DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR', TRUE); -- your calls to dbms_metadata here SELECT DBMS_METADATA.GET_DDL('PROFILE','PROF') from dual; SELECT DBMS_METADATA.GET_DDL('PROFILE','DEFAULT') from dual; SELECT DBMS_METADATA.GET_DDL('PROFILE','ONLINEUSR') from dual;
No comments:
Post a Comment