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]