Oracle SQL Spool dbms_metadata.get_ddl different in 19c

855 Views Asked by At

When our database was running in 11g the output of >>

spool post_create_users_metadata.sql
select dbms_metadata.get_ddl('USER', 'PHIL') txt from dual;

was >>

CREATE USER "PHIL" IDENTIFIED BY VALUES 'bhbhbhjkbh' DEFAULT TABLESPACE "DATA" TEMPORARY TABLESPACE "PDBTEMP" PROFILE "USER_LIMIT";

Now in 19c the output is different and appends another command onto the end to do with local pdb temp tablespace >>

spool post_create_users_metadata.sql
select dbms_metadata.get_ddl('USER', 'PHIL') txt from dual;

CREATE USER "PHIL" IDENTIFIED BY VALUES 'bhbhbhjkbh' DEFAULT TABLESPACE "DATA" TEMPORARY TABLESPACE "PDBTEMP" PROFILE "USER_LIMIT"; ALTER USER "PHIL" LOCAL TEMPORARY TABLESPACE "PDBTEMP";

spool off

Does anyone know how i can either delete the Alter command at the end before the spool? Or, have the alter command do a line return so thats its not all spooled out on the same line?

Thanks for the help.

0

There are 0 best solutions below