Creating the User Defined Functions (UDFs)

The Oracle Database Protector provides the createobjects.sql script to create or install the UDFs. Before executing the createobjects.sql script, configure the listener.ora, tnsnames.ora, and the extproc.ora configuration files, depending on the version of the Oracle database.

To install UDFs for the Oracle Database Protector:

  1. Connect to the database as the oracle user with the database owner credentials.

  2. Navigate to the /opt/protegrity/databaseprotector/oracle/sqlscripts/ directory.

  3. To install the UDFs, run the following command:

    sqlplus User1/Password1 @createobjects.sql
    

    where, User1 and Password1 are the credentials of the database owner. The symbol \ is used for Windows and / for UNIX environments.

  4. To view the list of all the installed UDFs, run the following command:

    select PROCEDURE_NAME from user_procedures order by 1;
    
  5. To verify the successful installation of the UDFs, execute any one of the following queries:

    select pty.whoami() from dual;
    

    The function returns the name of the user that is logged in to the database.

    select pty.getversion() from dual;
    

    The function returns the protector version.


Last modified : December 18, 2025