0

Currently we are using Oracle SQL Developer for scripting all objects from selected schemas. But this is very uncomfortable solution, since we should select schema, search for all objects, select all objects and move all selected objects to the list. And each step is time expensive. And repeat it 12 times (12 shcemas should be exported).

Is it possible to improove export dialog through Oracle SQL Developer plugins? Or may by the better way is to use shell/command prompt utilty for scripting Oracle DB... Which utility to use?

3
  • 2
    What is the export for? Can you use expdp instead? Or if you are only getting the object definitions, automatically generate dbms_metadata calls yourself - which is what happens under the hood anyway. You could also look at the data modeller as that can generate DDL, but I'm not very familiar with it. Depends what you're actually doing though, and why... Commented Mar 5, 2014 at 8:11
  • @AlexPoole : exdp could be a solution I will check it. Thank you. This is for Oracle db migration to SQL Server project. And since there is parallel development of current Oracle solution we are diong Meta/DDL snapshots regularly at the start of each iteration. Commented Mar 5, 2014 at 8:18
  • 1
    Yes, normal way to do this would be to write a batch script to create the schemas you require and expdp/impdp the database objects and data. Either that or create a build script with database objects and insert scripts which you will probably need at some point anyway Commented Apr 11, 2014 at 13:20

1 Answer 1

1

Use SQLcl!

Write some javascript, take advantage of built in SPOOL and DDL commands. Much faster than using our GUIs.

Example here (from Kris) - and it actually goes through ALL_OBJECTS https://gist.github.com/krisrice/de6f694b5241682059968bd5beadbcf7

SQLcl uses the same code base as SQL Developer, but it's a command line interface and it offers client side scripting so you can do things like loop through a set of objects and interact with the OS.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.