SYS@orcl>create tablespace data01
datafile '/home/oracle/data01.dbf' size 50m reuse
autoextend on;
SYS@orcl>alter tablespace data01 read only;
SYS@orcl>create directory ttsdump as '/home/oracle/dump';
[oracle@lnx04 dump]$
expdp system/oracle transport_tablespaces=data01 dumpfile=tts_data.dmp directory=ttsdump
Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 15:41:01
[oracle@lnx04 dump]$ cp /home/oracle/data01.dbf /u01/app/oracle/oradata/prod/
[oracle@lnx04 dump]$ export ORACLE_SID=prod
[oracle@lnx04 dump]$ pr
[oracle@lnx04 dump]$ ec
prod
SYS@prod>create directory ttsdump as '/home/oracle/dump';
SYS@prod>grant read,write on directory ttsdump to system;
[oracle@lnx04 dump]$
impdp system/oracle transport_datafiles=/u01/app/oracle/oradata/prod/data01.dbf dumpfile=tts_data.dmp directory=ttsdump
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 15:55:55
SYS@prod>select * from v$tablespace;
7 DATA01 YES NO YES
7 rows selected.
SYS@prod>select file_name, online_status from dba_data_files ;
/u01/app/oracle/oradata/prod/data01.dbf
ONLINE
6 rows selected.
'스터디북' 카테고리의 다른 글
<11/08> 4 Walls (0) | 2015.11.08 |
---|---|
[11/07] Flashback query / recyclebin rename (0) | 2015.11.07 |
<11/07> 밤 (0) | 2015.11.07 |
[11/07] duplicate DB (0) | 2015.11.07 |
<11/06> 사랑은 타이밍 (0) | 2015.11.06 |