he default tablespace for user B is tablespace B, and only tablespace A is included in the set of tablespaces. To determine whether a set of tablespaces is self-contained, you can invoke the TRANSPORT_SET_CHECK procedure in the Oracle supplied package DBMS_TTS. You must have been granted the EXECUTE_CATALOG_ROLE role (initially signed to SYS) to execute this procedure.
When you invoke the DBMS_TTS package, you specify the list of tablespaces in the transportable set to be checked for self containment. You can optionally specify if constraints must be included. For strict or full containment, you must additionally set the TTS_FULL_CHECK parameter to TRUE.
The strict or full containment check is for cases that require capturing not only references going outside the transportable set, but also those coming into the set. Tablespace Point-in-Time Recovery (TSPITR) is one such case where dependent objects must be fully contained or fully outside the transportable set.
For example, it is a violation to perform. TSPITR on a tablespace containing a table t but not its index i because the index and data will be inconsistent after the transport. A full containment check ensures that there are no dependencies going outside or coming into the transportable set. See the example for TSPITR in the Oracle Database Backup and Recovery User's Guide.
| incl_constraints |
TRUE if you want to count in referential integrity constraints when examining if the set of tablespaces is self-contained. (Theincl_constraints parameter is a default so that TRANSPORT_SET_CHECK will work if it is called with only the ts_list argument.) |
| full_check |
Indicates whether a full or partial dependency check is required. If TRUE, treats all IN and OUT pointers (dependencies) and captures them as violations if they are not self-contained in the transportable set. The parameter should be set to TRUE for TSPITR or if a strict version of transportable is desired. By default the parameter is set to false. It will only consider OUT pointers as violations. |
1.3.5可传输表空间
在很多Oracle文档中,可能大家都注意过Oracle用来进行测试的一个表空间,这个表空间中有一系列预置的用户和数据,可以用于数据库或BI的很多测试实验。
这个表空间在使用模板建库时是可以选择的,在如图1-22所示的这个界面中,可以选择建库时包含这个范例表空间(缺省是未选择的)。
vcWxvr2ru+HT0Mv5uMSx5KOs1vfSqtT2vNPBy8jnz8LT777ko7o8L3A+CjwvYmxvY2txdW90ZT4KPGJsb2NrcXVvdGU+CmNvbm5lY3QgJnF1b3Q7U1lTJnF1b3Q7LyZxdW90OyZhbXA7JmFtcDtzeXNQYXNzd29yZCZxdW90OyBhcyBTWVNEQkE8YnI+CkBDOlxvcmFjbGVcMTAuMi4wXGRlbW9cc2NoZW1hXG1rcGx1Zy5zcWwgJmFtcDsmYW1wO3N5c1Bhc3N3b3JkIGNoYW5nZV9vbl9pbnN0YWxsIGNoYW5nZV9vbl9pbnN0YWxsIDxicj4KY2hhbmdlX29uX2luc3RhbGwgY2hhbmdlX29uX2luc3RhbGwgY2hhbmdlX29uX2luc3RhbGwgY2hhbmdlX29uX2luc3RhbGwgQzpcb3JhY2xlXDEwLjIuMFxhc3Npc3RhbnRzXGRiY2FcdGVtcGxhdGVzXGV4YW1wbGUuZG1wIEM6XG9yYWNsZVwxMC4yLjBcYXNzaXN0YW50c1xkYmNhXHRlbXBsYXRlc1xleGFtcGxlMDEuZGZiIEM6XG9yYWNsZVxvcmFkYXRhXGV5Z2xlXGV4YW1wbGUwMS5kYmYgQzpcb3JhY2xlXGFkbWluXGV5Z2xlXHNjcmlwdHNcICZxdW90Ow=="SYS/&&sysPassword as SYSDBA'";
看到这里,再次引用了模板目录中的文件:
C:\>dir C:\oracle\10.2.0\assistants\dbca\templates\ex*
驱动器 C 中的卷是 SYSTEM
卷的序列号是 8C88-D1B4
C:\oracle\10.2.0\assistants\dbca\templates 的目录
2005-09-07 13:02 983,040 example.dmp
2005-09-07 13:02 20,897,792 example01.dfb
2 个文件 21,880,832 字节
0 个目录 915,578,880 可用字节
通过mkplug.sql脚本来加载这个范例表空间,来看一下这个脚本的主要内容。
同样,最重要的是通过dbms_backup_restore包从example01.dfb文件中恢复数据文件:
SELECT TO_CHAR(systimestamp, 'YYYYMMDD HH:MI:SS') F