Schema import with SSMS - wiltondb/wiltondb GitHub Wiki

On this page:

Prerequisites

  1. Install WiltonDB
  2. Setup TDS connection from SSMS
  3. Changing TDS port from 1433

AdventureWorks sample DB

We will use AdventureWorks sample database.

Follow the instructions to restore the AdventureWorks20xx.bak:

01

Export schema to SQL file

In SSMS right click the restored AdventureWorks20xx database and choose: "Tasks" -> "Generate Scripts ...":

02

Choose "Save as script file":

03

Press "Advanced" button and check the "Schema only" option is selected:

04

Run the export:

05

Resulting SQL file aw_schema.sql is written with size 1.12 MB.

Import schema into WiltonDB

In this example we assume that MSSQL is running locally on port 1433.

Install WiltonDB on the same machine, change its TDS port to 7433 and open the connection to it from SSMS:

09

Open "New Query" for WiltonDB connection, open aw_schema.sql and run it:

06

Multiple error messages are generated for schema details not supported in WiltonDB. In case of AdventureWorks ALTER DATABASE and other errors do not prevent the majority of the schema and T-SQL stored procedures to be imported. Running this step on a database schema for your applications it makes sense to inspect the errors carefully and adjust the schema SQL file where possible. Babelfish Compass tool can be used to generate the report for schema file and rewrite some of unsupported SQL statements.

Next: Data import with sqlcmd