February 25, 2011 at 9:51 am
Gianluca Sartori (2/25/2011)
Sean Lange (2/25/2011)
...there is not a table to log against. This is no different than any other variable type.Not true: operations on table variables are logged, but don't participate in transcations.
Which begs the questions:
1. WHY are table variables logged if they don't participate in transactions?
2. Is is possible to have data from a table variable rolled back?
(I'll come back shortly with the answers... and code to prove it...)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
February 25, 2011 at 9:57 am
WayneS (2/25/2011)
Gianluca Sartori (2/25/2011)
Sean Lange (2/25/2011)
...there is not a table to log against. This is no different than any other variable type.Not true: operations on table variables are logged, but don't participate in transcations.
Which begs the questions:
1. WHY are table variables logged if they don't participate in transactions?
2. Is is possible to have data from a table variable rolled back?
(I'll come back shortly with the answers... and code to prove it...)
Gianluca posted a link to Gail's blog that answers those questions. 🙂
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
February 25, 2011 at 10:04 am
Sean Lange (2/25/2011)
WayneS (2/25/2011)
Gianluca Sartori (2/25/2011)
Sean Lange (2/25/2011)
...there is not a table to log against. This is no different than any other variable type.Not true: operations on table variables are logged, but don't participate in transcations.
Which begs the questions:
1. WHY are table variables logged if they don't participate in transactions?
2. Is is possible to have data from a table variable rolled back?
(I'll come back shortly with the answers... and code to prove it...)
Gianluca posted a link to Gail's blog that answers those questions. 🙂
Sure enough... 😀
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
February 25, 2011 at 11:05 am
Thanks Gianluca Sartori,
Its really a very good article, now I have most of the information about Table variable and Temp tables all proc and cons about them.
Regards,
AJ
February 25, 2011 at 11:07 am
And thanks to all for your valuable inputs and time 🙂
Really I learned so much new today.
Regards,
AJ
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply