TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P101

Microsoft SQL Server 2008 R2 Unleashed- P101:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 944 CHAPTER 29 Creating and Managing User-Defined Functions Creating and Using CLR Functions Prior to SQL Server 2005 the only way to extend the functionality of SQL Server beyond what was available using the T-SQL language was to create extended stored procedures or Component Object Model COM components. The main problem with these types of extensions was that if not written very carefully they could have an adverse impact on the reliability and security of SQL Server. For example extended stored procedures are implemented as DLLs that run in the same memory space as SQL Server. An access violation raised in a poorly written extended stored procedure could crash SQL Server itself. In addition neither extended stored procedures nor COM components allow you to create custom user-defined functions that can be written in any programming language other than T-SQL which has a limited command set for operations such as complex string comparison and manipulation and complex numeric computations. In SQL Server 2008 you can write custom user-defined functions in any Microsoft .NET Framework programming language such as Microsoft Visual Basic .NET or Microsoft Visual C . SQL Server supports both scalar and table-valued CLR functions as well as CLR user-defined aggregate functions. These extensions written in the CLR are much more secure and reliable than extended stored procedures or COM components. For information on the methods and tools to actually create and compile CLR user-defined functions see Chapter 46. This chapter focuses only on how to install and use CLR functions in a SQL Server database. NOTE The CLR function examples presented in the following sections are provided as illustrations only. The sample code will not execute successfully because the underlying CLR assemblies have not been provided. Adding CLR Functions to a Database If you ve already created and compiled a CLR function your next task is to install that CLR function in the database. The first step

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.