Stairway to SQLCLR Level 1: What is SQLCLR?

  • copling (1/10/2014)

    Thanks for the reply. But what if the dll is a .net dll? You know in .net one assembly can have reference to another .net assembly; can the same functionality be done for a SQLCRL assembly?

    Hi there. I will cover this concept in a future article (or 2), but the simple answer is "Yes" and it is the same in all versions of SQL Server since SQLCLR was introduced in SQL 2005.

    The more complicated answer is: as usual, you need to add a reference to the DLL in your project. Now, if the DLL is a .Net framework DLL, then not all of them are natively available in SQL Server's restricted CLR. There is a list of which ones are valid and it is a rather short list. You can still use non-validated framework DLLs, but you need to import them into SQL Server in the manner shown by "currentp" and that can only be done if they are marked as UNSAFE. Does this answer the question?

    currentp (1/10/2014)


    -- Solomon Rutzky - I hope I'm not stealing your thunder 🙂

    Nope, not at all. Anyone is welcome to answer questions :-).

    Take care,


    SQL# ( SQLCLR library ofover 340 Functions and Procedures)
    Sql Quantum Lift ( company )
    Sql Quantum Leap ( blog )
    Info sitesCollations     •     Module Signing     •     SQLCLR

  • I always wondered why the FORMAT function was so slow. Now I know. 🙂

    --Jeff Moden

    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • A great basic article for a novice like me. Thanks.

  • This is my sort of article. Starts off with a high level overview, says what it isn't as well as what it is, and gives some reasons why you might be motivated to look more closely at it.
    Quite different from the BOL approach, which immediately immerses the reader in a forest of details. Yes, the answer to one's question is almost certainly in there, but I have to wade through the details to get to it.
    Well done Solomon Rutzky.

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply