Forum Discussion
PowerBI database server connection issue
Hi dcvman ,
Yes, you can set up a Power BI database server connection with both Encrypt=True and TrustServerCertificate=True—I’ve had to do this myself a few times, especially in dev/test environments. Here’s how you do it:
For Power BI Desktop: When you connect to your SQL Server, expand the “Advanced options” in the connection dialog. In the “Additional settings” box, enter: Encrypt=True;TrustServerCertificate=True
For Power BI Report Server: Open up the RSReportServer.config file (you’ll find this under something like C:\Program Files\Microsoft SQL Server\MSRSxx.<InstanceName>\Reporting Services\ReportServer). Look for the <ConnectionProperties> section. Set your connection string to include both: <ConnectString>Data Source=YOURSERVER;Initial Catalog=YOURDB;Encrypt=True;TrustServerCertificate=True</ConnectString>
Save the file and restart your report server service for changes to take effect.
If you get an error about the “target principal name,” it’s usually because the SQL certificate name doesn’t match the server name. Using TrustServerCertificate=True bypasses this, but again, best to fix your certs if you’re going to production.