Linking instances in a cluster

  • 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?

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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

  • Lowell - Thursday, July 13, 2017 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?

    I apologize. I should have included that in my question. We use WSFC with shared storage for our clusters. Thanks for responding.RT

  • John Mitchell-245523 - Thursday, July 13, 2017 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

    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

  • 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

  • John Mitchell-245523 - Friday, July 14, 2017 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

    Building a dashboard with reporting services would work well. Thanks for you response

  • robert_turner_dba - Thursday, July 13, 2017 1:50 PM

    John Mitchell-245523 - Thursday, July 13, 2017 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

    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