Check the Database sample project that you can test on your end
The installer will browse the local servers on the machine where the installer is running.
For the selected server, the user can further browse for available databases. Finally, the user can test the database connection before moving forward with the installation.
If required, the database connection can be enforced.