> > So, I will venture down path with eyes wide open. I know I have a
> > learning curve ahead of me, as I have spent one whole week on this
[quoted text clipped - 10 lines]
> What I've mainly been involved with is how deploy the assemblies in the
> production databases and to add support for that to our load tool.
> Given that I will be responsible for deployment I would be interested in
> your experience on that topic. From what I can gather the scripting
> approach would be as follows: deleted all referred items (sp, functions
> etc.) included in an assembly, drop the assembly itself , create the new
> (updated) assembly including all Add Files, and create the sps and
> functions etc referenced in the new (updated) assembly.
As long as there are no interface changes, all you need is ALTER
ASSEMBLY.
What I do in AbaPerls our load tool, is that I first try ALTER ASSEMBLY,
and if this fails (with any other error that the MVID is not different,
which means that the assembly has not been rebuild since it was loaded
to the database), I drop all referring objects. The way the update
scripts are built, the files with procedures and function definition
will be reloaded anyway.
Full details at http://www.sommarskog.se/AbaPerls/doc/CLR.html, although
without full context it may not make much sense to you. The interesting
part here, is that you probably have some means to deploy stored procedures
etc to the database, and you need to find a way to fit in assemblies
to this pattern.
> I am assuming I do not need to include any project or source files in the
> deployment to production servers.
Yes. In they way it works for us is that the assembly is built like we
build most other client-side programs. (Well, maybe not, but if there
are differences they are not relevant here anyway.) Then the assembly is
added to SourceSafe in the SQL tree from where AbaPerls takes care of it.
What I would like to have, but I don't have came around to, is to be able
to enter a C# file directly into the SQL tree, and AbaPerls would compile
it and load the assembly. The C# file would also have the SQL command to
create the function/procedure(s) defined by the file. This would be good
for simple CLR objects which is just 100 lines of code, and for which the
full building procedure would be a pain.

Signature
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
RJ - 02 Jan 2010 17:02 GMT
Thanks again for spending time in explaining the various aspects. It has been
invaluable to me.
> > Given that I will be responsible for deployment I would be interested in
> > your experience on that topic. From what I can gather the scripting
[quoted text clipped - 33 lines]
> for simple CLR objects which is just 100 lines of code, and for which the
> full building procedure would be a pain.