• SQLRNNR (2/19/2014)


    Great article. Very useful information.

    One question I think could be answered and would be very useful to those noobs to CLR.

    How do you get the varbinary representation for the creation of the assembly?

    I am a CLR noob too so forgive me if this is not the correct answer or what you are looking for but...

    If you have already created the assembly you can open SSMS, go to <yourdb> then Programmability then Assemblies. Then you could right-click the assembly > select "Script Assembly AS" > Create To > New window...

    This will give you the DDL to create the assembly; the hex string after FROM is the code you are looking for. You can then copy that code and convert it to varbinary as shown below...

    Hope this helps. If not, I'm sure Solomon will point you in the right direction.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001