Oracle DBMS_SCN
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
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
Built-in Functions
Built-in 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