Let’s say you have some objects you need to quickly create somewhere else. And you want to it such that it can be scripted/scheduled.
I am using the Cart right now to build out a demo environment for folks that want to show off some SQL Developer features. For instance, I’m building a ‘shopping list’ to cover things such as:
- Spatial data
- 12c Scheduler Chains
- BLOB viewer
- Partitioned data – enough rows to make queries interesting
I can add additional scripts. I can have:
- A Pre-Script – runs first to setup the environment
- For each object
- A Before create script
- An After create script
- A Before populate/insert script
- An After populate/insert script
- A Post-Script – runs after everything else has finished
When I click the ‘Export’ cart toolbar button – I end up with something that looks like this:
You don’t have to grab everything in your tables
You can generate JUST the DDL or JUST the data. And if it’s the data, you can use WHERE clauses to filter out the records you don’t need. If you’re going to build out the scripts such that they will put the data/objects in the connected user, make sure to toggle OFF the ‘schema’ option in the EXPORT dialog. This will prevent the CREATE or REPLACE & INSERTS from including the original object schema(s).
Tip/Trick: When Dealing with BLOBs and SPATIAL Data…
Use the SQL*Loader export format. Simple INSERTs won’t cut it here.