Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Accessing Data
 How to: Deploy SQL Server Project I...
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Data Access in Client and Middle-Tier Programming 
How to: Deploy SQL Server Project Items to a SQL Server 

After you build a SQL Server project, it is compiled into an assembly that can then be deployed to the database.

NoteNote

The common language runtime (CLR) integration feature is turned off by default in Microsoft SQL Server and must be enabled in order to use SQL Server project items. To enable CLR integration, use the clr enabled option of the sp_configure stored procedure. From more information, see Enabling CLR Integration.

NoteTip

As an alternative to building, deploying, and debugging in three separate steps, you can use the Start command (F5) to build the assembly, deploy it to the database, and debug the database object. Select the Start Without Debugging command (CTRL+F5) to build the assembly and deploy it to the database.

To deploy items in a SQL Server project to a SQL Server

  1. Build the project by selecting Build <project name> from the Build menu.

    NoteNote

    Resolve all build errors prior to deploying.

  2. Select Deploy <project name> from the Build menu.

    NoteNote

    If you receive a message informing you that the project cannot be deployed, then you may need to manually create the assembly on the server. This error is typically the result of referenced assemblies in your project. For more information on manually deploying your assembly, see the Create Assembly page in the "SQL Books Online."

Next Steps

After deploying SQL Server project items to the database, you will likely want to run the item to test it.

To test a deployed database item

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker