programming4us
programming4us
DATABASE

SQL Server 2008 : Using the CLR - CLR and Managed Code Explained

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
The CLR is the execution environment provided by the Microsoft .NET Framework. It is likely that you had to install the .NET Framework at one time or another, usually as a prerequisite for installing an application. The .NET Framework is a new-generation application platform, and many modern applications, including SQL Server, use it as the execution environment. The .NET Framework provides developers with the ability to compile applications written in a .NET-compliant language. The .NET Framework serves as runtime for these applications. Figure 1 shows the key components of the .NET Framework.
Figure 1. The .NET Framework


The .NET Framework is installed on an operating system and is used to access the operating system’s services during runtime. There is a version of the .NET Framework for 32-bit and 64-bit Windows platforms, as well as some other operating systems like Windows CE and Windows Mobile. Application services exposed by applications like SQL Server, IIS, WMI, COM+, and many more are available to the developer through the .NET Framework. The Base Class Library provides commonly used functionality to developers in the form of classes and namespaces. We will examine the Base Class Library in more detail later in this chapter.

Developers usually use the Visual Studio .NET Integrated Development Environment (IDE) to create .NET applications. However, the IDE is not absolutely necessary, and it is possible to create simple text source code files and compile them using a .NET compiler. You can create .NET applications in any .NET-compliant language to suit the specific functionality you wish to implement. Over 60 major language families are available for the .NET Framework, each with many variants and branches. The most popular .NET languages are C# and Visual Basic .NET. Support for these languages is available out-of-the-box when you install Visual Studio .NET.

The .NET Framework includes a compiler component for each .NET-compliant language. This component compiles the source code written in the specific high-level language to the lower-level Microsoft Intermediate Language (MSIL). When the application is running, the CLR translates MSIL to native machine instructions. This is done by a component known as just-in-time (JIT) compilation. It is important to understand that no matter which .NET language you develop your application in, it will be compiled to the one common language—MSIL. This is from where the word common in Common Language Runtime originates.

The CLR is responsible for executing MSIL code. The CLR also manages the code that runs within it by providing the code with runtime services. Figure 2 outlines some of the services provided by the CLR.

Figure 2. Common Language Runtime Services


The CLR manages code execution by providing mandatory stability and security-checking engines, as well as resource management. For example, the Garbage Collection service provided by the CLR ensures optimal memory management. Thread management provides parallel processing capabilities. The Base Class Library support, error management, and debugging services create a consistent development environment for all .NET languages.

Code that runs within the CLR is known as managed code, as the CLR provides it with management services like those mentioned above. The term is often used to distinguish between .NET code and native code (for example, code written using Visual Basic 6 or C++). Native code runs outside the CLR and is referred to as unmanaged code. Unmanaged code is not subject to CLR services, like code access security. Within SQL Server, all objects that use CLR integration are written as managed code. Extended stored procedures (XPs) are unmanaged code and are written using C++.

Additionally, XPs are deprecated, and support for this feature is likely to be removed in future versions of SQL Server.

The CLR abstracts essential services such as memory and security management away from developers, allowing them to concentrate on the specific functionality of their code.

New & Noteworthy...: Versions of the .NET Framework Supported by SQL Server 2008

SQL Server 2008 supports assemblies targeted at .NET Framework 2.0 or later. During installation of SQL Server 2008, .NET Framework 2.0 Service Pack 1 will be installed automatically. SQL Server 2008 does not support assemblies targeted at .NET Framework 1.0 and .NET Framework 1.1.

Visual Studio 2008 is the latest version of Visual Studio—the Microsoft IDE used to create .NET Framework applications. Visual Studio 2008 can be used to create a variety of applications, and one of the key new features is support for Language Integrated Query (LINQ). Both Visual Studio 2005 and Visual Studio 2008 can be used to create assemblies containing CLR objects for SQL Server 2008 CLR integration. Visual Studio 2003 and Visual Studio .NET 2001 cannot be used.

Other  
 
Top 10
Free Mobile And Desktop Apps For Accessing Restricted Websites
MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
TOYOTA CAMRY 2; 2.5 : Camry now more comely
KIA SORENTO 2.2CRDi : Fuel-sipping slugger
How To Setup, Password Protect & Encrypt Wireless Internet Connection
Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
Backup & Restore Game Progress From Any Game With SaveGameProgress
Generate A Facebook Timeline Cover Using A Free App
New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
- Messages forwarded by Outlook rule go nowhere
- Create and Deploy Windows 7 Image
- How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
- Creating and using an unencrypted cookie in ASP.NET
- Directories
- Poor Performance on Sharepoint 2010 Server
- SBS 2008 ~ The e-mail alias already exists...
- Public to Private IP - DNS Changes
- Send Email from Winform application
- How to create a .mdb file from ms sql server database.......
programming4us programming4us
programming4us
 
 
programming4us