<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Transactions</title>
    <link>/en/admin/transactions/</link>
    <description>Recent content in Transactions on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/transactions/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Rollback</title>
      <link>/en/admin/transactions/rollback/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/transactions/rollback/</guid>
      <description>
        
        
        &lt;p&gt;Transaction rollbacks restore a database to an earlier state by discarding changes made by that transaction. Statement-level rollbacks discard only the changes initiated by the reverted statements. Transaction-level rollbacks discard all changes made by the transaction.&lt;/p&gt;
&lt;p&gt;With a &lt;code&gt;ROLLBACK&lt;/code&gt; statement, you can explicitly roll back to a named savepoint within the transaction, or discard the entire transaction. Vertica can also initiate automatic rollbacks in two cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;An individual statement returns an &lt;code&gt;ERROR&lt;/code&gt; message. In this case, Vertica rolls back the statement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DDL errors, systemic failures, dead locks, and resource constraints return a &lt;code&gt;ROLLBACK&lt;/code&gt; message. In this case, Vertica rolls back the entire transaction.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Explicit and automatic rollbacks always release any locks that the transaction holds.&lt;/p&gt;


      </description>
    </item>
    
    <item>
      <title>Admin: Savepoints</title>
      <link>/en/admin/transactions/savepoints/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/transactions/savepoints/</guid>
      <description>
        
        
        &lt;p&gt;A &lt;em&gt;savepoint&lt;/em&gt; is a special marker inside a transaction that allows commands that execute after the savepoint to be rolled back. The transaction is restored to the state that preceded the savepoint.&lt;/p&gt;
&lt;p&gt;Vertica supports two types of savepoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;An &lt;em&gt;implicit savepoint&lt;/em&gt; is automatically established after each successful command within a transaction. This savepoint is used to roll back the next statement if it returns an error. A transaction maintains one implicit savepoint, which it rolls forward with each successful command. Implicit savepoints are available to Vertica only and cannot be referenced directly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Named savepoints are&lt;/em&gt; labeled markers within a transaction that you set through &lt;a href=&#34;../../../en/sql-reference/statements/savepoint/&#34;&gt;&lt;code&gt;SAVEPOINT&lt;/code&gt;&lt;/a&gt; statements. A named savepoint can later be referenced in the same transaction through &lt;a href=&#34;../../../en/sql-reference/statements/release-savepoint/&#34;&gt;&lt;code&gt;RELEASE SAVEPOINT&lt;/code&gt;&lt;/a&gt;, which destroys it, and &lt;a href=&#34;../../../en/sql-reference/statements/rollback-to-savepoint/&#34;&gt;&lt;code&gt;ROLLBACK TO SAVEPOINT&lt;/code&gt;&lt;/a&gt;, which rolls back all operations that followed the savepoint. Named savepoints can be especially useful in nested transactions: a nested transaction that begins with a savepoint can be rolled back entirely, if necessary.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


      </description>
    </item>
    
    <item>
      <title>Admin: READ COMMITTED isolation</title>
      <link>/en/admin/transactions/read-committed-isolation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/transactions/read-committed-isolation/</guid>
      <description>
        
        
        &lt;p&gt;When you use the isolation level &lt;code&gt;READ COMMITTED&lt;/code&gt;, a &lt;code&gt;SELECT&lt;/code&gt; query obtains a backup of committed data at the transaction&#39;s start. Subsequent queries during the current transaction also see the results of uncommitted updates that already executed in the same transaction.&lt;/p&gt;
&lt;p&gt;When you use DML statements, your query acquires write locks to prevent other &lt;code&gt;READ COMMITTED&lt;/code&gt; transactions from modifying the same data. However, be aware that &lt;code&gt;SELECT&lt;/code&gt; statements do not acquire locks, so concurrent transactions can obtain read and write access to the same selection.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;READ COMMITTED&lt;/code&gt; is the default isolation level. For most queries, this isolation level balances database consistency and concurrency. However, this isolation level can allow one transaction to change the data that another transaction is in the process of accessing. Such changes can yield &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/non-repeatable-read/&#34; title=&#34;Occurs in a READ COMMITTED isolation level when two identical queries in the same transaction produce different results.&#34;&gt;nonrepeatable&lt;/a&gt; and &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/phantom-read/&#34; title=&#34;Occurs in a READ COMMITTED isolation level when two identical queries in the same transaction produce different collections of rows.&#34;&gt;phantom reads&lt;/a&gt;. You may have applications with complex queries and updates that require a more consistent view of the database. If so, use &lt;a href=&#34;../../../en/admin/transactions/serializable-isolation/#&#34;&gt;SERIALIZABLE isolation&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;The following figure shows how &lt;code&gt;READ COMMITTED&lt;/code&gt; isolation might control how concurrent transactions read and write the same data:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/transactions/read-committed-timeline.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;READ COMMITTED&lt;/code&gt; isolation maintains exclusive write locks until a transaction ends, as shown in the following graphic:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/transactions/read-committed-timeline2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/db-locks/#&#34;&gt;Database locks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/locks/#&#34;&gt;LOCKS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-characteristics-as-transaction/#&#34;&gt;SET SESSION CHARACTERISTICS AS TRANSACTION&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: SERIALIZABLE isolation</title>
      <link>/en/admin/transactions/serializable-isolation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/transactions/serializable-isolation/</guid>
      <description>
        
        
        &lt;p&gt;&lt;code&gt;SERIALIZABLE&lt;/code&gt; is the strictest SQL transaction isolation level. While this isolation level permits transactions to run concurrently, it creates the effect that transactions are running in serial order. Transactions acquire locks for read and write operations. Thus, successive &lt;code&gt;SELECT&lt;/code&gt; commands within a single transaction always produce the same results. Because &lt;code&gt;SERIALIZABLE&lt;/code&gt; isolation provides a consistent view of data, it is useful for applications that require complex queries and updates. However, serializable isolation reduces concurrency. For example, it blocks queries during a bulk load.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SERIALIZABLE&lt;/code&gt; isolation establishes the following locks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Table-level read locks: The database acquires table-level read locks on selected tables and releases them when the transaction ends. This behavior prevents one transaction from modifying rows while they are being read by another transaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Table-level write lock: The database acquires table-level write locks on update and releases them when the transaction ends. This behavior prevents one transaction from reading another transaction&#39;s changes to rows before those changes are committed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the start of a transaction, a &lt;code&gt;SELECT&lt;/code&gt; statement obtains a backup of the selection&#39;s committed data. The transaction also sees the results of updates that are run within the transaction before they are committed.&lt;/p&gt;
&lt;p&gt;The following figure shows how concurrent transactions that both have &lt;code&gt;SERIALIZABLE&lt;/code&gt; isolation levels handle locking:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/transactions/serilizable-timeline.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Applications that use &lt;code&gt;SERIALIZABLE&lt;/code&gt; must be prepared to retry transactions due to serialization failures. Such failures often result from deadlocks. When a deadlock occurs, any transaction awaiting a lock automatically times out after 5 minutes. The following figure shows how deadlock might occur and how the database handles it:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/transactions/serilizable-deadlock-timeline.png&#34; alt=&#34;&#34;&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;code&gt;SERIALIZABLE&lt;/code&gt; isolation does not apply to temporary tables. No locks are required for these tables because they are isolated by their transaction scope.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/db-locks/&#34;&gt;Database Locks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/locks/#&#34;&gt;LOCKS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
