确认表空间是否自包含

1.执行检查自包含的脚本(需要有EXECUTE_CATALOG_ROLE角色)

SQL> EXECUTE SYS.DBMS_TTS.TRANSPORT_SET_CHECK(‘USERS’,TRUE);

PL/SQL procedure successfully completed.

2.查看结果

SQL> select * from sys.transport_set_violations;

no rows selected

3.创建不同表空间的分区表

SQL> create table dxmy(id number,name varchar2(10)) partition by range (id)
2 (partition p1 values less than (4) tablespace TDB,
3 partition p2 values less than (6) tablespace sysaux,
4 partition p3 values less than (maxvalue) tablespace users);

Table created.

4.再次执行以上1,2步

SQL> execute sys.dbms_tts.transport_set_check(‘USERS’,TRUE);

PL/SQL procedure successfully completed.

SQL> select * from sys.transport_set_violations;

VIOLATIONS
——————————————————————————————————————————————————————————————————-
ORA-39921: Default Partition (Table) Tablespace SYSTEM for DXMY not contained in transportable set.
ORA-39901: Partitioned table SYS.DXMY is partially contained in the transportable set.
ORA-39917: SYS owned object DXMY in tablespace USERS not allowed in pluggable set

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐