Creating the User Defined Functions

This section describes the instructions install the User Defined Functions (UDFs). Create the UDFs with or without a certificate-based login. For more information about certificate-based login, refer to Managing Certificate-Based Login.

Note: If the TRUSTWORTHY database property is OFF, create a certificate-based login from the signed .dll file provided by Protegrity. Create the certificate-based login before creating the UDFs. If the TRUSTWORTHY database property is ON, create the UDFs without creating a certificate-based login.

To install the user-defined functions:

Note: In MSSQL Server, the sa login is disabled by default. Enable the sa login to connect to the database using the sa user. By default, the database name is master.

  1. To connect to the database, login as the privileged user with the CREATE ASSEMBLY permissions.

  2. To run the scripts, navigate to the C:\Program Files\Protegrity\Database Protector\sqlserver\sqlscripts directory.

  3. To execute the registered assembly, execute the CreateAssembly.sql script.

  4. Open the CreateFunctions.sql file.

  5. Replace the default database name with the database to install the UDFs.

  6. Save the changes to the CreateFunctions.sql script.

  7. To create the UDFs, execute the CreateFunctions.sql script.

    Note: After creating the UDFs, Protegrity recommends to restart the MSSQL service. For more information, refer to Restarting the SQL server.


Last modified : May 21, 2026