Using Oracle SQL Developer Database Cart for Cross-Environment DDL Deployment
Guide to generating and deploying schema DDL between environments using SQL Developer Database Cart, with verification steps and release-specific cautions.
23 Feb 2026, 21:48 UTC

The Problem of Cross-Environment Schema Deployment
Many database practitioners need to move a table definition from a development schema to a production environment. Writing the CREATE TABLE statement by hand is error-prone especially when constraints, indexes, and grants must travel along with it. Some reach for SQL*Plus scripts or export utilities, but Oracle SQL Developer offers a built-in visual tool the Database Cart. This feature lets you collect schema objects from a live connection, review their inclusion, and generate a single DDL script ready for deployment. The useful takeaway is that the Cart streamlines the generation of cross-environment DDL, but its release-specific export options and the need for post-deployment verification mean you still have to check the output before running it against a target schema.
The Database Cart appears as a dockable panel in SQL Developer. You drag tables, views, procedures, or other objects from a connections object browser into the cart. The cart's contents persist for the current session; they are not saved between separate SQL Developer launches unless you export the cart state externally. When you right-click the cart and choose Export, a dialog appears with checkboxes for generating DDL and for including dependent objects. The exact labels and available options vary between SQL Developer major releases; for example, the Include dependent objects section may be labeled differently in 21.x versus 23.x. This makes it important to verify the dialog in your installed version before relying on default settings.
The Cart does not unload table data by default. If you need to move data as well, a separate export such as CSV generation or an Oracle Data Pump operation is required. This division of concerns—schema definition versus data movement—is a common source of confusion, so keeping the Cart's scope limited to DDL helps avoid unexpected side effects.
Prerequisites You'll Need
- Oracle SQL Developer 21.4, 22.x, or 23.x installed and running.
- A saved database connection with sufficient privileges to read the source schema and later write to the target schema.
- Access to a target schema where the generated DDL will be executed. The target schema must have CREATE TABLE, CREATE INDEX, and relevant grant-granting privileges, or you must run the script as a privileged user.
- Familiarity with the SQL Developer interface; the Cart panel is typically found under the View menu then Database Cart.
Generating DDL – A Focused Procedure
- Connect to your source schema in the SQL Developer Connections navigator.
- Expand the schema node, locate the objects you want to deploy—for example, a table named orders.
- Drag the orders table into the Database Cart panel. You may drag multiple objects; the cart will hold them in the order you add them, and you can reorder or remove items before export.
- With the cart populated, open the export dialog by clicking the Export button or right-selecting Export DDL.
- In the dialog, review the Include dependent objects options. Depending on your release, you may see checkboxes for constraints, indexes, grants, and synonyms. Select the ones relevant to your deployment goal. If you only need the table definition, you can leave these unchecked, but be aware that missing dependent objects may cause deployment errors later.
- Click Generate. SQL Developer produces a script in a new editor tab. The script begins with a CREATE TABLE statement and, if you selected dependent-object inclusion, follows with CREATE INDEX, ALTER TABLE ADD CONSTRAINT, and GRANT statements.
- Inspect the generated script. Look for CREATE TABLE, any dependent clauses, and the schema name used in the statements. The script will reference the source schema name unless you manually replace it.
Checking the Generated Script
Before executing the script, run a quick validation:
- Confirm that the CREATE TABLE clause matches the source table's column definitions, data types, and constraints.
- If dependent objects were included, scan the INDEX and CONSTRAINT sections for completeness. The Cart's DDL is not guaranteed to capture every public synonym or package body; a manual review is the safest approach.
- Check that the schema name in the script is not hard-coded to the source environment. If it is, replace it with the target schema name before deployment.
Deploying to a Target Schema
- Open the generated script in a SQL Worksheet tab.
- Verify the connection dropdown at the top of the worksheet points to your target schema (or log in as a user with rights to create objects in that schema).
- Press F5 (or click Run Script) to execute the DDL.
- After execution, query the target schema to confirm the object exists with the expected status:
SELECT object_name object_type status FROM user_objects WHERE object_name = 'ORDERS';If you included dependent objects, repeat the query for indexes and constraints:
SELECT index_name table_name FROM user_indexes WHERE table_name = 'ORDERS';
SELECT constraint_name constraint_type FROM user_constraints WHERE table_name = 'ORDERS';Known Limitations Verification
- Menu paths and checkbox labels differ across SQL Developer major releases. Always open the Export dialog in your installed version to confirm exact wording.
- The generated script may omit synonyms, package bodies, or public synonyms. Review the output against the source schema using ALL_SOURCE or a schema-diff tool.
- Running the script in the wrong schema can overwrite existing objects. Before pressing F5, double-check the connection identifier and the schema name referenced in the script.
- The Cart exports only schema definitions. Table rows remain in the source schema; plan a separate Data Pump or export routine if data migration is required.
Recovery After Execution
Executing the generated DDL changes the state of the target schema—new objects are created, existing ones may be altered or replaced. If you discover after execution that the deployed definition is incomplete or incorrect, you can reverse the change by dropping the object:
DROP TABLE target_schema object_name;For a more robust recovery strategy, keep the original script under version control (Git, SVN) before execution so you can re-run a known-good version or compare changes with a diff tool. The Cart itself does not provide an undo mechanism, so treating the generated script as a deployable artifact that should be vetted beforehand is the recommended practice.
Practical Verification Checklist
- [ ] Source schema connection is active in SQL Developer.
- [ ] Desired objects are dragged into the Cart and ordered as needed.
- [ ] Export dialog options match the intended deployment constraints, indexes, grants.
- [ ] Generated script is inspected for CREATE TABLE structure and dependent-object clauses.
- [ ] Script connection is switched to the target schema; schema names are corrected if hard-coded.
- [ ] Script executes without errors in the SQL Worksheet.
- [ ] USER_OBJECTS query confirms the new object appears with VALID status.
- [ ] Dependent objects, indexes, and constraints are present and correctly defined.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.