Configuring MS SQL Server as the Backend Database12 minutes to read
Key Manager Plus supports PostgreSQL and MS SQL as the backend databases. PostgreSQL database is bundled with the product, and by default, it is configured to run with PostgreSQL. In case, you wish to use MS SQL Server as the backend database, follow the steps elaborated below. To ensure a high level of security, Key Manager Plus has been configured to connect to the SQL server only through SSL. Note: In case you have started using the Key Manager Plus with the bundled PostgreSQL database and wish to configure MS SQL Server as the backend database, this configuration process does not transfer any existing data from the bundled PostgreSQL database. Steps Required1.1 Generating the certificate and getting it signed by third-party CA 1.2 Creating a self-signed certificate 2. Enable SSL encryption in SQL server 3. Execute changeDB.bat in Key Manager Plus 1. Create SSL Certificate, Install it in Windows Certificate Store (in the machine where SQL server is running) and Import it to Key Manager PlusBefore connecting Key Manager Plus with SQL server, you need to enable SSL encryption in SQL Server. Here, you may create an SSL Certificate and get it signed by a Certificate Authority (CA) or use a self-signed certificate which you can generate using Key Manager Plus itself. 1.1 Generating the certificate and getting it signed by third-party CAYou can generate a certificate and get it signed by a third party CA from Key Manager Plus interface itself. Refer to the detailed help to accomplish this task. a. Install the server certificate in the machine where SQL server is running. You may use MMC to do this as shown below:
b. Install the CA's root certificate in Key Manager Plus as follows:
1.2 Creating a self-signed certificateIf you want to create and use a self-signed certificate, you can do the same using Key Manager Plus. Refer to the detailed help to accomplish this task. Note: In the Certificate Name field, specify the FQDN of the SQL server After creating the certificate, follow the below steps to install it in the machine where the SQL server is running and the Key Manager Plus server. a. Install the server certificate in the machine where SQL server is running. You may use MMC to do this as shown below:
b. Install the server certificate in Key Manager Plus as follows:
2. Enable SSL Encryption in SQL ServerTo enable SSL for SQL Server,
For more details, refer to the section 'Configuring SSL for SQL Server' in Microsoft's knowledge base article available at http://msdn.microsoft.com/en-us/library/ms189067.aspx 3. Execute ChangeDB.bat in Key Manager PlusYou need to provide the details about the SQL server to Key Manager Plus by editing the file ChangeDB.bat (Windows) or ChangeDB.sh (Linux) Navigate to <Key Manager Plus Installation Folder>/bin folder and execute ChangeDB.bat (Windows) or sh ChangeDB.sh(Linux) In the window that opens up, enter the details:
Note:It is recommended to choose the option 'Windows' as the username and password used for authentication are not stored anywhere.
Note:The username and password entered here will be stored in database_params.conf file in Key Manager Plus. So, you need to take care of hardening the host. Here, you have the option to use even your Windows login credentials, if you are connecting to the database from Windows. In this case, you need to enter the username as <domain-name>\<username>
Important Note: For more details on encryption and key management in MS SQL, refer to this MSDN document http://msdn.microsoft.com/en-us/library/ms189586.aspx ©2025, Zoho Corporation Pvt. Ltd. All Rights Reserved. |