Reputation: 1003
I'm using TOAD for oracle for managing Oracle database, I want to copy one procedure package from one database to another. Is there some simple way to do that like copy-paste?
Thanks
Upvotes: 1
Views: 8538
Reputation: 1020
The simple option is to use "Create in another schema" option available in TOAD. Follow below steps: (There are two databases DB1 and DB2. Say you want to create the procedure in DB1 into another database DB2.)
Your job is done. Did I make it any simpler?
Upvotes: 2
Reputation: 12572
Using Schema Browser, you can reach the source code of the package if you are priviliged to do so. After that point forward, its up to you to do whatever you want with it.
If these two databases you are talking about are actually two schemas, I would advise not to re-create the package, but to grant it to the other schema.
EDIT: More explanation on packages.
Basiically speaking, an Oracle package includes two objects; a package
and a package body
. package
is where the methods of your package that are public and visible to the users are. package body
is where you actually implement the procedures.
So when moving a package somewhere else, you need to create these two objects. Toad, has a way to show you the scripts of these objects, using the schema browser. Find the source, copy both scripts and run them on your target.
Upvotes: 0