|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Managed Stored ProceduresI would appreciate hearing some different points of views on this subject.
Are / how are you using them? Are you avoiding them? Why? Are these so different to the extended stored procedures of 2000? I'm looking into what's new in 2005 before we start migrating our software - I've found it hard to find any objective views so far. All comments are appreciated. Use Transact-SQL when the code will mostly perform data access with little or
no procedural logic. Use managed code for CPU-intensive functions and procedures that feature complex logic, or when you want to make use of the BCL of the .NET Framework. -- Show quoteHide quoteThanks, Sree [Please specify the version of Sql Server as we can save one thread and time asking back if its 2000 or 2005] "rocket salad" wrote: > I would appreciate hearing some different points of views on this subject. > > Are / how are you using them? Are you avoiding them? Why? > > Are these so different to the extended stored procedures of 2000? > > I'm looking into what's new in 2005 before we start migrating our software - > I've found it hard to find any objective views so far. > > All comments are appreciated. There are some functions which require significant computational or non set
based processing. These could be best handled by the clr. We use it for regex's. -- Show quoteHide quoteHilary Cotter Director of Text Mining and Database Strategy RelevantNOISE.Com - Dedicated to mining blogs for business intelligence. This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions. Looking for a SQL Server replication book? http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS http://www.indexserverfaq.com "rocket salad" <rocketsa***@discussions.microsoft.com> wrote in message news:8C76AC99-2677-46BD-B435-0348AC737361@microsoft.com... >I would appreciate hearing some different points of views on this subject. > > Are / how are you using them? Are you avoiding them? Why? > > Are these so different to the extended stored procedures of 2000? > > I'm looking into what's new in 2005 before we start migrating our > software - > I've found it hard to find any objective views so far. > > All comments are appreciated. <DIV>"rocket salad" <rocketsa***@discussions.microsoft.com>
wrote in message news:8C76AC99-2677-46BD-B435-0348AC737361@microsoft.com...</DIV>>I would appreciate hearing some different points of views on this subject.> First off, CLR Functions are extremely useful for extending SQL. They do > Are / how are you using them? Are you avoiding them? Why? > > Are these so different to the extended stored procedures of 2000? > > I'm looking into what's new in 2005 before we start migrating our > software - > I've found it hard to find any objective views so far. > > All comments are appreciated. things you just can't do, or can't do well in TSQL. And they are usable from plain SQL. So absolutely using CLR functions. Second, Extended Stored Procedures are so troublesome, so dangerous that replacing them with CLR procedures is a no-brainer. CLR Stored Procedures for routine data access are more controvercial. If you have a shop with strong .NET developers and no TSQL developers, you might code all your data access in .NET and consider running this logic in the database. But today it's a tradeoff, as TSQL is a better language for pure data manipulation than the .NET languages. But Data Access from CLR languages is about to get a whole lot better with LINQ (http://msdn.microsoft.com/data/ref/linq/). In the future .NET languages should provide the best of both worlds. David Thanks so far, everyone - some good comments.
The Linq project looks very interesting - I'd not come across that before, but it is a logical step. My mind at the moment is set on trying to identify where we would benefit from using the CLR rather than standard T-SQL procedures. We do a lot of data manipulation and moving of data but I'm unsure we have a current need for more procedural based logic in most of what we do. There is also the issue of SQL developers not necessarily being able to program C# or VB.NET, so managing the code after a developer has moved on may get difficult. I can see the benefits of this in the right environment, but unless my client's requirement's change, I can't see it being used here for more than a couple of procedures. Thanks for the input, Pete. Show quoteHide quote "David Browne" wrote: > > > <DIV>"rocket salad" <rocketsa***@discussions.microsoft.com> > wrote in message > news:8C76AC99-2677-46BD-B435-0348AC737361@microsoft.com...</DIV>>I would > appreciate hearing some different points of views on this subject. > > > > Are / how are you using them? Are you avoiding them? Why? > > > > Are these so different to the extended stored procedures of 2000? > > > > I'm looking into what's new in 2005 before we start migrating our > > software - > > I've found it hard to find any objective views so far. > > > > All comments are appreciated. > > First off, CLR Functions are extremely useful for extending SQL. They do > things you just can't do, or can't do well in TSQL. And they are usable > from plain SQL. So absolutely using CLR functions. > > Second, Extended Stored Procedures are so troublesome, so dangerous that > replacing them with CLR procedures is a no-brainer. > > CLR Stored Procedures for routine data access are more controvercial. If > you have a shop with strong .NET developers and no TSQL developers, you > might code all your data access in .NET and consider running this logic in > the database. But today it's a tradeoff, as TSQL is a better language for > pure data manipulation than the .NET languages. But Data Access from CLR > languages is about to get a whole lot better with LINQ > (http://msdn.microsoft.com/data/ref/linq/). In the future .NET languages > should provide the best of both worlds. > > David > > > > "David Browne" <davidbaxterbrowne no potted m***@hotmail.com> wrote in From:message news:urMqdN10GHA.2196@TK2MSFTNGP03.phx.gbl... > . > But Data Access from CLR languages is about to get a whole lot better > with LINQ (http://msdn.microsoft.com/data/ref/linq/). In the future .NET > languages should provide the best of both worlds. 'The LINQ Project' http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/linqprojectovw.asp > It's important to note that by building query capability directly into the A long time in coming. A database with an imperative language.> local programming language. >, developers get the full power of the relational model without having to Absolutely not! They have no clue what they're talking about.>statically bake the relationships into the CLR type. They are serving up the same sql food in a fancier dish. I suggest the MS team (and everyone else) take a look at "Dataphor" for a 'relational' model within an imperative framework. www.alphora.com The more things change, the more they remain the same:( best, http://racster.blogspot.com Nip nonsense before it gets Tucked in your head. The application developer in me can appreciate the beuty of having a
single syntax for accessing "data" beyond that which is stored in a relational database, but the DBA side realizes that it's a long way off. One of the reasons we have proprietary SQL dialects is that different engines interpret SQL commands differently. LINQ currently doesn't address those issues. Now, for most simple queries, LINQ will probably be OK; but in high-transaction, maximum-performance SQL Server applications, I don't think LINQ will be ready for a long time. Stu David Browne wrote: Show quoteHide quote > <DIV>"rocket salad" <rocketsa***@discussions.microsoft.com> > wrote in message > news:8C76AC99-2677-46BD-B435-0348AC737361@microsoft.com...</DIV>>I would > appreciate hearing some different points of views on this subject. > > > > Are / how are you using them? Are you avoiding them? Why? > > > > Are these so different to the extended stored procedures of 2000? > > > > I'm looking into what's new in 2005 before we start migrating our > > software - > > I've found it hard to find any objective views so far. > > > > All comments are appreciated. > > First off, CLR Functions are extremely useful for extending SQL. They do > things you just can't do, or can't do well in TSQL. And they are usable > from plain SQL. So absolutely using CLR functions. > > Second, Extended Stored Procedures are so troublesome, so dangerous that > replacing them with CLR procedures is a no-brainer. > > CLR Stored Procedures for routine data access are more controvercial. If > you have a shop with strong .NET developers and no TSQL developers, you > might code all your data access in .NET and consider running this logic in > the database. But today it's a tradeoff, as TSQL is a better language for > pure data manipulation than the .NET languages. But Data Access from CLR > languages is about to get a whole lot better with LINQ > (http://msdn.microsoft.com/data/ref/linq/). In the future .NET languages > should provide the best of both worlds. > > David Stu wrote:
> Now, for most simple queries, LINQ will probably be OK; but in Stu,> high-transaction, maximum-performance SQL Server applications, I don't > think LINQ will be ready for a long time. > > Stu I think you're right. But, to me anyway, the place where LINQ really excels is in post processing a resultset after it has been returned from the database. We've never really had the ability to take any collection class and "query" them using strongly-typed idioms to get a subset. It's an incredibly useful feature even outside the realm of database processing. Brian
Other interesting topics
UDF that take a UDT as a parameter (CLR)
TOP 10 for each group Table reaching max value of identity very early Visual Basic 6.0 vs .NET Framework Computing Medians The Joe Celko Way DECLARE and table strucutres inner join in an update xp_smtp_sendmail send out corrupted email message for large attach Import XML using FOREACH Loop container SQL Guru's - please help paging with a distinct recordset |
|||||||||||||||||||||||