Beginner Question about CLR

  • dba92081

    SSC Eights!

    Points: 934

    Can one use CLR assemblies with a database that is set to 80 compatibility level? Or does it have to be set to 90?

  • Matt Miller (4)

    SSC Guru

    Points: 124184

    80 won't work. You need it @ 90 (or better).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • dba92081

    SSC Eights!

    Points: 934

    Thank you!

  • Jeff Moden

    SSC Guru

    Points: 994701

    Just a bit of advice to a beginner... Most of the time where someone thinks they need a CLR, Matt and I have been able to beat the pants off of the CLR solution using good ol' TSQL. The TSQL solution is very worth while looking for. ReGex replace is about the only place I've seen where a CLR is worth a salt.

    --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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

  • Gail Shaw

    SSC Guru

    Points: 1004446

    And instead of extended stored procedures when working with stuff outside the database (if there's absolutely a need to do that from within the DB)

    Jeff, do you know if anyone's tested the speed of a CLR proc vs the built in XQuery for shredding xml documents?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Jeff Moden

    SSC Guru

    Points: 994701

    GilaMonster (8/9/2008)


    Jeff, do you know if anyone's tested the speed of a CLR proc vs the built in XQuery for shredding xml documents?

    No, I sure don't, Gail. Sorry.

    --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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

  • Gail Shaw

    SSC Guru

    Points: 1004446

    Thanks. I'll test it out sometime then. It's another of those grey areas where I wouldn't be surprised if CLR is faster, however I'm not going to put money on it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Jeff Moden

    SSC Guru

    Points: 994701

    So far, the only place I've seen CLR's beat T-SQL is in the area of RegEx Replace...

    --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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

Viewing 8 posts - 1 through 8 (of 8 total)

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