简体   繁体   中英

Scripting Oracle database : all objects from selected schemas

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM