Previous Topic Next topic Print topic


SQL Server Database Project Template

The SQL Server Database Project template enables you to create SQL CLR stored procedures that you can deploy and publish to SQL Server 2008 R2 or later. When publishing to SQL Server 2012 or later, you can use any version of the .NET Framework, including the most recent. With this template, Visual Studio generates two projects in a single solution:

COBOL Project
From this project, you can access user interface features that enable you to create SQL CLR stored procedures, including the following options available from the Project menu and also from the project's context menu:
  • Add User-Defined Function
  • Add Stored Procedure
  • Add Aggregate
  • Add Trigger
  • Add User-Defined Type
  • Add Script
  • Add Stored Procedure Definition
Each of the following COBOL program templates is generated automatically and added to your project when you add a SQL CLR object. Each template includes all of the mandatory code required for its respective SQL CLR object type:
  • Function1.cbl
  • StoredProcedure1.cbl
  • Aggregate1.cbl
  • Trigger1.cbl
  • Type1.cbl
.Publish Project
This project is the mechanism used to deploy to your SQL Server database. It includes a reference to the COBOL project contained within the same solution. When you publish this project, it also deploys everything defined in the referenced COBOL project.
Project objects:
  • script.COBOL.RuntimeInstall.sql - an SQL script that installs the COBOL runtime as part of the deployment and publishing process.
  • script.COBOL.RuntimeInstall_ADO.sql - an SQL script that installs the ADO.NET runtime as part of the deployment and publishing process.
  • script.COBOL.RuntimeUninstall.sql - an SQL script that uninstalls the COBOL runtime when the deployment and publishing processes have completed.
  • COBOL project reference - a reference to the COBOL project contained in the same solution.
Previous Topic Next topic Print topic