From: Rob on
I had recently enabled CLR and when the developer attempted to create an
assembly, he encountered the following error:

Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to
memory pressure. Please restart SQL server in Address Windowing Extensions
(AWE) mode to use CLR integration features.

While I was able to resolve this issue by restarting SQL Server using the -g
option, I'm just wondering what other pitfalls, gotchas, etc. one should be
aware of when enabling and using CLR integration. Does anyone know?

Thanks.
From: Bob Beauchemin on
Hi Rob,

You've hit the main one. The others that people run into are:

1. SQLCLR only supports a subset of .NET libraries (that were tested and
approved for use with SQL Server), the rest are technically unsupported.
Certain functionality, even in the supported libraries (like using your own
mutexes) are only supported when an assembly is cataloged as unsafe. Use of
codegen (e.g. web services proxies generated on the fly at runtime) is not
permitted.
2. CLR code is very good at procedural code, but slower than T-SQL when
executing only SQL statements.
3. Individual appdomains can be recycled when SQL Server is running under
memory pressure.

Hope this helps,
Bob Beauchemin
SQLskills

"Rob" <Rob(a)discussions.microsoft.com> wrote in message
news:7EC85C32-F7C2-42DD-B7F2-2876AD2C140A(a)microsoft.com...
>I had recently enabled CLR and when the developer attempted to create an
> assembly, he encountered the following error:
>
> Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to
> memory pressure. Please restart SQL server in Address Windowing Extensions
> (AWE) mode to use CLR integration features.
>
> While I was able to resolve this issue by restarting SQL Server using
> the -g
> option, I'm just wondering what other pitfalls, gotchas, etc. one should
> be
> aware of when enabling and using CLR integration. Does anyone know?
>
> Thanks.

From: TheSQLGuru on
get a copy of Professional SQL Server 2005 CLR Programming from WROX.

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Rob" <Rob(a)discussions.microsoft.com> wrote in message
news:7EC85C32-F7C2-42DD-B7F2-2876AD2C140A(a)microsoft.com...
>I had recently enabled CLR and when the developer attempted to create an
> assembly, he encountered the following error:
>
> Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to
> memory pressure. Please restart SQL server in Address Windowing Extensions
> (AWE) mode to use CLR integration features.
>
> While I was able to resolve this issue by restarting SQL Server using
> the -g
> option, I'm just wondering what other pitfalls, gotchas, etc. one should
> be
> aware of when enabling and using CLR integration. Does anyone know?
>
> Thanks.


From: Rob on
Very helpful, Bob. Thanks.

"Bob Beauchemin" wrote:

> Hi Rob,
>
> You've hit the main one. The others that people run into are:
>
> 1. SQLCLR only supports a subset of .NET libraries (that were tested and
> approved for use with SQL Server), the rest are technically unsupported.
> Certain functionality, even in the supported libraries (like using your own
> mutexes) are only supported when an assembly is cataloged as unsafe. Use of
> codegen (e.g. web services proxies generated on the fly at runtime) is not
> permitted.
> 2. CLR code is very good at procedural code, but slower than T-SQL when
> executing only SQL statements.
> 3. Individual appdomains can be recycled when SQL Server is running under
> memory pressure.
>
> Hope this helps,
> Bob Beauchemin
> SQLskills
>
> "Rob" <Rob(a)discussions.microsoft.com> wrote in message
> news:7EC85C32-F7C2-42DD-B7F2-2876AD2C140A(a)microsoft.com...
> >I had recently enabled CLR and when the developer attempted to create an
> > assembly, he encountered the following error:
> >
> > Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to
> > memory pressure. Please restart SQL server in Address Windowing Extensions
> > (AWE) mode to use CLR integration features.
> >
> > While I was able to resolve this issue by restarting SQL Server using
> > the -g
> > option, I'm just wondering what other pitfalls, gotchas, etc. one should
> > be
> > aware of when enabling and using CLR integration. Does anyone know?
> >
> > Thanks.
>
> .
>