参考MOS:11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (Doc ID 1389592.1)
--CREATE_USER_DDL
select to_char(dbms_metadata.get_ddl('USER',USERNAME)) CREATE_USER_DDL from dba_users where ACCOUNT_STATUS='OPEN' and USERNAME not in ('SYS','SYSTEM');
--GRANT_ROLE_DDL
select to_char(dbms_metadata.get_granted_ddl('ROLE_GRANT',GRANTEE)) GRANT_ROLE_DDL from dba_role_privs where GRANTEE in (select USERNAME from dba_users where ACCOUNT_STATUS='OPEN' and USERNAME not in ('SYS','SYSTEM'));
--default_tablespace
select 'alter user '||username||' default tablespace '||default_tablespace||';' from dba_users where ACCOUNT_STATUS='OPEN' and USERNAME not in ('SYS','SYSTEM');
select OWNER,TYPE,count(1) from dba_recyclebin group by OWNER,TYPE order by OWNER;
show parameter recyclebin
alter systemn set recyclebin='off' scope=both;
purge recyclebin;
execute sys.dbms_tts.transport_set_check('TBS,TEST,TEST2,GG_TBS,JJ_TBS,USERS', true);
select * from sys.transport_set_violations;
create user xttst identified by xttst default tablespace USERS;
grant connect,resource to xttst;
create table xttst.xtts (aa date);
insert into xttst.xtts values (sysdate);
commit;
alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
select * from xttst.xtts;