Conversation started Aug 14, 2012 at 16:03.
Aug 14, 2012 16:03
Uh oh, Robert doesn't like migration
2
Q: Setting up a central CLR storeproc/function respository library for internal stored procs in other databases to use?

Alex ErwinI would like to use code that I developed in C Sharp CLR to be used in all of the databases on the system so that I don't have to set each to trustworthy and turn CLR on and keep a bunch of the same code inside each one. Is there a best way to do this from an administrative and security standpoi...

I'm waiting until we get "The Rest of the Story"
oh wait ... that was Paul Harvey
@AaronBertrand i think its a valid question in general - should a question exist where its an acceptable fit or best fit
well, its at dba now
black ops
Yeah I'd be curious to know if Robert moved it or if someone else did.
Anyway, he could make that same argument for EVERY SINGLE question that has ever been migrated.
We'll see if he replies to my latest comment.
I'd like to get this reviewed now if no-one objects
Aug 14, 2012 16:10
@JackDouglas hmm?
@Aaron broadly speaking, what is the answer to the OPs question?
is it databasey or source-controly
@JackDouglas It's databasey. We implemented plenty of CLR at my last job and we only ever implemented one central copy of the CLR assemblies. You can create wrappers that EXECUTE AS to avoid the trustworthy bit, but personally I don't understand all of the objection to trustworthy in the first place. And we had so much cross-db crap going on (mostly service broker) that we just turned on trustworthy anyway.
@AaronBertrand excellent, thanks.
@Shog9 can you cast your eyes over this migration and give it your stamp of approval or otherwise?
As for the backup / restore, the DLL is stored in the file system, not the database, so yes the DLL has to move. If the file path differs, then it needs to be updated, though I've never done that so I'm not sure how to re-register an assembly only updating the path.
@Shog9 please note the comments on the question pre-migration by Robert in particular
Aug 14, 2012 16:16
so now we have to go upvote the crap out of the question so that we can show 'em how nice and helpful we are
Unfortunately I don't have time to craft a proper response now (headed to a Dr's appt) but if anybody wants to take my text here and form some kind of answer or comment, I won't object.
@JackDouglas Is this a topic y'all are particularly interested in? Sounds like he is primarily interested in the logistics of maintaining such a library, not so much actually writing it, which would point in your direction.
It seemed like much of the logistics he's interested in are how to implement the CLR library from a security perspective inside of SQL Server.
e.g. how to let databases call a central CLR assembly without turning on the trustworthy bit. That seems to have very little at all to do with source control.
 
Conversation ended Aug 14, 2012 at 16:19.