Monday, December 22, 2008

Transport Tablespace (Scripts) - 8 steps!!!

source:

1. select owner|| '.' ||, segment_type,tablespace_name from dba_segments where tablespace_name in ('tablespace_name')

if you want to add any user then

create user identified by password;

grant connect, resource to

2. alter tablespace read only;

3. execute dbms_tts.transport_set_check('tablespace_name',TRUE);

4. select * from transport_set_violations;

-- This should return 'NO ROWS SELECTED'

Export:

exp "'/as sysdba'" file = exp_tts.dmp log=exp_tts.log transport_tablespace=y tablespaces= tablespace_name

5. copy the .dmp file to target $ORACLE_HOME

6. Copy the datafile to target destination

Destination:

if you want to create user

then

create user identified by password;

grant connect, resource to

7. Import

imp "'/as sysdba'" file=exp_tts.dmp log=imp_tts.log fromuser = touser=newuser if created transport_tablespace=y datafiles=

source and destination

8. alter tablespace read write;

No comments:

Post a Comment