I recently talked about how to load up your Oracle Cloud service with your local data.
In that scenario, you’re in the graphical user interface, clicking buttons, doing things more ad-hoc.
But what if you wanted to build an automated process to load up data from an on-premise Oracle Database? You won’t have a GUI available then, so what’s available?
Enter the SQL Developer command-line interface, also known as SDCLI.
In the SQLDEVELOPER/BIN Directory
Here is where you will find the command-line interface program. I’m in Windows, obviously, but this is the same principle for a Mac or *NIX box.
Some more info on the CART command:
We’re very nice and even give you some examples 🙂
Here’s ultimately what I’m going to run:
But before you jump into your cmd/shell, you’ll need to setup your parameters file first, IN the GUI.
First Things First
You’ll need your Cloud connection defined.
And then you’ll need your Cart.
Once the Cart is setup, hit the ‘Cloud’ button.
Hit the ‘save’ button to create the deployment XML file that you’ll reference in the command-line run.
Once it runs, you’ll see your ‘Deployment’ show up in the connection tree as normal. Wait a few minutes, and your request will be approved and processed. Which mean, your data will now be available to your cloud applications.
If you do run this multiple times, you’ll need to change the name of the ZIP file that’s being created, or build into your script to delete the ZIP file before the Cart runs.
Also, if you start-up SQL Developer, define your Cloud connection, and then try to run the Cart via the command-line, you may get a connection error. We’re not writing out the connection to file until you close SQL Developer – so it’s not available to SDCLI yet. We’ve got that fixed for version 4.1 though.