Tuesday 13 March 2012

SQL CLR

Microsoft SQL Server 2005 includes a basic alleged SQL CLR ("Common Accent Runtime") via which it integrates with .NET Framework. Unlike best added applications that use .NET Framework, SQL Server itself hosts the .NET Framework runtime, i.e., memory, threading and ability administration requirements of .NET Framework are annoyed by SQLOS itself, rather than the basal Windows operating system. SQLOS provides deadlock apprehension and resolution casework for .NET cipher as well. With SQL CLR, stored procedures and triggers can be accounting in any managed .NET language, including C# and VB.NET. Managed cipher can additionally be acclimated to ascertain UDT's (user authentic types), which can abide in the database. Managed cipher is aggregate to .NET assemblies and afterwards actuality absolute for blazon safety, registered at the database. Afterwards that, they can be invoked like any added procedure.45 However, alone a subset of the Base Class Library is available, back active cipher beneath SQL CLR. Best APIs apropos to user interface functionality are not available.45

When autograph cipher for SQL CLR, abstracts stored in SQL Server databases can be accessed appliance the ADO.NET APIs like any added managed appliance that accesses SQL Server data. However, accomplishing that creates a fresh database session, altered from the one in which the cipher is executing. To abstain this, SQL Server provides some enhancements to the ADO.NET provider that allows the affiliation to be redirected to the aforementioned affair which already hosts the active code. Such admission are alleged ambience admission and are set by ambience ambience affiliation constant to accurate in the affiliation string. SQL Server additionally provides several added enhancements to the ADO.NET API, including classes to assignment with collapsed abstracts or a distinct row of abstracts as able-bodied as classes to assignment with centralized metadata about the abstracts stored in the database. It additionally provides admission to the XML appearance in SQL Server, including XQuery support. These enhancements are additionally accessible in T-SQL Procedures in aftereffect of the addition of the fresh XML Datatype (query,value,nodes functions).46

No comments:

Post a Comment