question

DSPatrick avatar image
0 Votes"
DSPatrick asked DSPatrick answered

SSRS report with mirrored data source

I have an SSRS report server running on SQL Server 2016. There is a report that has a shared data source connection to another SQL server. Report works fine, no issues. They plan to setup mirroring on this data source so I'll add the Failover Partner to the shared source connection string. Just to be clear the report server itself will not be mirrored.


I was wondering if there's a simple method to display on my report at runtime the server name it connected to? Just wanting to be able to see on report did I connect to Primary or to Mirror?


sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered

Hi @DSPatrick,

I could only find a way to meet your needs and it will show the server name in the report. In other words, you need to modify the report.

1.Create a new dataset in the report with

SELECT @@SERVERNAME AS ServerName

2.Add the field to the report like shown.

33828-screenshot-2020-10-21-114130.jpg

And then you may see which server has been connected.



Regards,

Zoe


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered ZoeHui-MSFT commented

Thank you. I'll be testing this shortly. I didn't have a mirror to test with so I set it all up today and will test this in the next day or two.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your reply. Hope it'll work.

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered

This is going to work perfectly. Thanks for your assistance.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.