Share via


Transact-SQL Enhancements for CLR Integration

The integration of the Microsoft .NET Framework common language runtime with SQL Server 2005 (CLR integration) lets you create stored procedures, triggers, functions, aggregate functions, and types in managed code for use inside an instance of SQL Server 2005.

New Statements for CLR Integration

New statements Description

CREATE ASSEMBLY

Registers a .NET Framework assembly as an object inside an instance of SQL Server 2005, against which common language runtime (CLR) functions, stored procedures, triggers, user-defined aggregates, and user-defined types can be created in SQL Server.

ALTER ASSEMBLY

Alters an assembly by modifying its properties and adding or removing files associated with it.

DROP ASSEMBLY

Removes an assembly and all its associated files from the current database.

CREATE AGGREGATE

Creates a user-defined aggregate function in SQL Server whose implementation is defined in a class of an assembly in the .NET Framework.

DROP AGGREGATE

Removes a user-defined aggregate function from the current database.

CREATE TYPE

Creates an alias data type in SQL Server, or a CLR user-defined type in SQL Server whose implementation is defined in a class of an assembly in the .NET Framework.

DROP TYPE

Removes an alias data type or CLR user-defined type from the current database.

EXECUTE AS

Controls which user account SQL Server uses to validate permissions on any database objects that are referenced by a stored procedure or user-defined function.

Enhanced Statements for CLR Integration

Enhanced statements Description

CREATE PROCEDURE

Enables creating CLR procedures.

Adds EXECUTE AS clause to specify the context in which the stored procedure is executed.

ALTER PROCEDURE

Adds EXECUTE AS clause to specify the context in which the stored procedure is executed.

CREATE FUNCTION

Enables creating CLR functions.

Adds EXECUTE AS clause to specify the context in which the function is executed.

ALTER FUNCTION

Adds EXECUTE AS clause to specify the context in which the function is executed.

CREATE TRIGGER

Enables creating CLR triggers.

See Also

Reference

Data Definition Language (DDL) Statements (Transact-SQL)

Other Resources

What's New and Enhanced in Transact-SQL (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance