Quick Search:
 
 Oracle PL/SQL: TABLESPACE: Transportable tablespaces Jump to:  
Category: >> Oracle PL/SQL >> TABLESPACE: Transportable tablespaces  

<< lastnext >>

Snippet Name: TABLESPACE: Transportable tablespaces

Description: Transportable tablespaces allow whole tablespaces to be copied between databases in the time it takes to copy the datafiles. For a tablespace to be transportable it must be totally self contained. This can be checked using the DBMS_TTS.TRANSPORT_SET_CHECK procedure.

Also see:
» TABLESPACE: Show contiguous space
» TABLESPACE: SYSAUX tablespace
» TABLESPACE: Tablespace management
» TABLESPACE: List tablespaces, files, ...
» TABLESPACE: Dropping Tablespaces
» TABLESPACE: Alter Permanent Tablespace
» TABLESPACE: Tempfile operations
» TABLESPACE: Create temp tablespace
» TABLESPACE: Change UNDO tablespace
» TABLESPACE: Undo Tablespace
» TABLESPACE: SYSAUX Tablespace
» TABLESPACE: Set default tablespace type
» TABLESPACE: Oracle Managed Auto-extend...
» TABLESPACE: Permanent Tablespace Using...
» TABLESPACE: Using Raw Devices
» TABLESPACE: permanent tablespace

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 12th, 2009

-- check for transportability using the 
-- DBMS_TTS.TRANSPORT_SET_CHECK procedure
 
-- syntax: 
DBMS_TTS.transport_set_check(
tablespace_name IN VARCHAR2, TRUE);
 
-- example: 
EXEC DBMS_TTS.TRANSPORT_SET_CHECK(ts_list => 'OEM_REPOSITORY', incl_constraints => TRUE);
 
-- the system will respond:
PL/SQL PROCEDURE successfully completed.
 
-- View any violations: 
SELECT * FROM TRANSPORT_SET_VIOLATIONS;
 
-- Generate a transportable set: 
ALTER TABLESPACE <tablespace_name> READ ONLY;
ALTER TABLESPACE tools READ ONLY;
 
-- Exporting tablespace: Note that even the export utility is 
-- used, only the data dictionary's structural information 
-- (the metadata) for the tablespaces is exported.      
EXP TRANSPORT_TABLESPACE=Y
TABLESPACES=(<comma_delimited_list_of_tablespaces>)
TRIGGERS=Y CONSTRAINTS=N GRANTS=N FILE=<the_file_name>
EXP TRANSPORT_TABLESPACE=y TABLESPACES=(client_1,client_2)
TRIGGERS=y CONSTRAINTS=n GRANTS=n FILE=test_data.dmp
 
-- Import Tablespace: 
IMP TRANSPORT_TABLESPACE=<Y | N> FILE=<the_file_name>
DATAFILES=('<comma_delimited_list_of_data_files>)
TABLESPACES=(<comma_delimited_list_of_tablespaces>)
TTS_OWNERS=(<comma_delimited_list_of_schema_owners>)
FROMUSER=(jsmith, mrogers) TOUSER=(jones, brown)
IMP TRANSPORT_TABLESPACE=y FILE=test_data.dmp
DATAFILES=('/test/client_list_1','/test/client_list_2')
TABLESPACES=(sales_1,sales_2) TTS_OWNERS=(jsmith, mrogers)
FROMUSER=(jsmith, mrogers) TOUSER=(jones, brown)
 
-- Import a parameter file: 
TRANSPORT_TABLESPACE=y
FILE=test_data.dmp
DATAFILES=('/test/client_list_1','/test/client_list_2')
TABLESPACES=(client_1, client_2)
TTS_OWNERS=(jsmith, mrogers)
FROMUSER=(jsmith, mrogers)
TOUSER=(jones, brown)


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org