Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Property ValueAn SqlAssemblyCollection object that represents all the assemblies defined on the database.
Updated text: 17 July 2006
An assembly is the deployment unit in the Microsoft .NET environment. Microsoft SQL Server requires assemblies to be registered within a database before they can be used inside stored procedures, user-defined functions, triggers, and user-defined data types. In SQL Server Management Objects (SMO), assemblies are registered with the database when it is represented by an SqlAssembly object.
Specific assemblies can be referenced by using this collection by specifying the name of the assembly. To add a new assembly to the collection, call the assembly constructor.
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
'Connect to the local, default instance of SQL Server. Dim srv As Server srv = New Server 'Reference the AdventureWorks database. Dim db As Database db = srv.Databases("AdventureWorks") 'Display all the assemblies on the database. Dim ar As SqlAssembly For Each ar In db.Assemblies Console.WriteLine(ar.Name) Next