Exercise 7: Generating and deploying an SQL script

This exercise teaches you how to generate and deploy SQL scripts to represent the mapping .

Before you begin this exercise, you must complete Exercise 6: Saving a mapping model.

To generate an SQL script based on the mapping model:

After you have a mapping model in the Data Project Explorer, follow these steps to generate an SQL script that you can then deploy back to the server.
  1. Right-click myfirstmapping.msl mapping model and select Generate Script.
  2. In the Generate Script wizard, the Deployment platform field is pre-filled with a valid dbm file. Use the drop-down menu to select another valid deployment platform.
  3. In the Query language group, specify SQL as the Query language.
  4. In the Query type group, specify Create a Select statement as the Query type.
  5. In the Script name field specify myfirstscript.sql as the name.
  6. Click Next.
  7. On the Summary page, you can view the generated script, then click Finish.
You now have an SQL script that is generated from the mapping model. It is in the SQL Scripts folder. You can deploy or run your script by performing the following steps:
  1. Expand the SQL Scripts folder.
  2. Right-click on myfirstscript.sql and select Run SQL.
  3. Select an appropriate connection.
  4. Click Finish.

Finish this tutorial by reviewing the materials in the summary.