[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
You can include SQL Server database scripts when you want to include a SQL Server database in a Web package. You can also set the order that the scripts are executed when the database is recreated on the server when the Web package is deployed. For more information about including a database together with a Web package, see Deploying Databases with Web Application Projects Overview.
Adding a SQL Server Script to a Web Package
The SQL scripts run in the order that you set when you specify the scripts in the Publish - SQL tab of the Properties page.
Adding a database script to a Web package
In Solution Explorer, double-click Properties.
On the Properties page, select the Publish - SQL tab.
If you have already included a database to the Web package, select the Connection Name you entered previously. If you have not included a database in the Web package, click Add Data Connection and enter the database connection information. For more information about how to add a database, see Walkthrough: Deploying a Database with a Web Package.
In the Source Scripts section, click Add Script.
From the Select File dialog box, select a script to add and click Open. You can add scripts by repeating steps 4 and 5.
You can use the arrow buttons on the right of the Source Scripts table to change the order of when the scripts run. Select a script from the table and click the up or down arrows to move the script file higher or lower in the order.
If you do not want to include a script, clear the Include check box for that script.
From the File menu, select Save All to save the scripts information.
Concepts