Configure the MineMarket Service

Use this activity to configure the connection and security settings for the MineMarket Service using the MineMarket - Service Config application.

This activity can be combined with the activity to Configure the MineMarket Search Service, which is also done using the MineMarket - Service Config application. This combination is recommended for installations where the MineMarket Service and the MineMarket Search Service are on the same machine (which is the typical setup).

This activity updates the ServerSettings.xml file. The ServerSettings.xml file is used in conjunction with the BulkTrak.Service.exe.config and BulkTrak.Server.exe.config files, which contain the configuration information for the MineMarket Service and Server, respectively. Note that these files are identical but are used when starting the MineMarket Service either as a background service or interactively in a server console window.

The MineMarket Service must be stopped before making changes to its configuration. The service can be restarted when configuration is complete.

MineMarket supports Microsoft SQL Server and Oracle database schemas.

There are two aspects of MineMarket security:

  1. Database security—Controls how MineMarket connects to the database. MineMarket can connect to the database using integrated security or standard security.
    1. Integrated security means that the user account of each user must be created as a database user in the database server. Normally it is done by creating a group and associating MineMarket users to that group. The logon user for each service (MineMarket Service, MineMarket Marketing Service and so on) must also be created as a database user in the database server.
    2. Standard security means that MineMarket uses a unique predefined user account to connect to the database.
  2. Application security—Controls what options the user has access to after connecting to the database. This requires user accounts to be created under the MineMarket Security node of the Supply Chain panel. It is possible to require user identification (with Display Login Screen set to True) or not (with Display Login Screen set to False). However, in both cases, users must be defined in MineMarket.

Activity Steps

  1. On the machine where the MineMarket Service is installed, navigate to the MineMarket installation folder and double-click BulkTrak.Config.exe.

    The MineMarket Service Config screen opens.

  2. In the Calc Engine category:
    1. To configure the MineMarket Service to notify clients of any object changes, set UseObjectNotification to True.

      Important: Object Change Notification is enabled by default. To disable object change notification, set UseObjectNotification to False. Refer to the Configuration Examples for more information about object change notification configuration. Disabling object change notification is not recommended.

    2. If UseObjectNotification is True but performance counters are not needed, set UseObjectNotificationPerformanceCounters to False. In some scenarios, object notification crashes when the performance counters cannot be accessed.
  3. In the Connection Properties category, leave the following fields with their default settings:
    • CommandTimeout—Length of time, in seconds, that an update/delete/insert statement is given to execute. Default: 300.
    • IsolationLevel—Isolation level to use when performing database updates. Default: ReadCommitted.
    • QueryTimeout—Length of time, in seconds, a select query is given to execute. Default: 300.
  4. In the Connection Settings category, update the connection string to the MineMarket database:
    1. Complete the following fields.
      • Connection Type—Select from SQLServerNative (default) or OracleODP.
      • Data Source—For Oracle, this is the alias name. For SQL Server, this is the name of the server to which to connect.
      • Initial Catalog
    2. Select whether to UseIntegratedSecurity of Windows.
    3. If UseIntegratedSecurity is False, enter the UserID and Password.
  5. In the Evaluators category, update the following fields if required.
    • ExpressionLocale—The locale (regional setting) in which all expressions created with the Expression Editor are entered and stored. If an expression locale is set, the locale displays at the bottom of the Expression Editor screen within the MineMarket Client. Default (for new installations): en-US.

      Important: Expressions are evaluated according to the regional settings of the machine on which they are evaluated (typically, the MineMarket Client).

      Example: A customer wants to store all expressions in US English (that is, the decimal separator is "." and the list separator is a comma). However, some users have Windows regional settings in the pt-BR format (Brazilian Portuguese).

      • Configure the MineMarket Service to use en-US.
      • On all MineMarket Clients, enter expressions in the Expression Editor using en-US conventions.
      • MineMarket converts the expression into the format required for evaluation within the user's region.
    • MathEvaluatorAssemblyName—Name of the DLL file that provides expression evaluation functionality for MineMarket. This DLL is used by sales and marketing functionality, and may be used in some exporting functionality. The selected DLL also determines which functions are available in the Expression Editor. Default: MathEvaluator.Syncfusion.dll.
  6. In the Export category, update the following fields as required.
    • ExportAssemblyName—Default: BulkTrak.Integration.Export.dll. This file is provided in the MineMarket Integration Components package.
    • FilterChangeRegisterObjects—If True, the Change Register database table records the creation/update/deletion only for exportable objects that are registered in the export DLL. If False, every creation/update/deletion of an exportable object is recorded in the Change Register table. Default: False.
    • GenerateChangeRegisterObjects—Default: False; however, must be changed to True if the site is exporting data. If a site does not use the MineMarket exporting process, there is no need to generate change register objects. If the export processing never runs, the size of the Change Register table will grow considerably over time and will not be cleared.
    • PreventDownstreamingBeforeExporting—Exporting runs as a scheduled task every 5 seconds. If True, MineMarket runs the exporting and after the exporting is finished, MineMarket starts the downstreaming in a separate process. While the downstreaming is running, the export can continue to run on schedule. However, while the downstreaming is running, no change register objects are created for the objects being downstreamed. When the downstreaming is finished, the warehousing runs. If False, downstreaming runs first, then exporting and then warehousing. Default: False.

    Note: Exporting is managed by the MineMarket Export and Reports Service; not the MineMarket Service. See MineMarket Export and Reports Service Configuration.

  7. In the Login Settings category, select whether to DisplayLoginScreen. If True, a login screen displays. If False, login is automatic with either Windows integrated security or the provided username and password.
  8. In the Other Settings category, update the following fields as required.
    • BatchCommandDataType—Data type used for batch queries of the MineMarket database. Only applicable if Connection Type is SQLServerNative. Select from:
      • XML (default)
      • JSON—Saves data to the MineMarket database more quickly than XML.

        Note: JSON queries can only be used with SQL Server 2016 or newer, and the database Compatibility Level must be 130 or higher. If the compatibility level is not high enough, the following error message displays in the console window of the MineMarket Service. (See Run the MineMarket Service in Console Mode.)

        System.Data.SqlClient.SqlException "Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon."

    • StatusBarMessage—Displays as text in the title bar of the MineMarket Client. Example: ****Test Database System****.
  9. In the Remoting Settings category, update the TcpPort if required. The TCP port number is the port on which the MineMarket Service listens to the MineMarket Clients, the MineMarket Marketing Service and the MineMarket Information Services. If changing any port numbers, review the summary of all Default Port Numbers. Default: 8085.
  10. Enter the paths in the Reports category. If using a full path name, the path must be accessible from every MineMarket Client installation. To browse for a folder, click the ellipsis (...) to open the Browse For Folder screen. Alternatively, a relative path can be set. When using a relative path, the folder must exist for each MineMarket Client installation. Example: A new folder called PrintedInvoices within a default MineMarket Client installation would have a full path of C:\Program Files\Datamine\MineMarket 5.5\PrintedInvoices and a relative path of .\PrintedInvoices. (Note the dot before the backslash.)

    Important: If using a mapped drive, the MineMarket Clients must be run without elevated (that is, administrator) privileges.

    • InvoicePrintingPath—The location for saving printed invoice PDF files. If not specified, the default value is the user's My Documents folder.
    • InvoiceReportTemplatePath—The location of invoice report templates. The recommended location for invoice report templates is a shared folder on the network that all MineMarket Clients can access.
    • ReportTemplatePath—The location of all report templates that are not invoice report templates. The recommended location for all report templates is a shared folder on the network that all MineMarket Clients can access.
  11. In the Security Settings category, update the Custom Encryption Key for password storage if required. If blank, MineMarket and IMS Integration Hub use a default encryption key.

    The following passwords are encrypted.

    • Connection settings to the MineMarket database in:
    • Connection settings to the MineMarket Data Mart database in:
    • Exchange Web Services or SMTP credentials or the OAuth client secret (edited via the Warehouse Settings screen and Alert Editor in the MineMarket Client and Message Poll, Task Group and various Task screens in the IMS Integration Hub application)
    • Connection settings to the IMS Integration Hub database in:
      • IMS Integration Hub Service configuration (edited via the IMS Installation Hub service configuration screen)
      • IMS Integration Hub publishers (edited via the Publisher screen in the IMS Integration Hub application)

    Important: If this encryption key is changed, all stored passwords must be re-entered. If configuring multiple environments (for example, user acceptance testing (UAT) and production), and databases will be migrated between the environments, the same custom encryption key should be used for all environments. The recommended key length is at least 8 characters. If both MineMarket and IMS Integration Hub are installed, and a custom encryption key is used, the same key must be specified for both applications.

  12. In the Service Settings category, select whether to Use Remoting. Default: False.

    Note: This setting controls the communication technology used by the server and client. The value of this setting must be the same on the server and all clients. If False, MineMarket uses gRPC, which is a newer communication technology to communicate between the server and clients. This newer technology is not better or more functional than prior technologies; however, Remoting is no longer actively developed and therefore must be replaced. This setting will be removed in a future version of MineMarket when the older communication technology is also removed.

  13. If Use Remoting is False, enter the environment variables for gRPC Tracers. Not applicable if Use Remoting is True. Default: -all (with a prefixed hyphen), which means no tracing.

    Note: This setting should only be changed if you need to debug the gRPC communication layer, in which case, use all (without a prefixed hyphen). Other possible variables are listed under GRPC_TRACE on https://github.com/grpc/grpc/blob/master/doc/environment_variables.md. If enabled, tracer messages display in the configured log4net logging. See Summary of Changes to the MineMarket Service and Server Config Files. The value of this setting can be different on the server and each client.

  14. In the Service Settings category, select whether to Use SSL. Default and recommended: True.

    Important: This setting controls the use of certificates to validate that a client can communicate with the server. See Certificate Management. The value of this setting must be the same on the server and all clients. If True:

    • System administrators must manage a set of certificates used by the server and clients to ensure secure communication channels can be created.
    • MineMarket checks whether certificates exist in the specified Keystore folder and that the certificates have not expired. If required, when you save the MineMarket Service configuration, a prompt displays to generate a set of self-signed certificates. If you want to generate self-signed certificates with a different expiry date and set the Subject Alternative Name to use for remote client access, run the gencerts.bat file in the keystore subfolder and follow the prompts to generate the certificates.
  15. If Use SSL is True, enter the Keystore folder name where certificates are stored. Not applicable if Use SSL is False. Default: .\keystore.
  16. Click Test.

    A message box displays the test result.

  17. If the connection is not successful, determine the correct settings or contact your network administrator or Datamine representative.
  18. If the connection is successful:
    1. Click OK.

      The message box closes.

    2. Click Save.
    3. Click OK.

      The MineMarket Service Config screen closes.

  19. Configure the logon user for the service. See Configure the Logon User for each MineMarket Service.
  20. Modify additional settings if required.
    1. Navigate to the MineMarket installation folder and double-click AppConfig.exe.

      The Application Configuration Editor opens.

    2. In the MineMarket Service category, update the following settings for exporting:
      • Export and Reports Service Hostname—Name or IP address of the server on which the MineMarket Export and Reports Service runs. Default: localhost.
      • Export and Reports Service Port—TCP port that the MineMarket Service uses to send export service requests to the MineMarket Export and Reports Service. This port number must match the TCP port specified in the MineMarket Export and Reports Service configuration.
    3. In the MineMarket Service category, update the following settings if required:
      • Secure Tcp—If True, the security mode for all TCP bindings is Transport. If False, the security mode for all TCP bindings is None. Default: True.
      • Secure Msmq—If True, the security mode for all MSMQ bindings is Transport. If False, the security mode for all MSMQ bindings is None. Default: True.

      Important: If these settings are changed, the security mode for all related bindings must be changed to match. That is, the security mode of related bindings must either all be Transport or all be None. Changing these settings also affects any bindings that have been added to the configuration files for custom integrations. Transport security requires Active Directory integration ("Directory Service Integration" in server features: see System Configuration before Installing MineMarket), and the MineMarket Application Server must be a member of an Active Directory domain.

    4. Click OK.

      The Application Configuration Editor closes and updates the BulkTrak.Service.exe.config and BulkTrak.Server.exe.config files.