Click here to Skip to main content
15,896,529 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database Restore Error TSQL Pin
Vimalsoft(Pty) Ltd15-Jan-09 23:25
professionalVimalsoft(Pty) Ltd15-Jan-09 23:25 
GeneralRe: Database Restore Error TSQL Pin
Wendelius15-Jan-09 23:33
mentorWendelius15-Jan-09 23:33 
GeneralRe: Database Restore Error TSQL Pin
Vimalsoft(Pty) Ltd15-Jan-09 23:41
professionalVimalsoft(Pty) Ltd15-Jan-09 23:41 
GeneralRe: Database Restore Error TSQL Pin
Wendelius16-Jan-09 8:52
mentorWendelius16-Jan-09 8:52 
Question2 basic transaction issues Pin
George_George15-Jan-09 20:21
George_George15-Jan-09 20:21 
AnswerRe: 2 basic transaction issues Pin
Wendelius15-Jan-09 20:57
mentorWendelius15-Jan-09 20:57 
GeneralRe: 2 basic transaction issues Pin
George_George15-Jan-09 21:37
George_George15-Jan-09 21:37 
GeneralRe: 2 basic transaction issues Pin
Wendelius15-Jan-09 21:54
mentorWendelius15-Jan-09 21:54 
George_George wrote:
if I do not start transaction explicitly, I could still catch the error and handles it


Yes you can if the error is 'technical' and SQL Server sees it as an error. But what happens if the error is logical. Consider following imaginary scenario.
- insert into a table
- check that some business rule apply
- if business rule is violated, undo the insert
The previous is very simple and it wouldn't be a problem to just change the order of the operations. However, this is not always the case.
Since there's typically no harm in using explicit transactions, personally I've decided to use them always.

George_George wrote:
what do you mean client? No matther what kinds of API you are using or even using Management Studio directly, I think we are all "client" of database engine.


I meant a scenario where your try catch is inside a stored procedure and a client application (whatever it is) calls the procedure. Ending point can be at the calling side so the procedure is actually just a part of a bigger transaction scope.

The need to optimize rises from a bad design.My articles[^]

GeneralRe: 2 basic transaction issues Pin
George_George15-Jan-09 22:42
George_George15-Jan-09 22:42 
GeneralRe: 2 basic transaction issues Pin
Wendelius16-Jan-09 9:07
mentorWendelius16-Jan-09 9:07 
AnswerRe: 2 basic transaction issues Pin
Ashfield15-Jan-09 21:02
Ashfield15-Jan-09 21:02 
GeneralRe: 2 basic transaction issues Pin
George_George15-Jan-09 21:24
George_George15-Jan-09 21:24 
GeneralRe: 2 basic transaction issues Pin
Ashfield16-Jan-09 1:17
Ashfield16-Jan-09 1:17 
GeneralRe: 2 basic transaction issues Pin
George_George15-Jan-09 21:38
George_George15-Jan-09 21:38 
GeneralRe: 2 basic transaction issues Pin
Ashfield16-Jan-09 1:18
Ashfield16-Jan-09 1:18 
QuestionTime Addition Problem Pin
AliAmjad14-Jan-09 19:22
AliAmjad14-Jan-09 19:22 
AnswerRe: Time Addition Problem Pin
Wendelius15-Jan-09 4:13
mentorWendelius15-Jan-09 4:13 
GeneralDifference between MS SQL and ORACLE Pin
Subin Alex14-Jan-09 16:48
Subin Alex14-Jan-09 16:48 
GeneralRe: Difference between MS SQL and ORACLE Pin
Ashfield14-Jan-09 21:12
Ashfield14-Jan-09 21:12 
GeneralRe: Difference between MS SQL and ORACLE Pin
Wendelius15-Jan-09 0:41
mentorWendelius15-Jan-09 0:41 
GeneralRe: Difference between MS SQL and ORACLE Pin
Subin Alex15-Jan-09 2:52
Subin Alex15-Jan-09 2:52 
GeneralRe: Difference between MS SQL and ORACLE Pin
leckey15-Jan-09 5:12
leckey15-Jan-09 5:12 
QuestionDynamic Parameters in procedure Pin
monika_vasvani14-Jan-09 7:51
monika_vasvani14-Jan-09 7:51 
AnswerRe: Dynamic Parameters in procedure Pin
Wendelius14-Jan-09 8:01
mentorWendelius14-Jan-09 8:01 
AnswerBe careful with creating Dynamic SQL Pin
David Mujica14-Jan-09 8:43
David Mujica14-Jan-09 8:43 

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.