Competition: What’s your favorite Redgate tool? Enter now.

How to include CLR in test and deploy

EdmundEdmund Posts: 11
edited July 16, 2012 10:18AM in SQL Connect
Hello RedGate,

I'm not certain which tool to place this under but this location seems reasonable.

We have recently purchased a set of SQL Developer Bundle licenses and are exploring including some CLR aggregates (maybe some other types) in the project. As we know the CLR binary (or binaries) will need to be deployed to the server and registered in the SQL Server in order for SQL Server to be aware of them. We are not certain how to set this up with the RedGate tools. We use SSMS for SQL development.

Do we use SQL Connect to create a RedGate Database project in VS and add the CLR project as a dependency to that project? How will this be handled with CI. The CLRs would need to be built and registered before the SQL object changes are deployed and SQL test run. Similarly when deploying to production.

We are not keen on adding a manual step to the CI or deployment. We would not want to manually build and register the CLR on the dev, uat, or production database before deploying the SQL updates. We are hoping that the SQL Developer Bundle can handle this in an automated fashion.

How do should we setup CLR objects for development and CI usage with the SQL Developer Bundle? Also, we use one SQL dev server with multiple dev databases.

Thank you,



  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I'm afraid I don't know enough about your deployment process to answer this, but as far as SQL Connect goes, it deals with objects that have already been created in the database, scripting them and sending them onward to the source control provider.

    I would assume you already have a process for deploying your SQL CLR assemblies to the database and you can keep that the way they it is. For instance, if you create a CLR Assembly project using Visual Studio, it asks in which database you would like to deploy the assembly and will create or alter it for you whenever you do a build.

    Once the assembly is compiled annd deployed to the test database, then SQL Connect would allow you to check it into source control (in binary form) and deploy it to the UAT/release database or whatever your next step is.
Sign In or Register to comment.