
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to change the Qlik Sense Enterprise on Windows PostgreSQL password
Jul 3, 2024 9:59:43 AM
Mar 8, 2023 9:12:59 AM
During installation, Qlik Sense Enterprise on Windows prompts you to choose a password for its PostgreSQL repository. This password can be changed. The process is split into three steps.
- 1. Changing the PostgreSQL password in the database
- 2. Changing the Connection String to QSR and QSMQ Database
- 3. Changing the Connection String for Micro-Services
1. Changing the PostgreSQL password in the database
- Download and install pgAdmin 4
- Connect to your Qlik Sense PostgreSQL database:
-
Host name/address: localhost (if the database has been installed on the local machine)
-
Port: 4432
-
Maintenance database (*): postgres
-
Username: postgres
-
Password: Your current password
(*) Note that the maintenance database name may differ if this was not a standard installation and changes were made during setup. Consult your configuration file if necessary.
-
- Right Click on the postgres database.
- Click Query Tool
- Copy the following queries into the Query Tool, replacing Example Password with your new password:
ALTER USER postgres WITH PASSWORD 'Example_Password';
ALTER USER qliksenserepository WITH PASSWORD 'Example_Password';
- Run the Query
This has changed the password in the database itself. We will now move on to modifying the connection strings used by the database.
2. Changing the Connection String to QSR and QSMQ Database
For this step, we will need the QlikSenseUtil stored in C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\.
It has to be repeated on all nodes.
- On the Qlik Sense central node, stop all services except the Qlik Sense Repository Database Service
- Open QlikSenseUtil
- Open the Connection String Editor and Read the current configuration. This decrypts the current data.
- Change the Password in the following two connectionStrings:
- QSR
- QSMQ
- Hit Save Value in config file encrypted
We have now changed the connection strings to the QSMQ database and the QSR database.
3. Changing the Connection String for Micro-Services
Qlik Sense has introduced micro-services, all of which will require to have their connection strings modified.
To make changing them easier, we have provided a Configure-Service.ps1 for each. They can be located in:
Always run PowerShell as administrator.
- C:\Program Files\Qlik\Sense\Licenses\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\NotifierService\install\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\AppDistributionService\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\HybridDeploymentService\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\MobilityRegistrarService\install\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\PrecedentsService\install\Configure-Service.ps1
- C:\Program Files\Qlik\Sense\NLAppSearch\install\Configure-Service.ps1
Depending on your version of Qlik Sense, the above list may not be complete. Review C:\Program Files\Qlik\Sense\ for any additional micro-service folders that include a Configure-Service.ps1. You can obtain a list of all relevant folders by running the following command in a command prompt: dir /s configure-service.ps1
To update your password using Configure-Service.ps1:
- Open an elevated Powershell and change the directory to (for example with the license service) C:\Program Files\Qlik\Sense\Licenses
- Run the Configure-Service.ps1 script as follows, providing the correct hostname and the new password:
.\Configure-Service.ps1 YourPostgresHostName 4432 qliksenserepository ExamplePassword
You may receive the following: WARNING: Skipping the database initialization. No superuser or password specified.
This is expected. It does not indicate that the password change has failed. - Repeat these steps for the remaining micro-services. Your PostgreSQL password has now been changed.
If you have not installed Qlik Sense in its default location or have upgraded PostgreSQL, the Configure-Service.ps1 script must be adjusted for each microservice.
Example for changing the install path:
Before:
[string]$senseInstallPath = "$env:ProgramFiles\Qlik\Sense"
After:
[string] $senseInstallPath = "D:\Program Files\Qlik\Sense",
Example for changing the PostgreSQL version:
Before:
[string]$postgresHome = "$senseInstallPath\Repository\PostgreSQL\9.6"
After:
[string]$postgresHome = "$senseInstallPath\Repository\PostgreSQL\12.5"
or
[string]$postgresHome = "$senseInstallPath\Repository\PostgreSQL\14"
Depending on the PostgreSQL version under C:\Program Files\Qlik\Sense\Repository\PostrgreSQL\
Micro-Services Alternative method:
The alternative is to find all the PowerShell files programmatically.
Note that in our example we assume the default install directory and the default port of 4432. You may need to adapt the script accordingly.
# Set the Installation Directory for Qlik Sense $installDir = 'C:\Program Files\Qlik\Sense\' # Specify the new password for the qliksenserepository account $password = 'MyNewPassword' $files = Get-ChildItem -Path $installDir -Include Configure-Service.ps1 -Recurse foreach ($file in $files) { $ScriptToRun=$($file.FullName) &$ScriptToRun localhost 4432 qliksenserepository $password }

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @khai let me look into this for you.
All the best,
Sonja

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @khai
The previous two users were engaged in support tickets. One is still under investigation, and one is resolved, though I believe the root causes of both differ.
As for your specific question:
Can you define what error besides the warning you are getting? I've checked with our subject matter experts, and the warning you received is expected for some of the services and should not lead to problems.
In the screenshot below is one warning (the one you received), which can be dismissed, and one error (caused by the script being run after the database had been upgraded using QPI), which is an actual error requiring action.
If you only receive the warning, can you clarify what other symptoms or errors are logged?
All the best,
Sonja
PS: I will be updating the article with this information as soon as possible.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sonja_Bauernfeind , I am changing the password before the QPI is installed, because the current password contain the restricted special characters. Noted, I have created a support case 00116779 with the error screenshots.
- « Previous
-
- 1
- 2
- Next »