Microsoft SQL Server Setup

The following steps are required in order to use Database Monitors with a Microsoft SQL database. Cleo provides the MSSQL.zip in the utils directory of your Server installation folder. Within that file is MSSQLInstallers.zip, which can be used to execute the required setup of your database.

Important Security Settings

Review these specific security settings before proceeding with the setup steps. The database user name (dbUser) - referenced in the scripts – must meet these requirements:
  • Must be a member of the sysadmin fixed server role.
  • Must have the database containing the stored procedure (and other components) set as default.

Procedure

  1. Extract MSSQLInstaller.zip on the machine where the database resides.
  2. Execute the correct batch file, based on three available options. There are three separate scripts:
    • Install_A.bat - This file runs the installation with the creation of an ASYMMETRIC KEY. This is the recommended method.
    • Install_B.bat - This file runs the setup with the creation of the TRUSTWORTHY database property instead. Use of the TRUSTWORTHY database property may have other security implications outside the scope of this program. Before using this property, please check with your system administrator.
    • Install_C.bat - This file calls the scripts to create the database-specific objects only. This optional script may coincide with scripts A or B.

    Install A and B files run a series of multi-step SQL scripts, and produce log files for each.

    Install A sets up an ASYMMETRIC KEY (Security) while Install B sets TRUSTWORTHY for anyone. See the table below for more details.

    Install C file creates database-specific objects only.

Usage

This process requires you to provide the path to the location of the filesystem as well as the target database itself. These variables must be passed in as parameters.
Table 1.
Var Name Description
1 serverLocation Either “localhost”, IP address, or DNS name of the MSSQL server.
2 SA password The password for the sa system administrator account.
3 dbName The database name on which to install the stored procedure.
4 dbUser The database user that will be using this feature.
5 dbPassword The password for that user.
6 filePath The file path to the EXTOLProcedureLibrary.dll file. This must also include file name. For example: C:\MSSQL_DBMon\EXTOLProcedureLibrary.dll

The generic format for calling the file (Install_A.bat) is shown below.

Install_A.bat <serverLocation> <SA password> <dbName> <dbUser> <dbPassword> <filePath>
      

Results

The scripts automate the configuration process, as described here.

Stage Description
1 CLR will be enabled on your MS SQL Server installation. This is a requirement in order to use Database Monitor objects.
2 Assemblies and stored procedures will be created. Variations of this process exist when using an ASYMMETRIC KEY or a TRUSTWORTHY property.

When running the installation with the creation of a ASYMMETRIC KEY, the following occurs:

  • The EXTOLLogin is created, using an ASYMMETRIC KEY and the EXTERNAL ACCESS permission is granted to that login.
  • An ASYMMETRIC KEY (EXTOLKey) is be added to the master database.
  • After the ASYMMETRIC KEY is created, a user (EXTOLUser) is then created on the target database for this login. This command is being executed on the target database and not the master.
  • The EXTOLProcedureLibrary.dll assembly can be deployed.
    Note: the above correlates to Install_A.bat.
WHEN running the installation with the creation of a TRUSTWORTHY property, please note:
  • Use of the TRUSTWORTHY database property may have other security implications outside the scope of this program. Before using this property, consult your system administrator.
  • Only members of the sysadmin fixed server role can set this option.
3 EXTOLProcedureLibrary.dll and the sendMessageToEBI stored procedure will be installed. System Administrator access and/or permissions are required.
  • The EXTOLProcedureLibrary.dll file contains executable code to format and send notification messages from the target database to Clarify. This file requires EXTERNAL ACCESS permissions, as a web service is used to communicate between the target database and Clarify. The database must have an ASYMMETRIC KEY created and assigned to a login, or the TRUSTWORTHY flag set to ON.
  • The EXTOLProcedureLibrary.dll file is Strong Name signed and was compiled under the .net 2.0 framework.
4 The EXTOL_DBMONITOR table will be created, providing the location where messages are queued prior to being dispatched to Clarify.
5 A trigger (SendOnInsert) will be created and deployed on the EXTOL_DBMONITOR table. This initiates the stored procedure as required.

For More Information

Please refer to your Microsoft documentation for information on these topics:
  • Enabling CLR Integration
  • ASYMMETRIC KEY
  • TRUSTWORTHY Database property