0

I am very new to dba tasks. I can export PL/SQL packages, functions, procedures from one database to another with expdp and impdp. But I need to export these objects(functions, procedures) by Transporting the tablespace(TTS) . I searched in different threads but didn't get any help. I heard there is a way of exporting packages through TTS (even though I read in many forums that "packages cannot be exported through TTS" ). But how? I already tried TTS but packages were not exported,only tables were exported.

Ayam
  • 43
  • 7
  • Why is a package different from any other object type? Have you tried it? – OldProgrammer May 30 '14 at 16:31
  • Which version are you using? – Joseph B May 30 '14 at 16:34
  • @OldProgrammer As I have understood, Packages depend on System Tablespace as well and System tablespace cannot be transported. But I heard there is a way. – Ayam May 30 '14 at 16:42
  • @Joseph I am using 11g.. – Ayam May 30 '14 at 16:42
  • Why have you decided that you need to use one particular tool (transportable tablespaces) to accomplish a task rather than another, seemingly much more logical tool (expdp) that you know correctly accomplishes the task? Particularly when using transportable tablespaces requires a metadata export anyway. – Justin Cave May 30 '14 at 17:45
  • @JustinCave I have to transfer GBs of info from the server, so I have decided to use TTS. – Ayam Jun 01 '14 at 05:16
  • Which is great for transferring data. Why not use an export to transfer code? Particularly when you need a metadata export to transport the tablespace. Why do you need to use transportable tablespaces to transfer the code? – Justin Cave Jun 01 '14 at 05:34
  • @JustinCave I think it's fast and efficient if I exported all objects (tables , procedures, packages, etc) through TTS. The next reason is I want to learn how to export packages through TTS as I am new to Database Administration. – Ayam Jun 01 '14 at 17:05

1 Answers1

0

If you have Oracle 10 g or later, then you can use the INCLUDE parameter of the Data Pump to export packages, as below:

expdp system/password@db10g directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log INCLUDE=PACKAGE

References:

Oracle Data Pump (expdp and impdp) in Oracle Database 10g on ORACLE-BASE

Parameters Available in Export's Command-Line Mode on Oracle® Database Utilities

Joseph B
  • 5,519
  • 1
  • 15
  • 19