Oracle DBMS_SCN
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Header
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.2 to 12.2.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.

Also important ... there are rumors on the web about SPARC and Solaris being discontinued. Welcome to the age of fake news. There is absolutely not a byte of truth to these irresponsible rumors.
Purpose SCN Compatibility Project Utilities
AUTHID CURRENT_USER
Constants
Name Data Type Value
DBMS_SCN_API_MINOR_VERSION NUMBER 0
DBMS_SCN_API_MAJOR_VERSION NUMBER 1
Dependencies
DBMS_SCN_LIB    
Documented No
First Available 12.1.0.2
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsscnc.sql
Subprograms
 
DISABLEAUTOROLLOVER
Disables SCN Auto Rollover dbms_scn.disableAutoRollover;
exec dbms_scn.disableAutoRollover;
 
ENABLEAUTOROLLOVER
Enables SCN Auto Rollover dbms_scn.enableAutoRollover;
exec dbms_scn.enableAutoRollover;
 
GETCURRENTSCNPARAMS
Returns current SCN Parameters dbms_scn.getCurrentSCNParams(
rsl             OUT NUMBER,
headroom_in_scn OUT NUMBER,
headroom_in_sec OUT NUMBER,
cur_scn_compat  OUT NUMBER,
max_scn_compat  OUT NUMBER);
DECLARE
 rsl  NUMBER;
 hscn NUMBER;
 hsec NUMBER;
 csc  NUMBER;
 msc  NUMBER;
BEGIN
  dbms_scn.getCurrentSCNParams(rsl, hscn, hsec, csc, msc);
  dbms_output.put_line(TO_CHAR(rsl));
  dbms_output.put_line(TO_CHAR(hscn));
  dbms_output.put_line(TO_CHAR(hsec));
  dbms_output.put_line(TO_CHAR(csc));
  dbms_output.put_line(TO_CHAR(msc));
END;
/
 
GETSCNAUTOROLLOVERPARAMS
Returns SCN Auto RollOver Parameters dbms_scn.GetSCNAutoRolloverParams(
effective_auto_rollover_ts OUT DATE,
target_compat              OUT NUMBER,
is_enabled                 OUT BOOLEAN);
DECLARE
 b       BOOLEAN;
 eart    DATE;
 tcompat NUMBER;
BEGIN
  dbms_scn.GetSCNAutoRolloverParams(eart, tcompat, b);
  dbms_output.put_line(TO_CHAR(eart));
  dbms_output.put_line(TO_CHAR(tcompat));
  IF b THEN
    dbms_output.put_line('Enabled');
  ELSE
    dbms_output.put_line('Not Enabled');
  END IF;
END;
/
 
GETSCNPARAMSBYCOMPAT
Returns False if the 'compat'; parameter value is invalid, and the OUT parameters
are not updated
dbms_scn.getSCNParamsByCompat(
compat          IN  NUMBER,
rsl             OUT NUMBER,
headroom_in_scn OUT NUMBER,
headroom_in_sec OUT NUMBER)
RETURN BOOLEAN;
DECLARE
 b    BOOLEAN;
 rsl  NUMBER;
 hscn NUMBER;
 hsec NUMBER;
BEGIN
  b := dbms_scn.getSCNParamsByCompat(1, rsl, hscn, hsec);
  IF b THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
  dbms_output.put_line(TO_CHAR(rsl));
  dbms_output.put_line(TO_CHAR(hscn));
  dbms_output.put_line(TO_CHAR(hsec));
END;
/

Related Topics
Packages
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved