Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Errors Importing and Working With CLR Assemblies

Mick Letofsky Oct 17, 2013 03:46AM AEDT

I am attempting to create a proof-of-concept with your product but I am running into several errors with our assemblies. We have seven (7) custom CLR assemblies that we want to manage outside of the ReadyRoll project; however, the database verify script is chocking on the verify script because the Assemblies are not included in the project and we have stored procedures that references these CLR procedures.

Am I able to manually run the CLR assemblies against the shadow database and still have the ReadyRoll import tool work? Then can we ignore any of these comparisons in the product?

Thanks!
Mick

2 Community Answers

Best Answer
Daniel Nolan Mar 22, 2014 12:43AM AEDT

Hi Mick,

We’ve recently made some significant improvements to our support for SQLCLR within ReadyRoll.

Version 1.8.1 features a new workflow that allows you to include assemblies as an “inline dependency” within your migration scripts.

Read more about this feature here:
http://ready-roll.com/blog/2014/03/21/developing-and-deploying-net-sqlclr

Best Regards,

Daniel

View in conversation


Up 3 rated Down
Daniel Nolan Oct 18, 2013 03:38AM AEDT ReadyRoll Agent

Hi Mick,

Technically you could manually run the CLR assemblies against the Shadow database, however ReadyRoll will drop and recreate the Shadow under certain circumstances, so you may not find this to be the ideal solution.

ReadyRoll works best when all of the objects within a database are under the control of the database project. This allows for fully self-contained database packages to be produced that can be deployed throughout your lifecycle environments (dev/test/production) quickly and efficiently. It also allows for all dependencies within your database to be verified.

But I can also appreciate why you might want to deploy your CLR assemblies from an external source.

From what I can see, there are two possible solutions:

1) Whatever external tool you are using to deploy your CLR assemblies, call this within a “Pre-Deployment” T-SQL script (eg. EXEC xp_cmdshell ‘deploy.exe $(DatabaseName)’). This way the assembly will be available to your procs prior to the Deploy-Once scripts being executed.

2) Include the CLR assemblies in your initial Import script (ie. CREATE ASSEMBLY foo). RR will import them in a binary encoded format. Then, perform ALTER ASSEMBLY statements outside of your ReadyRoll project for the updated versions of the assemblies.

Either of these two solutions should ensure that your procs can be created during Shadow deployment. If you want to try and avoid the dependency problem altogether, then as a last resort you could exclude the procs that reference the assemblies from your ReadyRoll project (ie. deploy them along with the CLR assemblies themselves).

Best Regards,

Daniel

Up 0 rated Down
Daniel Nolan Best Answer Mar 22, 2014 12:43AM AEDT ReadyRoll Agent

Hi Mick,

We’ve recently made some significant improvements to our support for SQLCLR within ReadyRoll.

Version 1.8.1 features a new workflow that allows you to include assemblies as an “inline dependency” within your migration scripts.

Read more about this feature here:
http://ready-roll.com/blog/2014/03/21/developing-and-deploying-net-sqlclr

Best Regards,

Daniel

This question has received the maximum number of answers.

readyroll.support@red-gate.com
http://assets2.desk.com/
false
readyrollsql
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete