Using the Cart

The Cart is a convenient tool for collecting Oracle Database objects from one or more database connections, and deploying, exporting, comparing, or copying those objects. You can put objects into one or more carts, each with its own tab. When the Cart window is opened, it contains an empty cart, although you can create new carts and open previously saved carts in new or existing cart tabs.

For each of the Cart database utilities (Export, Diff [compare], Copy), you can create, save, and open utility-specific configuration settings.

Objects in the Cart are not automatically synchronized with database activity; to update the contents of the cart with the current state of the database, click the Refresh icon. If an object does not exist after a refresh, the object is disabled in the Cart and is underlined to indicate the error.

You can put database objects into a cart tab in several ways:

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 in the default cart tab.

SQL Developer Cart window (described in surrounding text)

New Cart icon: Opens a new empty cart tab. For this and any other card tab, you can right-click the tab name and select from the following:

Open Cart icon: Displays a dialog box where you specify:

Save Cart, Save As Cart, Save All Carts icons (active if one of more objects are selected): Displays a dialog box for saving the current cart or all carts to an XML file that you can later open. Specify:

For Save All Carts, the dialog box is displayed repeatedly, once for each currently open cart tab.

Refresh Cart (active if one of mor% objects are selected): Refreshes the current cart tab; validates that what is in the cart is actually in the database.

Deploy Cloud (Deploy to the Oracle Cloud; active if one or more objects are included in the selected cart): 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.

Export (Create a deployment file; active if one or more objects are included in the selected cart): After you have added the objects to be deployed and specified any desired options, click this icon to display the Export Objects dialog box, where you can specify further options and generate the deployment scripts and optionally a .zip file that contains them.

Database Diff: Displays the Diff Objects dialog box, for comparing the selected objects with the objects in another currently open cart tab or a database connection that has access to the destination objects to be compared.

Copy: Displays the Copy Objects dialog box, for copying the selected objects to a database connection.

Selected Objects: Contains objects that have been selected for inclusion in each open cart.

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 a Cart operation.

Type: Type of database object.

Owner: Owner of the database object.

Name: Name of the database object.

DDL: Lets you include or exclude the DDL (Data Definition Language) statements for a Cart operation.

Data: For tables and views, lets you include or exclude the associated data for a Cart operation.

Where: Optional WHERE clause (without the WHERE keyword) to filter the data rows from a table or view.

Scripts (applies to Deploy to Cloud, Export, and Copy): Lets you optionally include one or more .sql scripts to be executed at specified locations in the generated master script. For each object, you can click the pencil icon in the Scripts cell; this displays a dialog box to specify the file and character set encoding for any combination of the following:

The default location for these scripts is the Open Script Directory preference under the Database: Utilities: Cart user preferences.

Connection: Connection from which the object was added. You can click the pencil icon in a Connection cell to display the Map Connection dialog box, where you can change the Connection value for one or more objects in the currently selected cart.

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.

Cart Versus Database Export Wizard

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: