Articles

Current Articles | Categories | Search | Syndication

Using SQLBulkCopy in SQL CLR
By Jonathan Kehayias @ 8:37 PM :: 342 Views :: 0 Comments

At some point you might want to Bulk Copy data from one database to another, either for archiving, or for reporting.  Whatever your reason, if you choose to implement this with CLR, there is an important gotcha that you need to be aware of.  You can not use SqlBulkCopy with the context connection.

Read More..
Signing an Assembly with a Certificate (Visual Studio)
By Jonathan Kehayias @ 9:44 PM :: 394 Views :: 0 Comments

When deploying a CLR Assembly that requires EXTERNAL_ACCESS or UNSAFE as the Permission Set you have the option of either Signing the Assembly with a strong key or setting the database to TRUSTWORTHY ON.  Microsoft's recommendation is that you sign the assembly with a strong key as a best practice.

Read More..
Setting Database Trustworthy On or Signing Assemblies with Certificates
By Jonathan Kehayias @ 8:35 PM :: 709 Views :: 0 Comments

Determining whether to set the Trustworthy Property of a database to ON or to sign your assembly with a certificate might be a confusing thing.  Simply searching online for how to run UNSAFE or EXTERNAL permission Assemblies in SQL Server makes it seem as if setting the Trustworthy Property to ON is the right way to go.  This however is not the Microsoft recommended practice...

Read More..
Determining When to Use CLR
By Jonathan Kehayias @ 10:35 AM :: 262 Views :: 1 Comments

One of the most commonly asked questions I get from developers is, should this be done with a CLR function/procedure or in TSQL?  The addition of CLR in SQL Server brought a very powerful extension to the Database Engine.  This article will focus on providing information on how to best make the decision to use CLR or TSQL to solve a problem.

Read More..
Single Assembly versus Multiple Assemblies
By Jonathan Kehayias @ 10:20 AM :: 113 Views :: 0 Comments

When implementing CLR in SQL Server, often times it easier for developers to use a singe assembly.  This allows them to open a single Visual Studio Solution to add to or change existing CLR.  To a DBA, this can lead to a problem with security in the database server.  Rather than having a single assembly, it is instead better to separate the code out by safety level, placing all Safe Code in a common assembly.  This helps to minimize the volume of code that has to be reviewed by the DBA to know how safe the Assembly is.

Read More..
Previous Page | Next Page

Survey

Which of the following CLR objects are you currently using in SQL Server?




Submit Survey  View Results

Links


Copyright 2007 by SQLCLR.net Terms Of Use Privacy Statement
Website graphics provided by Matt Green Designs
Page generated in 0.4843657 seconds.

All information and example code on this site is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from its use.

This site is in no way affiliated with Microsoft. Unless specifically stated otherwise, nothing should be construed to represent the official positions or opinions of Microsoft and/or its Employees.