Sie sind auf Seite 1von 4

Transportable Tablespace Document

(os­Redhat linux, rdbms­oracle 9i, using spfile)

This consists of two things which is combination of Logical and Physical Backup:­
1 Export of Metadata instead of the data OS a tablespace.
2 Copy of the file belonging to the tablespace.

The above two parts are transferred to compatble database location and plug the tablespace with its files 
to the database.
A. Restore the files i.e., export dump and datafiles in the new location.
B. Import the metadata using the export file which plugs the tablespace using the new location of the 
file.

Limitations:
1 The destination database must be equal version or higher than the source database.
2 Source and destination database must have same platform.
3 Character set must be same, DB block size must be same but from Oracle 9i can use 
non_standard block size in the destination database.
4 System tablespace cannot be transported.
5 Tablespace with system objects cannot be transportaed.
6 Tablespace can't be transported if the destination i.e., target database has a tablespace with same 
name.
7 Tablespace containing bitmap indexes, nested table etc are cannot be transported.
8 Tablespace must be self contained i.e., must not have relationship with objects of outside the 
tablespace.

Step 1:
Check the tablespace for integrity violations. Executing this pl/sql package.

DADA> execute dbms_tts.transport_set_check('DADA',TRUE);

PL/SQL procedure successfully completed.

Step 2:
Using view get information about integrity violations.

DADA> select * from transport_set_violations;
no rows selected

Step 3:
DADA> alter tablespace dada read only;

Tablespace altered.

Step 4:
Using export utility export the metadata.
$ exp userid=\"/ as sysdba\" file=dada_tbs.dmp log=dadatbs.log transport_tablespace=Y 
tablespaces=dada

Export: Release 9.2.0.1.0 ­ Production on Mon May 12 18:00:42 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 ­ Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 ­ Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
For tablespace DADA ...
. exporting cluster definitions
. exporting table definitions
. . exporting table                           TEST
. exporting referential integrity constraints
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.
[dadahayath.cg@yis­005 ~]$

Step 5:
Copy the datafile to the backup path
[dadahayath.cg@yis­005 datafile]$ cp dada01.dbf /orcl/dadahayath.cg/sriny/datafile/

Step 6:
Bring the tablespace to read write mode in first database.
DADA> alter tablespace dada read write;
Tablespace altered.
Plugging the Tablespace to Destination database :

Step1: 
 Transfer or copy the export dump file and the backup datafile to destination database location.
(this step not required if u doing in the same server or system)

Step 2:

[dadahayath.cg@yis­005 ~]$ imp userid=\"/ as sysdba\" file=dada_tbs.dmp log=dada_tbs_imp.log 
transport_tablespace=Y datafiles='/orcl/dadahayath.cg/sriny/datafile/dada01.dbf'

Import: Release 9.2.0.1.0 ­ Production on Mon May 12 18:18:54 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 ­ Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 – Production
Export file created by EXPORT:V09.02.00 via conventional path
About to import transportable tablespace(s) metadata...
import done in US7ASCII character set and AL16UTF16 NCHAR character set
. importing SYS's objects into SYS
. importing SRINY's objects into SRINY
. . importing table                         "TEST"
Import terminated successfully without warnings.
[dadahayath.cg@yis­005 ~]$

NOTE: Username of the objects present in the tablespace must exist in the destination database.

Step 3:
Check the view the tablespace is create or not.
SRINY> select * from v$tablespace;

       TS# NAME                           INC
­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­
         0 SYSTEM                        YES
         1 DTEMP                          YES
         2 USR                                YES
         3 UNDO_TBS                   YES
         4 DADA                             YES

Step 4:
Check the status of the tablespace.
SRINY> select  TABLESPACE_NAME, STATUS from dba_tablespaces;

TABLESPACE_NAME                STATUS
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­
SYSTEM                                     ONLINE
DTEMP                                       ONLINE
USR                                             ONLINE
UNDO_TBS                                ONLINE
DADA                                          READ ONLY

Step 5:
Place the tablespace to read write mode.

SRINY> alter tablespace dada read write;

Tablespace altered.

Step 6: 
Check whether the Tablespace is plugged in or not

SRINY> select tablespace_name, PLUGGED_IN from dba_tablespaces;

TABLESPACE_NAME                PLU
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­
SYSTEM                                     NO
DTEMP                                       NO
USR                                             NO
UNDO_TBS                                NO
DADA                                          YES

Das könnte Ihnen auch gefallen