Dropping the User Defined Functions

  1. Log in to the server as the user with the required permissions.

  2. Navigate to the /opt/protegrity/<DBP_version>/databaseprotector/teradata/sqlscripts/ directory.

  3. To start the bteq utility, run the following command:

    /opt/protegrity/databaseprotector/teradata/sqlscripts/ # bteq
    
  4. Press ENTER.
    The prompt to log in to the database appears.

    Enter your logon or BTEQ command:
    
  5. To log in to the database, run the following command:

    .logon <username>
    
  6. Press ENTER.
    The prompt to enter the database password appears.

  7. Enter the database password.

  8. Press ENTER.
    The connection to the Teradata database is established successfully.

    *** Logon successfully completed.
    
  9. To remove the installed UDFs from the database, run the following query:

    .run file=dropobjects.sql
    
  10. Press ENTER.
    The script removes each of the UDFs and the following message for each of the removed UDF appears.

    *** Function has been dropped.
    *** Warning: 5607 Check output for possible warnings encountered in compiling and/or linking UDF/XSP/UDM/UDT.
    *** Total elapsed time was 1 second.
    
  11. To remove the Varchar Unicode UDFs from the database, run the following query:

    .run file=dropvarcharunicode.sql
    
  12. Press ENTER.
    The script removes each of the UDFs and the following message for each of the removed UDF appears.

    *** Function has been dropped.
    *** Warning: 5607 Check output for possible warnings encountered in compiling and/or linking UDF/XSP/UDM/UDT.
    *** Total elapsed time was 1 second.
    
  13. To remove the Decimal UDFs from the database, run the following query:

    .run file=dropdecimalobjects.sql 
    
  14. Press ENTER.
    The script removes each of the UDFs and the following message for each of the removed UDF appears.

    *** Function has been dropped.
    *** Warning: 5607 Check output for possible warnings encountered in compiling and/or linking UDF/XSP/UDM/UDT.
    *** Total elapsed time was 1 second.
    

Last modified : May 08, 2026