How to Import a DDL Script into Redgate Data Modeler

Find out how to import an existing DDL script into the Redgate Data Modeler.

Guest post

This is a guest post from Redgate Data Modeler.

What if you have a DDL script (i.e. an SQL script that defines data structures) and you would like to visualise it by creating a model of the database? This can be done in Redgate Data Modeler by importing the SQL script.

Open your model. Click on the model name in the upper-left corner.

Import a DDL Script into Redgate Data Modeler

Click Import and Import from SQL.

Import a DDL Script into Redgate Data Modeler

A new window will appear. Click Browse to add a file from your computer.

Import a DDL Script into Redgate Data Modeler

You can choose to add the imported objects to the current model or to overwrite the existing model.

Import a DDL Script into Redgate Data Modeler

Once the file is uploaded, you can verify the DDL script and optionally modify it. Alternatively, you can copy and paste the SQL script instead of uploading it from your computer. When you’re ready, click Parse & import.

Import a DDL Script into Redgate Data Modeler

You’ll see a window informing you that the import has finished. The imported model will be visible in the diagram area.

Import a DDL Script into Redgate Data Modeler

Alternatively, you can import the XML file while creating a new document.

Open your drive. On the top menu bar, click this icon to create a new document.

Import a DDL Script into Redgate Data Modeler

A new window will appear. Click the Create button next to Physical data model.

Import a DDL Script into Redgate Data Modeler

Type the model’s name and choose a database engine.

Import a DDL Script into Redgate Data Modeler

Scroll down to the Content section and choose From SQL.

Import a DDL Script into Redgate Data Modeler

Click Browse to choose a file from your computer.

Import a DDL Script into Redgate Data Modeler

After choosing the file, click Import SQL.

Import a DDL Script into Redgate Data Modeler

Click Start modeling. You should see the imported model in the diagram area.

Import a DDL Script into Redgate Data Modeler

Tools in this post

Redgate Data Modeler

Design, update, and manage database schemas

Find out more