You are here: Re: SQL Server 2005: CLR functions vs SQL functions « MsSQL Server « IT news, forums, messages
Re: SQL Server 2005: CLR functions vs SQL functions

Posted by Erland Sommarskog on 05/27/06 21:23

(billmiami2@netscape.net) writes:
> I'm aware that the assemblies are stored in SQL Server upon running
> CREATE ASSEMBLY so there is no direct dependency. However,the
> assemblies must initially be made accessible to the SQL Server so that
> it can bind to them. Also, if an assembly is changed, the revised file
> must be again made available, so you're still having to manage files
> that you wouldn't need to manage had you used T-SQL only.

Actually not. You can load assemblies as hexstrings as well. Try
Script As in Mgmt Studio on an assembly to see what I'm talking about.

What would be very nice is something like:

CREATE PROCEDURE my_sharp_proc @a int, @b int WITH LANGUAGE C# AS

and the rest of the batch would be the procedure definition in C#. SQL
Server would compile it on the server, and create an assembly and all
that jazz for you.

> Can you foresee using some of the new T-SQL enhancements in your
> product? I have a couple of projects that involve hierarchies and the
> recursive Common Table Expressions and Cross/Outer Apply have made for
> far simpler queries than I could have created in SQL 2000. I haven't
> used them in production yet, but the ranking functions look very nice
> too.

The absolutely biggest improvement in SQL 2005 is the error handling.
I'm considering modifying our load tool so that if there is no BEGIN
TRY in the code, the load tool would splice in BEGIN TRY in the
beginning of the procedure (it splices in SET NOCOUNT ON today), and
then tack on an standard error handler at the end.

We have also discussed improving our auditing (which is not very strong
today). To this end the xml data type can be very useful. You can write
standard trigger that transforms the contents of inserted to one XML
document per row, and the store that in a common log table. We would then
write a generic log reader on top of this.

I would also expect row_number() to very useful. We don't work that
much with hierarchies, but certainly there will be one or two CTEs.

I have hardly looked at Service Broker myself, but there are some
people who developing new stuff that will use Service Broker. (This is
for a new customer that will run SQL 2005 from day one.)

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация