Skip to main content

Writing a Simple SQL Assembly

  • Chapter
Pro SQL Server 2005 Assemblies
  • 229 Accesses

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. 1.

    Write the .NET code for the object.

  2. 2.

    Compile the code, using either Visual Studio (VS) or the command-line compiler.

  3. 3.

    Register the assembly as an object in SQL Server using the CREATE ASSEMBLY statement.

  4. 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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics