Do you know nested transaction?
Submitted by: AdministratorA nested transaction is one in which a new transaction is started by an instruction that is already inside another transaction. This new transaction is said to be nested. The isolation property of transaction is obeyed here because the changes made by the nested transaction are not seen or interrupted by the host transaction.
BEGIN TRANSACTION trans_1
INSERT INTO TestTrans1 VALUES (1,'mark')
COMMIT TRANSACTION trans_1;
GO
/* Start a transaction and execute trans_1. */
BEGIN TRANSACTION trans_2;
GO
EXEC trans_1 1, 'aaa'; //execute some procedure
GO
ROLLBACK TRANSACTION trans_2;
GO
EXECUTE TransProc 3,'bbb';
GO
Submitted by: Administrator
BEGIN TRANSACTION trans_1
INSERT INTO TestTrans1 VALUES (1,'mark')
COMMIT TRANSACTION trans_1;
GO
/* Start a transaction and execute trans_1. */
BEGIN TRANSACTION trans_2;
GO
EXEC trans_1 1, 'aaa'; //execute some procedure
GO
ROLLBACK TRANSACTION trans_2;
GO
EXECUTE TransProc 3,'bbb';
GO
Submitted by: Administrator
Read Online Transaction Server Job Interview Questions And Answers
Top Transaction Server Questions
☺ | Please explain the characteristics of a transaction server for example Atomicity, Consistency, Isolation, Durability? |
☺ | What is Transaction Server Auto commit? |
☺ | What is Transaction Server Consistency? |
☺ | What is Transaction Server Implicit? |
☺ | Do you know nested transaction? |
Top New MS SQL Server Categories
☺ | SQL Server Database Administrator Interview Questions. |
☺ | SQL Server Service Broker Interview Questions. |
☺ | SQL Server Locks Interview Questions. |
☺ | SQL Server Constraints Interview Questions. |
☺ | MS SQL Data Mining Interview Questions. |