0

I have schema1 and schema2. Schema1 contains: tables(tables contains identity sequence), views, packages, procedures, functions, sequences and triggers. Schema2 is empty.

I want to create all objects from schema1 to schema2.

How I can achieve that?

Goku
  • 441
  • 5
  • 20
  • look here https://oracle-base.com/articles/9i/dbms_metadata – OldProgrammer Jan 06 '22 at 21:19
  • @OldProgrammer Thanks, I cannot use dbms_metadata in SQL Developer, right? – Goku Jan 06 '22 at 21:26
  • _" tables(tables contains identity)"_ No. Tables contain "data". What that data is or what it represents in the real world or what it means to your business is irrelevant. – EdStevens Jan 06 '22 at 21:46
  • @EdStevens, sorry I mean identity sequence, because when I use, for instance, `create table as select` identity sequence is missed – Goku Jan 06 '22 at 21:53
  • 1
    Does this answer your question? [how to export schema and import it to another schema in PL\SQL Developer](https://stackoverflow.com/questions/67368681/how-to-export-schema-and-import-it-to-another-schema-in-pl-sql-developer). Or [How to generate entire DDL of an Oracle schema (scriptable)?](https://stackoverflow.com/questions/10886450/how-to-generate-entire-ddl-of-an-oracle-schema-scriptable). Or even in [2Day DBA](https://docs.oracle.com/cd/E17781_01/server.112/e18804/impexp.htm#ADMQS256) for old 11g Express Edition – astentx Jan 06 '22 at 22:19
  • 1
    Ok, understood about the identity column. As for _"I cannot use dbms_metadata in SQL Developer, right?"_, ---- wrong. The command is passed to the database from the client, is processed by the database, and the result passed back to the client. Doesn't matter if the client is sqlplus, SQL Developer, PL/SQL Developer, or any other general purpose client. Demos are usually done in sqlplus because everyone should it, but that does not mean that the described procedure is somehow bound to sqlplus. The best way to answer 'will it work' questions is to try it. – EdStevens Jan 07 '22 at 00:56

0 Answers0