Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server 2008 T-SQL Enhancements Part - II Expand / Collapse
Author
Message
Posted Saturday, July 25, 2009 1:16 PM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 3, 2014 6:25 AM
Points: 64, Visits: 189
Comments posted to this topic are about the item SQL Server 2008 T-SQL Enhancements Part - II

With Thanks and Regards
Arshad Ali
Microsoft India

My Blog - http://arshadali.blogspot.com/
Post #759681
Posted Monday, July 27, 2009 6:04 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 12, 2014 7:46 AM
Points: 15, Visits: 61
Nice summary. Probably the biggest disappointment with TVPs is how promising they are in concept but how limiting they are in practice. Its unfortunate that one needs to define a .NET data table by hand, to exactly match a TVP, instead of being able to just define a datatable as being of type of the TVP itself.

Its also a tremendous disappointment that Entity Framework does not support TVPs (even in .NET 4).

SQL Server developments often seem so disjointed. What I was really was hoping to see released was something more "object oriented" - to use that abused phrase - something like (a) to be able to define a table "type" (or "class" or "template" or whatever you want to call it), and (b) be able to create a table as of that type, and (c) be able to create a TVP as of that type, and (d) to be able to create an ADO data table as of that type, etc.

(Heck - make "MERGE" know about templates so that when its input is a table and a correspondlingly matched TVP, then it would automatically know how to do its field by field upsert ..)

Anyhow, one abstraction for a "data template definition" and many concrete implementation of that template. And EF supported ! Wouldn't that be nice?
Post #759981
Posted Monday, July 27, 2009 8:05 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, July 31, 2009 11:03 AM
Points: 10, Visits: 36
Thanks for theses articles. I can't wait to start using TVP. I will see an immediate change in my web app structure. I already have found myself using strongly typed datatables more often for complex transactions despite the extra work. Now being able to insert in bulk instead of looping rows is a significant improvement. Enough so, that some of the refactoring I have been planning on doing has more value. I would love to read your enhancement summary on time zones. This also has some serious potential for considering app structure changes. Thanks again!
Post #760083
Posted Monday, July 27, 2009 9:25 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:07 AM
Points: 11,157, Visits: 12,899
Nice article, I especially appreciated how you included the .NET example of passing a table type parameter. Many articles leave this peace out.

I would have appreciated a few more examples with the datetime datatypes.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #760162
Posted Thursday, August 27, 2009 12:03 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 14, 2013 1:05 PM
Points: 103, Visits: 133
hi arshad,

I would appreciate if you can put down a piece of code to how it was implemented in SQL Server 2005 ...It can be either using Temp tables or many parameter. A simple example is needed.

Thanks,
D
Post #778564
Posted Monday, August 31, 2009 4:15 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, December 8, 2010 7:23 AM
Points: 17, Visits: 41
In SQL 2005 you can use XML data Type to pass structured data to stored procedure, instead of TVP.
Post #779774
Posted Friday, March 12, 2010 12:34 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 12:29 PM
Points: 21,209, Visits: 14,901
Nice article.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #881529
Posted Friday, March 12, 2010 4:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 16, 2013 5:39 AM
Points: 9, Visits: 161
I agree, XML is nice. I use XML in similar cases.
Post #881627
Posted Tuesday, March 30, 2010 5:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 19, 2010 6:04 AM
Points: 9, Visits: 42
We are using TVP's in a call to a stored procedure. The proc takes three arguments of which all are TVP's. This functionality does not seem to scale at all, no
matter how many threads are calling the stored procedure, it always performs the same.
We removed all functionality in the proc but this made almost no difference.
It seems that the major time is spent in the passing of the TVP's from the .net dataaccess code to the stored procedure.
Could there be that there are some locks involved?
Is the TVP's not recommended if you call the stored proc at a high frequency?
Do we have to send batches instead to achieve any performance?
Post #892633
Posted Tuesday, February 22, 2011 3:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 24, 2011 3:32 AM
Points: 3, Visits: 27
really gr8 ariticle
but one thing I'd like to say order of columns must match in Table Type(DB) and Passing Table(.NET).
is there any solution for this. plz shere it.

Thanks,
Post #1067480
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse