Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Transportable tablespace doubts
"Tho Nguyen" <tho_pic_at_yahoo.com> wrote in message
news:d177c6d9.0410181407.2c6091d2_at_posting.google.com...
> Hi folks,
>
> I am familiar with exp/imp but never try transportable tablespace
> option before. I hope you guys may help to clear my doubts.
> Let's say I have tablespace A_1, that is self-contained. In that
> tablespace, I have data, indexes, etc of schema X. Now I tranfer that
> one to another database, so will Oracle create user X in the target
> database?
> I wish I could test it now but I can't.
> Thanks a bunch.
Hi,
The steps for transporting a tablespace are as follows:
Check that the target tablespaces in the source database are self-contained.
1.. Switch the target tablespaces to read-only mode. 2.. Export the metadata for the target tablespaces. 3.. Copy the underlying data files of the target tablespaces and theexport file from the source database to the destination database. 4.. Import the metadata for the target tablespaces into the destination database.
-- Hope this helps! oraclehelp_at_dbdomain.cc The Database Domain (http://www.dbdomain.com) Online and CD Training for Oracle DBAs Oracle Certification Training (OCA and OCP) ------------- To transport a tablespace, you must copy the data files from the source to the destination database along with the metadata (data dictionary) information about the tablespace. To collect the necessary metadata about a tablespace or set of tablespaces, use the Export utility with the following command-line parameters : The TRANSPORT_TABLESPACE parameter indicates that you want to export the metadata that corresponds to the tablespaces listed by the TABLESPACES parameter. You should also specify other standard Export command-line parameters (for example, FILE, GRANTS) or indicate them in a parameter file. For example: EXP TRANSPORT_TABLESPACE=Y TABLESPACES=(PRACTICE) TRIGGERS=Y CONSTRAINTS=Y GRANTS=Y FILE=c:\temp\exportts.dmp After you copy and locate the data files of a transportable database in the destination database's directory structure, plug the tablespace into the destination database's data dictionary using the Import utility with the command-line parameters listed below. a.. The TRANSPORT_TABLESPACE parameter indicates that you want to import the metadata for the tablespaces listed by the TABLESPACES parameter into the destination database's data dictionary. b.. The DATAFILES parameter indicates the locations of the data files for the target tablespaces in the destination database. c.. The TTS_OWNERS parameter lists all schemas that contain data in the tablespaces being transported - if you specify this parameter and do not list all necessary schemas, Import aborts the import with errors. d.. You can also use the FROMUSER and TOUSER parameters to transfer the ownership of data during the import. You should also specify other standard Import command-line parameters (for example, FILE) or indicate them in a parameter file. For example: IMP TRANSPORT_TABLESPACE=Y TABLESPACES=(PRACTICE) DATAFILES=(c:\oracle\oradata\oracle\practice01.dbf) TTS_OWNERS=(M117) FILE=c:\temp\exportts.dmp Once you transport a tablespace from one database to another, the tablespace in the destination database is in read-only mode. If you desire, you can now switch the tablespace to read-write mode.Received on Mon Oct 18 2004 - 19:01:53 CDT