Oracle : TRANSPORTABLE TABLESPACE IN ORACLE

Share via:

TRANSPORTABLE TABLESPACE IN ORACLE                                                            

 

Transportable Tablespace is used to move large amount of data between databases where the tablespace is  copied from source database to the target database.

TRANSPORTABLE BACKUPS:

  • It is introduced in version 8i
  • This backup is copying the whole tablespace from one DB to other along with the data
  • This allows DBA to quickly copy n no of files from one DB to other.
  • In version 8i, target database o/s and source database o/s must be same.
  • In version 9i, oracle started supporting multi block size at tablespace level.
  • In version 10g, oracle started supporting multi block size and multiple o/s.

Several different scenarios that can utilize transportable tablespace include:

  • Restoring an unrecoverable database
  • Migrating to a different OS.

NOTE: The tablespace name in the target database cannot have the same name in source database.

 

FIGURE  :

 

 

 

Segments present under system tablespace and any objects present in SYS cannot be transported because it contains all users, privileges, PL/SQL procedures.

Limitations:

  1. It should not contain sys owned objects, temp segments, undo segments, dependent objects.
  2. If any violations are found we need to drop or remove violations then only we can do transportation.

Package of dependent objects under particular tablespace = exec dbms_tbs_transport_set_check;

Package of dependents info stored under database objects (gives the reference of the objects  in the tablespace to be transported) = transport_set_violations;

 

EXAMPLES ON TRANSPORTABLE TABLESPACE:

 

  1. Create tablespace tbs

 

  1. Create user us and grant privileges to it:

 

  1. alter the user us to set tablespace tbs as default tablespace:

 

  1. Now connect to user us:

 

  1. Create table t1 to user us and insert values into it:

 

 

  1. Connect to sys user and check whether dependencies are present or not:

Package of dependent objects present under particular tablespace= exec dbms_tts.transport_set_check(‘TBS’)

 

 

  1. Check whether any violations are present:

Package of dependent objects present under database objects= transport_set_violations

If any dependencies are present, then drop and execute.

 

 

  1. alter tablespace to read only mode assuming no violations are present:

 

 

  1. export the tablespace tbs metadata using exp utility:

 

 

  1. Now on the client side perform import operation using import utility:

 

 

  1. Switch the tablespace to read write mode:

 

 

  1. Now check the tablespace is available at client side:

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (12 votes, average: 5.00 out of 5)
Loading...

Add Comment