Transactions

Transactions are a main reason for writing procedures, and planning transaction size, commits, and rollback points are part of good procedures. Transactions that are too big will cause issues like filling up log space or blocking in SQL Server, and possibly fill up the undo tablespace in Oracle. Transactions that are too small can have too many commits and checkpoints, which can slow down processing.

The starting point for a transaction is defining the blocks of code to be executed, where to roll back or commit, and then working in this framework to define transaction size. SQL Server has BEGIN TRAN, and then you can COMMIT or ROLLBACK TRAN after completion of the statement.

Beginning a Transaction

Oracle has a BEGIN statement to ...

Get Oracle Database Administration for Microsoft SQL Server DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.