Installing Functions for Microsoft SQL Server and Microsoft Azure

Use the following instructions to replace the standard T-SQL functions with some external, non-T-SQL equivalent functions. You only need to do this if you are having problems (e.g. performance issues) with the standard database views.

  1. Using sqlcmd or the SQL Server Management Studio, run the following commands against the required database to enable it for CLR function execution:
    EXEC sp_configure 'clr enabled', 1;
    RECONFIGURE;
  2. Within Enterprise Developer, create the functions installation script:
    dbfhadmin -script -provider:ss -type:datastore_funcs -name:<datastore_name>

    By default, the command creates a script file named create_datastore_funcs_<datastore_name>_ss.sql

    Note: For Azure databases, remember to change the provider type to az.
  3. Using sqlcmd or the SQL Server Management Studio, run the created script file.

    The external functions replace the currently installed T-SQL ones within your database. Existing views should continue to work, using the new functions.