Click here to Skip to main content
15,894,539 members
Home / Discussions / Database
   

Database

 
AnswerRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 6:02
professionalGuyThiebaut19-Feb-14 6:02 
GeneralRe: begin tran in sql server 2008 Pin
vkEE19-Feb-14 6:13
vkEE19-Feb-14 6:13 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 6:27
professionalGuyThiebaut19-Feb-14 6:27 
GeneralRe: begin tran in sql server 2008 Pin
vkEE19-Feb-14 6:43
vkEE19-Feb-14 6:43 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 7:32
professionalGuyThiebaut19-Feb-14 7:32 
GeneralRe: begin tran in sql server 2008 Pin
vkEE19-Feb-14 8:25
vkEE19-Feb-14 8:25 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 8:43
professionalGuyThiebaut19-Feb-14 8:43 
GeneralRe: begin tran in sql server 2008 Pin
Eddy Vluggen19-Feb-14 8:52
professionalEddy Vluggen19-Feb-14 8:52 
GuyThiebaut wrote:
Using the transaction system to get you out of trouble is bad practise and will one day ;and you in trouble.
Transactions are great if you need multiple statements to work or fail as if they are one single statement; and yes, one should always take a five-second pause to reflect before doing a commit. To make a short story long..

We do a lot of things on autopilot. I've seen other people drive cars and look around when turning in a bend. They all peek in a similar fashion, starting on the left-shoulder, checking each angle, unto the far right. That routine has been drilled in to protect one from their own autopilot. Check each angle, then turn.

Programmers get the same tendencies, and most of us remember each crash and the tendency; still pressing fanatically Ctrl-Shift-S in the days of autorecover? Selecting your entire post and copying it to the clipboard in case of a time-out? We're very familiar with crashes, but there's few resources that explain where there be dragons.

So, before committing; check whether you got the correct server (left shoulder), correct database (left screen), correct credentials (mirror), explain to an imaginary friend what your query should do (look ahead) - then explain what each statement actually does (back-mirror), then find someone to blame when it goes wrong (right mirror).

Now you can commit. Just don't do it without the five-seconds delay - it works as well as GMails' "undo send" button. It'll save you often, but not often enough to live without backups.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: begin tran in sql server 2008 Pin
Ananth A21-Feb-14 0:43
Ananth A21-Feb-14 0:43 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut21-Feb-14 0:56
professionalGuyThiebaut21-Feb-14 0:56 
GeneralRe: begin tran in sql server 2008 Pin
Eddy Vluggen19-Feb-14 8:25
professionalEddy Vluggen19-Feb-14 8:25 
GeneralRe: begin tran in sql server 2008 Pin
vkEE19-Feb-14 8:30
vkEE19-Feb-14 8:30 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 8:47
professionalGuyThiebaut19-Feb-14 8:47 
GeneralRe: begin tran in sql server 2008 Pin
vkEE19-Feb-14 8:59
vkEE19-Feb-14 8:59 
GeneralRe: begin tran in sql server 2008 Pin
GuyThiebaut19-Feb-14 10:26
professionalGuyThiebaut19-Feb-14 10:26 
GeneralRe: begin tran in sql server 2008 Pin
Eddy Vluggen19-Feb-14 8:59
professionalEddy Vluggen19-Feb-14 8:59 
AnswerRe: begin tran in sql server 2008 Pin
Corporal Agarn19-Feb-14 8:22
professionalCorporal Agarn19-Feb-14 8:22 
QuestionSQL Server and IDENTITY Pin
gmhanna18-Feb-14 8:33
gmhanna18-Feb-14 8:33 
AnswerRe: SQL Server and IDENTITY Pin
David Mujica18-Feb-14 8:43
David Mujica18-Feb-14 8:43 
GeneralRe: SQL Server and IDENTITY Pin
gmhanna18-Feb-14 9:32
gmhanna18-Feb-14 9:32 
GeneralRe: SQL Server and IDENTITY Pin
Richard Deeming18-Feb-14 11:04
mveRichard Deeming18-Feb-14 11:04 
JokeRe: SQL Server and IDENTITY Pin
ZurdoDev18-Feb-14 15:31
professionalZurdoDev18-Feb-14 15:31 
AnswerRe: SQL Server and IDENTITY Pin
Mycroft Holmes18-Feb-14 11:46
professionalMycroft Holmes18-Feb-14 11:46 
AnswerRe: SQL Server and IDENTITY Pin
S Douglas26-Feb-14 8:24
professionalS Douglas26-Feb-14 8:24 
QuestionOLAP Cubes in BIDS for Salesforce and PRISM Pin
Karina Notka18-Feb-14 6:30
Karina Notka18-Feb-14 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.