SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Truncate rollback


Truncate rollback

Author
Message
Arjun SreeVastsva
Arjun SreeVastsva
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3286 Visits: 1663
Its Getting Error Or ?
Christian Buettner-167247
Christian Buettner-167247
SSCertifiable
SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

Group: General Forum Members
Points: 5255 Visits: 3889
Depending on your settings, the error can also be a valid answer:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'a'.


Best Regards,

Chris Büttner
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61883 Visits: 13297
Christian Buettner-167247 (4/22/2010)
Depending on your settings, the error can also be a valid answer:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'a'.


I'm curious, what settings give this behaviour?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Christian Buettner-167247
Christian Buettner-167247
SSCertifiable
SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

Group: General Forum Members
Points: 5255 Visits: 3889
The following setting will cause the error:
SET IMPLICIT_TRANSACTIONS ON



If this is turned on, the create table statement will also be rolled back, causing the error.

Best Regards,

Chris Büttner
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61883 Visits: 13297
Hopla, learned something new today :-)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
kaspencer
kaspencer
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2662 Visits: 857
The insert statement has a syntax that is unacceptable to SQL Server 2005. So why wasn't it stated as being compatible with SQL Server 2008 and later only?

We should get our points back.

Kenneth Spencer

You never know: reading my book: "All about your computer" might just tell you something you never knew!
lulu.com/kaspencer
Abrar Ahmad_
Abrar Ahmad_
SSC Eights!
SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)

Group: General Forum Members
Points: 888 Visits: 1305
kaspencer (4/22/2010)
The insert statement has a syntax that is unnacptable to SQL Server 2005. So why wasn't it stated as being compatible with SQL Server 2008 and later only?

We should get our points back.

Kenneth Spencer


Digesting loss of points, is if not Very Tough but at least, it is Tough, I think.
It’s frequent in case QODs, so be brave, as me lost last day’s points.;-)


Cath Trimble
Cath Trimble
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1369 Visits: 1196
I got this right, but only because the question was on ROLLBACK and I gambled on the INSERT statement being an mistake/typo. I didn't know that it would run OK as is on SQL Server 2008, so I did learn something. It should have been stated which version this applied to.

Regards,
Cath

"Hang on lads, I've got a great idea. "
Michael Caine (Charlie Croker) The Italian Job
sachin.mahtole
sachin.mahtole
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 36
My answer is ERROR

as insert query given me error. moreover yes Rollback can rollback pages truncated by TRUNCATE.

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ','.

Thanks
rcavill
rcavill
SSC-Addicted
SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)

Group: General Forum Members
Points: 466 Visits: 852
So I learnt about a new feature of the INSERT statement in SQL 2008.
Definitely use feature that when systems finally upgraded to SQL 2008.

Perhaps I should have paid closer attention at the title of the QOD to give me a hint, rather than the obvious syntax error based on current SQL version I generally use.

------
Robert



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search