Search This Blog

Thursday, January 4, 2007

Transport Tablespace


SQL> alter tablespace TEST read only;
Tablespace altered.
SQL> host exp TRANSPORT_TABLESPACE=y TABLESPACES=test -

> FILE=e:\test.dmp LOG=e:\test.log
Export: Release 10.1.0.2.0 - Production on Thu Jan 4 16:38:31 2007
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: sys@sh as sysdba

Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - ProductionWith the Partitioning, OLAP and Data Mining options

Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character setNote: table data (rows) will not be exported

About to export transportable tablespace metadata...For tablespace TEST .... exporting cluster definitions.

exporting table definitions. .

exporting table DEPT. .

exporting table EMP. .

exporting table BONUS. .

exporting table SALGRADE. .

exporting table SCOT.

exporting referential integrity constraints.

exporting triggers.

end transportable tablespace metadata export

Export terminated successfully without warnings.

SQL> host xcopy c:\oracle\product\10.1.0\oradata\SH\users01.dbf c:\oracle\product\10.1.0\oradata\CATDB\

C:\oracle\product\10.1.0\oradata\SH\USERS01.DBF

1 File(s) copied

SQL> conn sys@catdb as sysdba

Enter password:

Connected.

SQL> host imp TRANSPORT_TABLESPACE=Y FILE=e:\test.dmp LOG=t.log -

> DATAFILES=c:\oracle\product\10.1.0\oradata\CATDB\users01.dbf
Import: Release 10.1.0.2.0 - Production on Thu Jan 4 16:56:12 2007
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: sys@catdb as sysdbaPassword:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - ProductionWith the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.01.00 via conventional path

About to import transportable tablespace(s) metadata...

import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set.

importing SYS's objects into SYS.

importing SCOTT's objects into SCOTT. .

importing table "DEPT". .

importing table "EMP". .

importing table "BONUS". .

importing table "SALGRADE". .

importing table "SCOT".

importing SYS's objects into SYS

Import terminated successfully without warnings.

SQL> alter tablespace TEST read write;
Tablespace altered.

No comments: