SESSION LEVEL SEQUENCES

ONLINE RENAME AND RELOCATION OF AN ACTIVE DATA FILE, AskHareesh.blogspot.com
SESSION LEVEL SEQUENCES
A new SESSION level database sequence can be created now in 12c to support the session level sequence values. These types of sequences are most useful and suitable on global temporary tables that have session level existence.
Session level sequences produce a unique range of values that are limited within the session, not across the sessions. Once the session ends, the state of the session sequences also goes away. The following example explains creating a session level sequence:
SQL> CREATE SEQUENCE my_seq START WITH 1 INCREMENT BY 1 SESSION;
SQL> ALTER SEQUENCE my_seq GLOBAL|SESSION;

The CACHE, NOCACHE, ORDER or NOORDER clauses are ignored for SESSION level sequences.
*/

No comments:

Post a Comment