July 13, 2017 at 8:21 am
I need to write a query against multiple instances in my cluster. If I link the instances will it affect the cluster?
Is there a PowerShell Solution to accomplish the same result?
July 13, 2017 at 8:27 am
Robert, are you talking about each Server in an Always On Availability Group, or a Windows Server Failover Cluster with shared storage and a cluster aware SQL instance?
You can create linked servers to each SQL instance, so you can query things in master or something, is that what you want?
do you think that the replicated data in an Always On Availability Group is different between servers?
Lowell
July 13, 2017 at 8:29 am
You can use sqlcmd or Powershell, or you can register the instances in their own group and connect to them all at the same time to run the query. I'm not sure what you mean by linking the instances?
John
July 13, 2017 at 1:45 pm
Lowell - Thursday, July 13, 2017 8:27 AMRobert, are you talking about each Server in an Always On Availability Group, or a Windows Server Failover Cluster with shared storage and a cluster aware SQL instance?You can create linked servers to each SQL instance, so you can query things in master or something, is that what you want?
do you think that the replicated data in an Always On Availability Group is different between servers?
I apologize. I should have included that in my question. We use WSFC with shared storage for our clusters. Thanks for responding.RT
July 13, 2017 at 1:50 pm
John Mitchell-245523 - Thursday, July 13, 2017 8:29 AMYou can use sqlcmd or Powershell, or you can register the instances in their own group and connect to them all at the same time to run the query. I'm not sure what you mean by linking the instances?John
I want to write queries that use databases from multiple instances in the cluster and use SQL Mail to send out reports. I have a PowerShell script that I have pieced together that gets my data out into text files that I can attach but I would prefer the data to be presented in an E mail with a nice HTML table.
Thanks for responding.
RT
July 14, 2017 at 6:28 am
Have you considered Reporting Services? One report can use multiple sources, and you can create a subscription to send it out by e-mail.
John
July 14, 2017 at 8:27 am
John Mitchell-245523 - Friday, July 14, 2017 6:28 AMHave you considered Reporting Services? One report can use multiple sources, and you can create a subscription to send it out by e-mail.John
Building a dashboard with reporting services would work well. Thanks for you response
July 14, 2017 at 12:31 pm
robert_turner_dba - Thursday, July 13, 2017 1:50 PMJohn Mitchell-245523 - Thursday, July 13, 2017 8:29 AMYou can use sqlcmd or Powershell, or you can register the instances in their own group and connect to them all at the same time to run the query. I'm not sure what you mean by linking the instances?John
I want to write queries that use databases from multiple instances in the cluster and use SQL Mail to send out reports. I have a PowerShell script that I have pieced together that gets my data out into text files that I can attach but I would prefer the data to be presented in an E mail with a nice HTML table.
Thanks for responding.
RT
You can use Powershell to send email with formatted HTML tables - in fact it is probably easier to do that in Powershell than it is to do it in SQL. SSRS is also a good choice because you can get formatted reports that the users just run as needed.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply