Installing on multiple databases same server

May 1, 2013 at 4:27 PM
Will the same CLR objects be shared on the database server vs the database.

What is the implications of installing this library on the same DB server but in different databases?
Coordinator
May 1, 2013 at 10:08 PM
Edited May 1, 2013 at 10:21 PM
They are installed at the DB level - but you can access them across databases by just providing a fully-qualified name (provided you have the right permissions). The one exception to this is anything that involves user-defined types (UDTs) - in this case the types need to be defined in every database that you will be using them in - and that includes TempDB if you want to put typed objects into temp tables.

Other than that you have the choice of installing in one DB and accessing from everywhere - or installing in each DB that you use them in. If you use Assembly Manager you can easily copy assemblies or individual functions between databases by just dragging and dropping them. The assemblies themselves are very small so I don't think there is any downside to having multiple copies in adjacent databases.