Using the Related System Catalogs

As with other database objects, SQL Server provides catalog views that enable you to view loaded managed assemblies, routines, and types. The base view for finding these objects is sys.assemblies.

To see which assemblies have been loaded (including the one you created in this chapter), you use the following query:

image

Now that you have the assembly_id for your SQLCLR project (yours will not be the same value as shown here), you can look up its routines and classes in sys.assembly_modules:

image

Notice that the class holding ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.