|
|
|
Re: copying table script from one database to another in TOAD [message #12967 is a reply to message #12964] |
Mon, 14 June 2004 21:25 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Do you want the table layout, the data or both? Do you need triggers to be included too?
In any of the above cases
is exp and imp, Oracle's export and import utilities, the easiest path.
In Toad the Export utility wizard is available if you have the DBA option.
If you're just looking for table layout and data, you could consider a simple 'Create table as select' statement. Grant access from the destination schema, to the source schema and perform from the destination schema something like:CREATE TABLE <I>new_table_name</I>
AS
SELECT *
FROM <I>source_user.old_table_name@source_database</I>
You could also create a script via Toad, and export the data as insert statements to another scripts. In the destination database you simply run both and there you are.
As you see, several possibilities are provided for your convinience. A lot depends on what you're looking for: one table or more? triggers too? data? all data or just a small sample? grants? only data perhaps?
And then there's the issue of the Toad version you're using. Most possibilities are basic, but some might be missing in the freeware version.
Good luck!
MHE
|
|
|