Copy Object from one database to another database

What is the easiest way to copy a object from one database/schema to another database/schema?

I am particulary interested in copying a view from one schema to another schema in Oracle.

0

Hello. Do you mean just create a view in another schema?

1. First copy DDL from object (the Oracle view) context menu -> Copy DDL action.

2. Then use this DDL to create the view in target schema.

Now, if you also want to copy data from some table you can

1. Import data from the context menu of desired table -> Save to File -> SQL Insert Statements to generate the script.

2. Use this script on a target schema and table to populate it.

0
Avatar
Permanently deleted user

Where do I find the Copy DDL option?

0
Avatar
Permanently deleted user

Thanks, but I am unable to see this menu option.

It seems it's not enabled when I am on an Oracle Database, while it's enabled on a MySQL.

0

Do you see other Dababase objects in Project Tree but not Oracle table views? It shows view for me:
2015-08-26_19-54-08.png

But, actually there is a bug that IDE does not copy DDL for views correctly - https://youtrack.jetbrains.com/issue/DBE-195 .

0
Avatar
Permanently deleted user

After the last update, the option is present.

Case closed.

0

Thanks for informaiton!

0

请先登录再写评论。