Summary
This has been a short but important chapter. We’ve gone through the whole process of creating a simple SQL assembly in considerable detail because it’s vital to understand how the whole process works before you move on to the specific assembly types, which makes up the core of the book.
Although the exact details vary, there are four steps involved in creating any CLR database object in SQL Server 2005:
-
1.
Write the .NET code for the object.
-
2.
Compile the code, using either Visual Studio (VS) or the command-line compiler.
-
3.
Register the assembly as an object in SQL Server using the CREATE ASSEMBLY statement.
-
4.
Create the database object such as the stored procedure or user-defined function that the .NET code implements.
You also saw how to get VS to do a lot of this work for you—but remember that it’s important to understand fully how the CREATE ASSEMBLY and other statements work, even though you’ll doubtless use these features a great deal if you have VS for .NET 2.0.
Now that you’ve seen how to create a simple SQL assembly, let’s dig into the details. We’ll start in the next chapter by looking at the new classes provided for writing SQL Server assemblies.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Robin Dewson and Julian Skinner
About this chapter
Cite this chapter
(2006). Writing a Simple SQL Assembly. In: Pro SQL Server 2005 Assemblies. Apress. https://doi.org/10.1007/978-1-4302-0113-7_2
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0113-7_2
Publisher Name: Apress
Print ISBN: 978-1-59059-566-4
Online ISBN: 978-1-4302-0113-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books