欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

确认表空间是否自包含

程序员文章站 2022-09-28 16:18:53
1.执行检查自包含的脚本(需要有EXECUTE_CATALOG_ROLE角色) SQL> EXECUTE SYS.DBMS_TTS.TRANSPORT_SET_CHECK(...

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