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
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
Administrative permissions
Before making any changes, stop the ManageEngine ADSelfService Plus service via services.msc.
Step 1: Run the ChangeDB script
Navigate to the ADSelfService Plus installation directory: <ADSelfService_Plus_installation_directory>\bin\
Right-click ChangeDB.bat and select Run as administrator.
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
In the Database Setup Wizard that appears, select MSSQL Server from the Server Type drop-down.
Enter the Host Name of the server where your SQL Server instance resides.
The wizard will automatically detect the Port and Available MSSQL Server Instances. Select the correct SQL Server instance from the list.
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.
Note: This is only supported when the ADSelfService Plus server and the SQL server are in the same domain. Step 4: Test and save the configuration
Click Test to verify that ADSelfService Plus can successfully connect to the database with the provided credentials.
If the test fails, review all the previous steps, paying close attention to the firewall rules, user permissions, and credential accuracy.
Once the test is successful, click Save.
Validation and confirmation
To confirm the configuration, restart the ADSelfService Plus service.
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.