Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: TABLESPACE: Transportable tablespaces Jump to:  
Category: >> Oracle PL/SQL >> TABLESPACE: Transportable tablespaces Bookmark and Share

<< 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)


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 73 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?