Developing and Deploying SQL Sever Apps on Windows Integrity

13 of 39
T-SQL Trigger
The following example shows step-by-step how to deploy a T-SQL Trigger from a Windows
Client to Integrity Server with a single Click. The same procedure can be used for any T-SQL
application development and deployment on Integrity Server.
1. To Launch Visual Studio SQL Server Projects, on the taskbar, click Start, point
to All Programs, then Microsoft Visual Studio 2005, then Microsoft Visual
Studio 2005. From Visual Studio select the File menu, select New, then
Project.
2. Select Database Projects, then Microsoft SQL Server, then SQL Server 2005
template. Choose the name and the location of the project. Click OK.
3. In solution explorer, you see the Pre- and post-deployment scripts which can be
altered as required for the deployment scenario.
4. Right-click on the Project, select Add, then New item. From Programmability
select database Trigger template. Select the Trigger Name.
5. Also make sure that Project’s Tools menu, Options, Database Connections and
Design-Time Validation Database are properly chosen. For design time
validation the project may require a local database. For default choose blank.
6. From Solution Explorer right-click, Select Properties, and choose Build. Select
the database Adventure Works on Integrity Server.