Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

The default deployment script for SQL CLR objects in VS2010 seems to require one to set the target database to SET TRUSTWORTHY ON and tries to enable vardecimal storage at the database level.

On our landscape we prefer to SET TRUSTWORTHY OFF on our databases. Also, one cannot enable vardecimal storage on system databases. We have some TVFs that we deploy to master.

It would be nice to be able to have the script be properly generated instead of having to modify it with each build. For now, I have abandoned the Deploy feature and manually deploy my CLR objects.

How do I customize the autogenerated deployment script? Is there a way?

share|improve this question
2  
It is recommended that you try not to push objects to system databases, instead putting them within user databases. You never know what Microsoft is going to do within the system databases, and you should assume that the system database is theirs. –  mrdenny Jan 18 '11 at 7:57

1 Answer 1

for the trustworthy setting you should go to your project and: Right click on the project - Properties - Go to tab Project Settings -> Catalog properties file - Edit -> in the middle there will be option for set trustworthy on/off.

If you don't need to change the database properties at all at deploy time, then go to the Deploy tab - Deploy configuration file -> uncheck the option 'Deploy database properties' - first option in the list. This should not apply the settings from the 'Catalog Properties file' to the database your deploying on.

As for Vardecimal storage option I remember I saw it somewhere in the deploy settings.. but no clue for the moment, sorry. If I find it I'll get back with solution. Hope this helps, at least a bit.

share|improve this answer
    
Thank you for your response. We don't want to change the trusworthy setting on our databases. Since I am not deploying the database as part of my solution, then I do not have the option you describe in my Deploy tab. I have disabled the Deploy option in Configuration Manager until/if I find an answer. Instead of using the Deploy feature I am using hand coded deployment scripts. It would be nice to be able to get the Deploy feature to work. But maybe, for my situation it is not possible. –  MauMen Jan 17 '11 at 20:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.