Recent Posts

Friday, 17 June 2016

Transaction Control Language (TCL)

     Transaction Control Language(TCL) commands are used to manage transactions in database. These are used to manage the changes made by DML statements. It also allows statements to be grouped together into logical transactions. This is the third sub language in SQL which contains the commands
1. Commit
2. Rollback
3. Save point

Transaction
     Any operation that can perform by using DML commands is known as Transaction.

Session
     It can be defined as some interval of time or some span of time. It means that the moment the user log on to the database to the user logoff to the database this span of the time is known as session. We can terminate the session two ways 
1. Normal Termination
2. Abnormal Termination

1. Normal Termination
     Terminating the session by typing exit or quit SQL prompt then this termination can be called as Normal Termination. Normal Termination always saves our Transactions.

2. Abnormal Termination
     Terminating the session by directly close the window button or directly switch off the C.P.U or power off. Abnormal Termination does not save our transaction.

1. Commit
     This command is used for save the transactions explicitly from the moment by user logon to the database to till execute this command.
Syntax
Commit; Then commit will complete.

2. Rollback
     This command is used to discard the transactions from the moment the user logon to the database till execute this command or executing the commit command too.
Syntax
Rollback; Rollback complete

3. Save point
     Save point is reference name for a particular set of transactions.
Syntax 
savepoint <savepoint name>
E.g
savepoint s3;
rollback to savepoint  s1;
Note
     We can’t rollback the committed transactions but we can commit the rollback transactions.

Next Tutorial  Constraints Tutorial

Previous Tutorial  Data Retrieval Language Part 2

3 comments:

  1. https://www.lalitgarg.in/2012/08/creating-loadrunner-dynamic-transaction.html?showComment=1569939752756#c2191903829249295288

    ReplyDelete
  2. At the point when the framework crashes, the server database programming must have the option to move back the transactions that were in procedure and move forward those transactions that were submitted before the accident yet not reflected in the last reinforcement of the database.소액결제현금화

    ReplyDelete