Updating the Output Buffer

This page discusses the process to update the output buffer length for the Varchar Unicode UDFs.

By default, the value of the output buffer length is 500 characters. This value can be modified during the installation of the Teradata objects.

After completing the installation process, you may need to manually update the output buffer length values if necessary. For instance, if you need to protect strings longer than 500 bytes, adjust the buffer length to accommodate the largest string size. Be aware that a big buffer size slows the overall performance. Additionally, each protection method has a size limitations. For example, tokenization has a maximum size limit of 4096 bytes. The output buffer sizes for all the UDFs are stored in both, the dbpuserconf.ini and createvarcharunicode.sql files.

Updating the createvarcharunicode.sql file

  1. Log in to the server as the user with the required permissions.
  2. Navigate to the /opt/protegrity/databaseprotector/teradata/sqlscripts/ directory.
  3. To update the output buffer length in the createvarcharunicode.sql file, run the following command:
    vim createvarcharunicode.sql
    
  4. Press ENTER.
    The contents of the createvarcharunicode.sql file appears.

    Ensure to update the value of the output buffer length for the PTY_VARCHARUNICODEINS, PTY_VARCHARUNICODESEL, and PTY_VARCHARUNICODESELEX UDFs as per requirements.

  5. Save the changes to the createvarcharunicode.sql file:

    Important: To reflect any changes made to the createvarcharunicode file, restart the Teradata Database.

Updating the dbpuserconf.ini file

  1. Log in to the server as the user with the required permissions.
  2. Navigate to the directory where you have downloaded the dbpuserconf.ini file.
    For example, /etc/protegrity/
  3. To view the contents within the directory, run the following command:
    /etc/protegrity/ #  ls -ltr
    
  4. Press ENTER.
    The list of available configurable files appears.
    total 4
    -rw-r----- 1 tdatuser tdtrusted 1058 Jan 28 01:27 dbpuserconf.ini
    
  5. Open the dbpuserconf.ini file in any text editor.
     ###############################################################################
     # Config ini
     ###############################################################################
     [config_ini]
     # path points to database protector installation directory
     path = /opt/protegrity/databaseprotector/teradata/data/config.ini
    
     ###############################################################################
     # Protector Varchar Sizes (set by user during installation)
     ###############################################################################
     [varchar_sizes]
     UDF_VARCHAR_MAX = 500
     UDF_VARCHAR_OVERHEADMAX = 500
     VARCHAR_MAX_IN_BUF_LEN_TOKEN_LATIN = 500
     VARCHAR_MAX_OUT_BUF_LEN_TOKEN_LATIN = 676
     VARCHAR_MAX_IN_BUF_LEN_ENC_LATIN = 500
     VARCHAR_MAX_OUT_BUF_LEN_ENC_BYTES = 538
     VARCHAR_MAX_IN_BUF_LEN_TOKEN_UNICODE = 500
     VARCHAR_MAX_OUT_BUF_LEN_TOKEN_UNICODE = 1356
     VARCHAR_MAX_IN_BUF_LEN_ENC_UNICODE = 500
     VARCHAR_UNICODE_MAX_OUT_BUF_LEN_ENC_BYTES = 1038
     TdvmDev2:/etc/protegrity/ #
    

    Important: Update the VARCHAR_MAX_OUT_BUF_LEN_TOKEN_UNICODE parameter with the required output buffer length.

  6. Update the parameters as per requirements.
  7. Save the changes to the dbpuserconf.ini file.

Last modified : May 08, 2026