Configuring access to the SQL server for tenant services
Before you install tenant services, you must configure access to the Incentives database.
Extract the compressed files from the tenant services folder.
Tip
Move the extracted file to the same place as the REST API files. This makes it easier to find during the installation process, and later when you upgrade your models.
From the
configfolder, open thedefaults.jsonfile.In the
modelServersection, edit these parameters to configure access to your database:nameThis can be any name, like
Super Server, and identifies the database server.instanceNameThe name of the instance of SQL Server installed. By default it is MSSQLSERVER. You can find what yours is by connecting to the server in SQL Server Management Studio. The instance name appears in parentheses in the .
Important
Check the
TenantServices\config\defaults.jsonfile to make sure that there isn't a port listed in theinstanceNamestring.addressThis address points to the location of the database. The format should be: SERVER_NAME\\INSTANCE_NAME where server_name is the host name or IP address for the server.
If SQL Server is not using the default port 1433, you must add the port number to the server address field: SERVER_NAME\\INSTANCE_NAME, PORT_NUMBER.
Important
Make sure you use double backslashes in the address.
hostnameThis is the host name or IP of the machine where SQL server is installed.
userThis is the Microsoft SQL Server user and requires SQL Server Authentication.
passwordThis is the password of the associated Microsoft SQL Server user.
databaseTypeMatch this with “Type” in defaults.json in the Tenant Services configuration. This is the type of database that you are using. Versions up to SQL 2016 are supported.
If you are using SQL Server 2016, all configurations must set up as if you were SQL Server 2014. For example, if the database you are using is SQL Server 2016, then type
sqlserver2014orsqlserver2014unicode.timeoutSecondsThis is the number of seconds before a timeout occurs. Increase this time to avoid timeouts during long calculations.
logPathThis is the location where the log file is created and stored.
diskPathThis is the location where the database is created and stored.
Here's an example of what this looks like when all parameters are filled in:
"modelServer": { "servers": [ { "id": 1, "name": "default", "datacenter": "default", "instanceName": "SQL2014", "address": "VaricentApplicationServer\\SQL2014", "hostname": "VaricentApplicationServer", "user": "sa", "password": "aStr0ngP@ssw0rd", "databaseType": "SQLServer2014Unicode", "enableCreation": true, "timeoutSeconds": "90000", "logPath": "D:\\", "diskPath": "D:\\", "accessVersions": [1], "logins": { "1": { "user": "sa", "password": "Password*123" } } } ] },In the
dbServicessection, set “isRunning” to false. This section should look something like this when you're done:"DBServices": { "host": "localhost", "port": 9200, "protocol": "http", "isRunning": false },In the
Databasesection, update these parameters:password
Set this to the password created during the installation of PostgreSQL.
port
Set this to the port specified during the installation of PostgreSQL.
ssl
Set this to
false.Important
Make sure the port number matches what is written in the
RestAPI.appSettings. By default it is 8080.Here's an example of what this looks like when all parameters are filled in:
"database": { "user": "postgres", "password": "aStr0ngP@ssw0rd", "host": "localhost", "database": "tenants", "port": 5432, "ssl": false },
(Optional) Configuring password settings for tenant services
By default, passwords expire after 90 days and password history is maintained for five password changes. You can change these settings in the default.json file.
Open the
default.jsonfile.Navigate to this section:
"adminPasswordConfig": { "password_expiration_enabled": true, "password_expiration_period": 90, "password_history_limit_enabled": true, "password_history_limit": 5 }You can configure these values:
Value
Description
password_expiration_enabledChange the value to
falseto prevent passwords from expiring for tenant services.password_expiration_periodSet this value to the number of days that users have before they must change their password.
password_history_limit_enabledChange the value to
falseto allow users to use the same password consecutively.password_history_limitSet this value to the number of times that users must create new passwords before they can reuse a previous password.
Save the file.