all groups > sql server programming > january 2006 >
You're in the

sql server programming

group:

CLR Assemblies


CLR Assemblies KH
1/1/2006 8:05:01 PM
sql server programming: From SQL 2005 docs (type "Designing Assemblies" in the index lookup; bottom
of the page):

Supported .NET Framework Assemblies

Users can refer to the following .NET Framework assemblies in SQL Server
2005 without registering them by using CREATE ASSEMBLY:

custommarshallers.dll
Microsoft.visualbasic.dll
Microsoft.visualc.dll
mscorlib.dll
system.data.dll

<snip> etc ...

Anyone know how? All I can think of is, for example:

CREATE TYPE dbo.Int32
EXTERNAL NAME mscorlib.[System.Int32]

But that errors with:
Msg 6267, Level 16, State 1, Line 1
Assembly "mscorlib" does not exist, or the user does not have permission to
reference it.

I may be reading that sentence wrong, but it sounds like you should be able
to register System.Int32 as a type in SQL 2005 (assuming it conforms to the
requirements for CLR UDTs), but how to refernece the assembly when it hasn't
been registered with CREATE ASSEMBLY? I don't think I'd actually want to use
core CLR types, but ran across it in the docs so now I'm curious.

Thanks - KH
Re: CLR Assemblies Niels Berglund
1/2/2006 1:37:05 AM
"=?Utf-8?B?S0g=?=" <KH@discussions.microsoft.com> wrote in
news:2E6A8137-DA4B-4367-A688-AFCDF06FB913@microsoft.com:

[quoted text, click to view]

"Refer to" above, means that you can have a dependency on the assembly
without having to catalogue the assembly directly through CREATE
ASSEMBLY (as Sri says in his post). In other words the assemblies
mentioned are the only ones that are allowed to be loaded from the GAC.
All other assebmlies have to be created in the database in question.

Niels

--
**************************************************
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
Re: CLR Assemblies SriSamp
1/2/2006 10:22:26 AM
As far as I know, there are a list of assemblies that are loaded from the
GAC by SQL Server and make available for use (since there is no need to
register them into each database). The rest of all asemblies (like user
assemblies) can only be loaded through CREATE ASSEMBLY.
--
HTH,
SriSamp
Email: srisamp@gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp

[quoted text, click to view]

AddThis Social Bookmark Button