DECLARE
l_new_profile varchar2(100) := 'NEW_PROFILE';
BEGIN
-- execute immediate 'create profile ' || l_new_profile || ' limit PASSWORD_GRACE_TIME 7';
for rec in (SELECT PROFILE, RESOURCE_NAME, LIMIT
FROM dba_profiles
WHERE
profile = 'DEFAULT'
ORDER BY PROFILE, resource_name)
loop
execute immediate 'alter profile ' || l_new_profile || ' limit ' || rec.resource_name || ' ' || rec.limit;
end loop;
END;
|