Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The Human Touch


The Human Touch

Author
Message
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8275 Visits: 11536
Shawn Richards (8/4/2013)
I don't disagree. However bad code that runs and fulfills the requirements which are set out is not buggy it is just bad. I did go on to say that it may product scripts which we don't like or take to long to run, just that i have never seen it to product buggy code i.e. code that will not fulfill the requirements which were set out via the interface.

I know it does not always product good code which is why I almost always use the script button to understand what it is going to do and then assess.


To clarify, I think I started this by mentioning the buggy code generated by (older versions of) SSMS. And I maintain that it was buggy, even though you would normally not see them. Sometimes, code can have bugs that only show up under unlikely conditions.
In this specific case (and I don't recall the exact details, you'll have to trust my memory on this), there were some badly misplaced BEGIN TRAN and COMMIT TRAN statements in a script that recreated a table by dropping and creating it, using select into to save the current data. Under very specific, and hard to reproduce, circumstances, the misplaced transaction statements would result in the database not restoring to a consistent state if an outage occurred at just the right (or maybe I should say wrong) moment.


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
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