Oracle DBMS_MACSEC_FUNCTION
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
Purpose Contains functions that retrieve factor identities. After Oracle Database Vault installation, the install process locks the DVF account to enhance security.

When creating a new factor, Database Vault creates a new retrieval function for the factor owned by the DVF schema.
AUTHID DEFINER
Dependencies
DBMS_ASSERT DBMS_UTILITY  
Documented Yes
First Available Not Known
Security Model Owned by DVF with EXECUTE granted to DVSYS
Source {ORACLE_HOME}/rdbms/admin/dvmacfunc.plb
Subprograms
 
CREATE_FACTOR_FUNCTION
Create retrieval function dbms_macsec_function.create_factor_function(p_factor IN VARCHAR2);
SQL> exec dvf.dbms_macsec_function.create_factor_function('ZZYZX');

PL/SQL procedure successfully completed.
The demo, at right, is from $ORACLE_HOME/rdbms/admin/catmact.sql reformatted for readability since no one has taught developers at Oracle how to format their code. dbms_macsec_function.create_factor_function(p_factor IN VARCHAR2);
BEGIN
  FOR c99 IN (SELECT id# , name, get_expr FROM dvsys.factor$) LOOP
    l_exp := c99.get_expr;
    l_name := c99.name;

    BEGIN
      -- if invalid factor name, then no need to create the factor function
      IF (LENGTH(l_name) > 126) THEN
        dvsys.dbms_macutl.raise_error(47951,'factor_name');
      END IF;

      sys.dbms_utility.canonicalize(
        sys.dbms_assert.simple_sql_name(
          dvsys.dbms_macutl.to_oracle_identifier(l_name)), l_canon_name, 126);
      IF (LENGTH(l_canon_name) > 126) THEN
        dvsys.dbms_macutl.raise_error(47951, 'factor_name');
      END IF;

      dvf.dbms_macsec_function.create_factor_function(l_name);
    EXCEPTION
      WHEN OTHERS THEN
        sys.dbms_output.put_line('sddvffnc: factor=' || l_name || ',error=' || sqlerrm);
    END;
  END LOOP;
END;
/
 
DROP_FACTOR_FUNCTION
Drop a retrieval function.

The demo, at right, is from $ORACLE_HOME/rdbms/admin/dve12.sql
dbms_macsec_function.drop_factor_function(p_factor IN VARCHAR2);
execute dvf.dbms_macsec_function.drop_factor_function('DV$_Module');
execute dvf.dbms_macsec_function.drop_factor_function('DV$_Client_Identifier');
execute dvf.dbms_macsec_function.drop_factor_function('DV$_Dblink_Info');
 
TO_ORACLE_IDENTIFIER
Converts the input string into a valid Oracle object name

Note in the demo, at right, a space in the string is converted to an underscore
dbms_macsec_function.to_oracle_identifier(str IN VARCHAR2)
RETURN VARCHAR2;
SQL> SELECT dvf.dbms_macsec_function.to_oracle_identifier('ZZ ZZ')
  2  FROM dual;

DVF.DBMS_MACSEC_FUNCTION.TO_ORACLE_IDENTIFIER('ZZZZ')
-----------------------------------------------------
ZZ_ZZ

Related Topics
Built-in Functions
Built-in Packages
DBMS_MACAUD
DBMS_MACOUT
DBMS_MACSEC_ROLES
DBMS_MACSEC_RULES
OLS_ENFORCEMENT
OLS$DATAPUMP
What's New In 12cR2
What's New In 18cR3

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