How to configure Microsoft SQL Server as the back-end database in ADSelfService Plus

How to configure Microsoft SQL Server as the back-end database in ADSelfService Plus

Objective   

This article explains how to configure Microsoft SQL Server as the back-end database for ADSelfService Plus.

Prerequisites   

Before you begin, ensure the following requirements are met:
Supported SQL Server versions  
  • Ensure you have SQL Server 2012, 2014, 2016, 2017, 2019, or 2022.
Required files  
  • Copy the following files from the SQL Server installation directory to the ADSelfService Plus installation directory to enable bulk data modifications:
File
Source location
Destination
bcp.exe
<MSSQL installation directory>\Tools\Binn\bcp.exe
<ADSelfService Plus installation directory>\bin
bcp.rll
<MSSQL installation directory>\Tools\Binn\Resources\1033\bcp.rll
<ADSelfService Plus installation directory>\bin
 
Database driver requirements  
  • For SQL Server 2014 and above: Install the appropriate Microsoft Open Database Connectivity Driver for SQL Server on the machine where ADSelfService Plus is installed.
  • For SQL Server 2012: Install SQL Server Native Client.
 
SQL Server network configuration  
  • Ensure the SQL Server Browser service is running on the database server.
  • Verify that TCP/IP and Named Pipes are enabled for your SQL Server instance.
 
Administrative permissions
  • Ensure you have administrator rights on the ADSelfService Plus server.
  • Ensure the user account used for the configuration has sysadmin and db_owner roles in the SQL Server instance.

Steps to configure SQL Server as the back-end database   

Before making any changes, stop the ManageEngine ADSelfService Plus service via services.msc.
Step 1: Run the ChangeDB script  
  1. Navigate to the ADSelfService Plus installation directory: <ADSelfService_Plus_installation_directory>\bin\
  2. Right-click ChangeDB.bat and select Run as administrator.
  3. A Command Prompt window will appear:
    • For a fresh installation (no data to migrate), execute ChangeDB.bat.
    • To migrate existing data from PostgreSQL, execute ChangeDB.bat true.
Step 2: Configure the database connection  
  1. In the Database Setup Wizard that appears, select MSSQL Server from the Server Type drop-down.
  2. Enter the Host Name of the server where your SQL Server instance resides.
  3. The wizard will automatically detect the Port and Available MSSQL Server Instances. Select the correct SQL Server instance from the list.
  4. Enter a unique Database Name for ADSelfService Plus (for example, ADSelfServiceDB).
Step 3: Select an authentication method
Select the authentication method that aligns with your security policies:
  • Windows Authentication
    • This method uses the credentials of a Windows service account.
    • Provide the Domain Name, User Name, and Password of an account that has the required permissions on the SQL server.
NotesNote: This is only supported when the ADSelfService Plus server and the SQL server are in the same domain. 
  • SQL Server Authentication
  • This method uses a dedicated SQL Server login.
  • Provide the User Name and Password of the SQL Server account.
Step 4: Test and save the configuration  
  1. Click Test to verify that ADSelfService Plus can successfully connect to the database with the provided credentials.
  2. If the test fails, review all the previous steps, paying close attention to the firewall rules, user permissions, and credential accuracy.
  3. Once the test is successful, click Save.

Validation and confirmation   

  1. To confirm the configuration, restart the ADSelfService Plus service.
  2. You can verify that the database is connected in one of the following ways:
    • Check the file database_params.conf in the <ADSelfService Plus installation directory>\conf folder. The drivername attribute will display the value.
    • Navigate to the Support tab. Click More in the top-right corner. Under Environment Details, view the database details.

Best practices   

  • Use a service account: For enhanced security, use a dedicated service account that follows the principle of least privilege for the database connection instead of a general administrator account.
  • Back up the ADSelfService Plus configuration: Before initiating the database change, it is highly recommended to make a full backup of the existing ADSelfService Plus configuration by running the backupDB.bat script located in the <ADSelfService_Plus_installation_directory>\bin\ folder. A folder-level backup is also recommended.
  • Secure the connection: For production environments, consider encrypting the connection between ADSelfService Plus and the SQL server using SSL to protect data in transit.

How to reach support                                        

If you face any issues, contact our support team here

                  New to ADSelfService Plus?

                    • Related Articles

                    • Encryption and data storage in ADSelfService Plus database

                      Encryption in the ADSelfService Plus database ADSelfService Plus' database uses the following encryption methods to store sensitive data: Database Encryption method PostgreSQL AES-256-CBC Microsoft SQL AES-256-CBC The following sensitive information ...
                    • Configuring high availability in ADSelfService Plus

                      ADSelfService Plus utilizes automatic failover to support high availability in case of system and product failures. Essentially, this means that when the ADSelfService Plus service on one machine fails, another instance of ADSelfService Plus running ...
                    • Migrating from ADSelfService Plus 32-bit to ADSelfService Plus 64-bit

                      This article will help you migrate from ADSelfService Plus 32-bit version to the 64-bit version. Before you begin 32-bit to 64-bit migration is possible only between the same builds. For example, you cannot migrate from a 32-bit version of build 5310 ...
                    • How to migrate the ADSelfService Plus installation from one machine to another

                      Description This article will guide you through the process for migrating the ADSelfService Plus installation from one machine to another. Important: Before you start the migration process, please update your ADSelfService Plus installation to the ...
                    • Multi-factor authentication techniques in ADSelfService Plus

                      Let's take a look into the various authentication methods supported by ADSelfService Plus for enterprise multi-factor authentication (MFA). Why should you use MFA? Authentication based solely on usernames and passwords is no longer considered secure. ...