Previous Topic Next topic Print topic


SQL Server Database Project Template

Enterprise Developer provides the SQL Server Database Project template to accommodate SQL CLR integration. It enables you to create SQL CLR stored procedures in or add them to your Enterprise Developer project. You can deploy and publish your stored procedures to SQL Server 2008 R2 using the .NET Framework 3.5 or earlier, and to SQL Server 2012 and later using any version of the .NET Framework, including the most recent.

With this template, Visual Studio generates two projects in a single solution:

COBOL Managed 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 managed 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 managed project added when you created the solution.
Previous Topic Next topic Print topic