Home > SQL Developer Concepts and ... > Deploying Objects Using the...
The Cart is a convenient tool for deploying Oracle Database objects from one or more database connections to a destination connection. You drag and drop objects from the Connections navigator into the Cart window (or you can open a previously saved cart XML file), specify any desired options, and click the Deploy icon to display the Deploy Objects dialog box. After you complete the information in that dialog box, SQL Developer creates a .zip file containing scripts (including a master script) that can be used to create the objects in the schema of a desired destination connection.
Before you use the Cart, ensure that the Database: Utilities: Cart and Database: Utilities: Cart: Cart Deploy preferences reflect what you want.
To display the Cart window, click View, then Cart. The following figure shows that window after some objects have been added.
Deploy Cloud icon (Deploy to the Oracle Cloud; active if one or more objects are included): After you have added the objects to be deployed and specified any desired options, click this icon to display the Deploy Objects to Cloud dialog box, where you can specify further options and deploy the objects to the Oracle Cloud.
Deploy icon (Create a deployment file; active if one or more objects are included): After you have added the objects to be deployed and specified any desired options, click this icon to display the Deploy Objects dialog box, where you can specify further options and generate the deployment scripts and a .zip file that contains them.
Open Cart icon: Lets you open a saved cart by specifying the XML file with the cart contents. If the cart currently contains any objects, you are asked if you want to remove the current objects from the cart before opening a saved cart:
Yes empties the current cart, and fills the cart with the objects from the cart you are opening.
No does not empty the current cart, but adds the objects from the cart you are opening to the current cart objects.
Save Cart icon (active if one of more objects are selected): Displays the Save Cart dialog box, where you specify the File (an XML file) and the Encoding. You can later open the saved cart.
Selected Objects: Contains objects that have been selected for potential deployment. To add objects, select them in the Connections navigator and drag and drop them into the Selected Objects area.
Delete Row icon (red X): Lets you delete selected objects from the Selected Objects area.
Include: Lets you select and deselect all objects or selected objects for inclusion in the deployment.
Type: Type of database object.
Owner: Owner of the database object.
Name: Name of the database object.
Data: For tables and views, lets you include or exclude the associated data for the deployment.
Where: Optional WHERE clause (without the WHERE keyword) to filter the data rows from a table or view.
Connection: Connection from which the object was selected.
Arrow buttons: Let you move objects up or down in the order of Selected Objects. This affects the order in which objects are created in the generated scripts.
Before Script: Optionally specify a .sql script to be executed first in the generated master deployment script (before the other generated scripts).
After Script: Optionally specify a .sql script to be executed last in the generated master deployment script (after the other generated scripts).
The default location for Before Script and After Script is the Open Script Directory preference under the Database: Utilities: Cart user preferences.
The Cart and the Database Export (Unload Database Objects and Data) wizard enable you to perform the same basic operations. A suggested guideline for choosing which one to use is repeatability of the deployment/export operation:
If you want to be able to repeat the operation (with or without slight modifications), the Cart provides a convenient way to save a cart and to deploy it, and then run the scripts in multiple destinations (schemas in the same database or another database). You can also open a saved cart, modify it as needed, save it to a different cart name, and deploy that cart.
If you will not need to repeat a specific export operation, the wizard provides a convenient interface for such one-time actions.