question

Mitch-Perez avatar image
Mitch-Perez asked

Linked Servers Connectivity in SSRS Reporting

I won't pretend to be an expert in T-SQL far from it but its my willingness to learn. I have a linked server script which till now has worked very well and the views I have created have been part of the SSRS Reports. However on Friday a Server was decommissioned so a set of reports all failed because it was relying on that server to be there, so I have to take out that server and recompile the report.

It would have been better to construct a logical linked server as an example here I have two server, but how would I create some logic to this so the reports don't break?

SELECT[ServerName]

,[name]

,[FileType]

,[PhysicalFile]

,[OnlineStatus]

,[FileSize]

,[SizeInBytes]

FROM [Server_A].[DBA].[dbo].[Top_20_SQL_Databases]

UNION ALL

SELECT[ServerName]

,[name]

,[FileType]

,[PhysicalFile]

,[OnlineStatus]

,[FileSize]

,[SizeInBytes]

FROM [Server_B].[DBA].[dbo].[Top_20_SQL_Databases]

linked server
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.