# Offline DDL Export

Export database object DDL to local files for offline work and comparison.

Source: https://www.nexosqlstudio.com/docs/offline-ddl
Language: en
Type: docs

# Offline DDL Export (Pro)

## Database support

Database support does not imply identical features. Connections and SQL worksheets are the starting point; editing, DDL, modeling, transfers, administration and AI operations depend on the engine and workflow. Check the installed version and the relevant guide before relying on an advanced operation.

[Supported databases and feature availability](https://www.nexosqlstudio.com/databases) · [Connection guides](https://www.nexosqlstudio.com/docs/getting-started)

Offline DDL Export is a Pro feature. It generates local `.sql` files containing the DDL for your Oracle database objects. This lets Pro users compare schema definitions, generate offline projects, and use project-wide language intelligence without a live database connection. Free users can still open and edit the resulting files and use snippets, but Nexo offline autocomplete and validation remain disabled.

## Exporting DDL

1. Right-click your connection in the Connections Explorer.
2. Choose **Update offline workspace** for a new local snapshot or updating an existing one.
3. Select the target folder in your workspace.
4. Choose object types to export (Tables, Views, Packages, etc.).
5. Click **Export**. Files are written to the chosen folder.

The exported structure mirrors the Oracle object hierarchy:

```
ddl/
  tables/
    EMPLOYEES.sql
    DEPARTMENTS.sql
  packages/
    HR_UTILS.pks
    HR_UTILS.pkb
  views/
    EMP_DETAILS_VIEW.sql
```

## Refreshing the Snapshot

When your database changes, refresh the export:

- Right-click the export folder → **Refresh DDL Snapshot**, or
- Run the command **Nexo SQL Studio: Refresh DDL Snapshot** from the palette.

Only changed objects are re-exported (incremental refresh).

## Symbol Search Without a Connection (Pro)

Once DDL files are present in the workspace, Pro can build the extension's symbol index from files so autocompletion, go-to-definition, hover, validation, and offline project workflows work without a database connection.

Configure the search paths in your workspace settings:

```json
"nexo-sql-studio.searchPaths": [
  "ddl/**",
  "packages/**"
]
```

## Comparison Workflow

With Pro, use the local DDL snapshot to:

- Compare generated object definitions between environments
- Navigate packages, procedures, functions, types, tables, and views while offline
- Feed completions, hover, and go-to-definition from local files

## Sanitisation

Nexo SQL Studio sanitises exported DDL to ensure it is idempotent and safe to re-apply:

- `CREATE OR REPLACE` used where appropriate
- Passwords and sensitive data stripped from exported objects
- Dependent object order calculated automatically where supported


