Tag: "performance"

SQL Server in Microsoft Azure: How to gain performance by flexibility and save costs at the same time

 SQL Server in Microsoft Azure: Wie man durch Flexibilität Leistung gewinnt und zugleich Kosten spart

(DE)
Diesmal widme ich mich erstmalig in einem Artikel den Thema Microsoft Azure.
(Microsoft.com: Was ist Microsoft Azure?)
Unter Microsoft Azure werden mittlerweile eine Unmenge an Diensten bereitgestellt, und einer davon ist das Hosting von virtuellen Machinen, in denen ein SQL Server Dienst läuft. Hierbei sprechen wir also von IaaS (Infrastructure as a Service).

- Hier wird dieses Service-Modell nähergehend erläutert und unter anderem auch dem PaaS-Ansatz gegenübergestellt:
Which Windows Azure Cloud Architecture? PaaS or IaaS?

Eine schöne gegenüberstellende Grafik findet sich in diesem Blog-Artikel:
Windows Azure IaaS vs. PaaS vs. SaaS

Nachdem man sich einmal entschieden hat, dass das Konzept IaaS für einen Teil der eigenen Umgebung Sinn macht, steht die Frage der Konfiguration der SQL Server Systeme an.
Hier werden in dem Azure Portal fertige Images angeboten, die gerade Einsteigern den Zugang erleichtern sollen.
- Tatsächlich kann man mit nur 7 Klicks einen Windows Server inklusive lizensierten SQL Server einrichten, wenn man eine Vorlage aus der Galerie verwendet.

(EN)
This is the first time that I am tackling Microsoft Azure in an article. (Microsoft.com: What is Microsoft Azure?)

A plethora of services is provided by Microsoft Azure by now, of which the hosting of virtual machines running on an SQL Server service is one. This is what we call IaaS (Infrastructure as a Service).

- Here, this service model will be explained in more detail and, among others, compared to the PaaS approach: Which Windows Azure Cloud Architecture? PaaS or IaaS?

- A nice comparative graph is available in this blog article:
Windows Azure IaaS vs. PaaS vs. SaaS

After determining that the concept IaaS makes sense for part of one’s own environment, the issue of the SQL Server Systems configuration will be next. In the Azure Portal ready-made images are available that will facilitate access especially for starters.
- In fact, with only 7 clicks it is possible to set up a Windows Server including a licensed SQL Server when using a template from the gallery

 

 

Für den produktiven Einsatz von SQL Server muss man sich jedoch etwas mehr Mühe geben, denn die Standard-Vorlagen enthalten nur eine Daten-Disk, und auf der liegt das Betriebssystem. – Dort möchte man seinen SQL Server aus mehreren Gründen nicht betreiben.
Neben Datenintegrität ist das die IO-Performance.

Microsoft stellt daher auch sogenannte „optimized“ Images -für entweder OLTP- oder OLAP-Szenarien zur Verfügung (Im Screenshot rot umrahmt), welche direkt mit 15 weiteren Data Disks kommen, was dann insgesamt 16 macht.

However, for the productive application of SQL Server some more efforts are required, as the standard templates merely contain a data disc in which the operating systems is located. – Yet there are several reasons as to why one should not run one’s SQL Server here: data integrity and IO performance.

Therefore, Microsoft also provides so-called “optimized” images – for OLTP or OLAP scenarios – (highlighted by red frame in the screenshot) that immediately come with 15 more data discs making a total of 16.

 

1) Variante 1, der „traditionelle Ansatz“ ist also: mehrere Data Disks und eine Maschine mit entsprechender Unterstützung/CPU-Power.

Die in diesem Fall 15 Daten Disks (neben der OS Disk) werden in 2 Storage Pools zu je 12 bzw. 3 Disks für SQL-Daten und SQL-Logs vorkonfiguriert.

Die maximalen IOPS hängen auch von den zur Verfügung stehenden CPU-Cores ab. Lineare Performance-Steigerungen sollte man auch nicht erwarten.

1) Option 1, the “traditional approach” hence is: several data discs and a machine with corresponding support/CPU power.

The 15 data discs (additionally to the OS disc) in this case are pre-configured for SQL data and SQL logs in 2 storage pools of 12 and 3 discs each.

The maximum IOPS also depend on the available CPU cores. One should not expect linear performance increases anyway.

Das Problem hierbei: Man verliert dabei fast jegliche Flexibilität.
Und zwar hinsichtlich der Ausbaustufe (Performance) und damit letztlich auch in der Preisgestaltung.
Denn um die insgesamt 16 Data Disks zu verwenden, muss man mindestens eine der 8-Core VM-Größen betreiben (A4, A7, A8, A9, D4, D13, D14, G3, G4 und G5), durchgängig.

Lediglich nach oben kann man Skalieren.
- Wer mehr als 16 zusätzliche Datenträger benötigt, muss eine VM mit 16 bzw. 32 Cores (G-Serie) einsetzen und erhält dann die Möglichkeit bis zu 32 bzw. 64 Data Disks neben der OS Disk einzusetzen.
Nach unten ist man dann auf jeden Fall preislich festgelegt.

The problem here is: You lose almost any flexibility, i.e. in terms of configuration level (performance) and ultimately also in terms of pricing.

Because in order to use the total of 16 data discs it is necessary to consistently operate one of the 8-core VM sizes (A4, A7, A8, A9, D4, D13, D14, G3, G4 and G5). It is only possible to scale upwards.

- If you need more than 16 additional data carriers you will have to apply a VM with 16 or 32 cores (G-series), which will enable you to apply up to 32 or 64 data discs besides the OS disc.
In terms of pricing, this will definitely set the limit downwards.

Damit dürfte das Ziel, Kosten durch Cloud-basierte Systeme zu sparen, jedoch schwieriger zu erreichen sein.
Die große Stärke des Cloud-basierten Ansatzes ist es aber, möglichst genau nur dann, wenn man eine bestimmte Leistung (oder Dienst) benötigt, diese anzufordern & zu erhalten, und wenn man sie nicht benötigt, diese auch nicht nutzlos „aktiviert“ zu belassen. Denn man bezahlt ja, was man „abonniert“, was hier nicht unbedingt auch das ist, was man wirklich nutzt.

Unser ideales System sollte also maximal skalierbar sein, und zwar sowohl nach oben und nach unten.

Wenn man sich einmal die Tabellen mit den derzeitigen (Stand 30.4.2015) virtuellen Maschinen und deren Performance-Kerngrößen vor Augen führt, wird es sicherlich klarer.
Es gibt derzeit 3 Serien auf dem Standard-Tier: A, D und G, wobei die G-Serie die mit der größten Power ist – und damit auch am teuersten.

This, however, makes it more difficult to reach the goal of saving costs through cloud-based systems.

Yet the great strength of the cloud-based approach is ideally only when requiring a specific performance (or service) to request and receive it, and when not needed, to not leave it idly “activated.” For you only pay for what you “subscribe” to, which in this case is not necessarily what you actually use.

Our ideal system, thus, should be maximally scalable, both upwards and downwards.

This will probably become clearer if you look at the charts with the current (status: 30 April 2015) virtual machines and their performance core sizes.

At the moment, the standard tier comprises 3 series: A, D and G, with the G-series being that of the greatest power – and hence the most expensive.

 

 

Zu sehen sind die Anzahl der dedizierten CPU-Cores, die Größe des Arbeitsspeichers, die Größe der Temp-Disk, und, ganz wichtig für die Skalierbarkeit: die Anzahl der maximal erlaubten Datenträger neben der OS-Disk selber.

Pro Datendisk erhält man bis zu 500 IOPS. Um mehr IOPS zu erhalten, benötigt man also mehr Data Disks – aber auch mehr CPU Cores.
Wenn man jedoch eine Maschine mit 16 Data Disks verwendet, kann man in Zeiten geringerer Auslastung kaum herunter-skalieren. Eine A2 beispielsweise für eine Art Minimal-Betrieb ist damit unerreichbar. Und wenn man noch mehr Data Disks benötigt um IO-Peaks abfangen zu können, schränkt man sich noch mehr ein und muss dauerhaft die teuersten Maschinen bezahlen.

You can see the number of dedicated CPU cores, the size of the working memory, the size of the temp disc, and, very important for the scalability: the number of the maximally permitted data carriers besides the OS disc itself.

Per data disc you get up to 500 IOPS. To receive more IOPS, thus, you need more data discs – but also more CPU cores. However, when using a machine with 16 data discs it will hardly be possible to scale downwards in times of low utilization rates. An A2, for example, will thus be unreachable for some kind of minimum operation. If you need more data discs to be able to accommodate IO peaks you will restrict yourself further and will have to continually pay for the most expensive machines.

Welche Alternativen gibt es? Wie kann man flexibel sein, um Kosten zu sparen, und gleichzeitig je nach Bedarf auf höhere Maschinen wechseln („Scale-Up“), und auf der anderen Seite nachts oder an Wochenenden seine Maschinen auf minimale CPU’s beschränkt („Scale-Down“).

Are there any alternatives? How to be flexible in order to save costs and at the same time switch to higher machines (“scale-up”) if necessary, and on the other hand restrict your machines to minimal CPUs during nighttime or on weekends (“scale-down”)?

2) Speichern der Data-Files direkt auf Azure Blob-Store

Der offensichtliche Vorteil ist hierbei, dass man keine Data-Disks benötigt – und die sind es, die die Skalierungsmöglichkeiten wesentlich beschränken. Anstelle der Data Disks werden die SQL Server Datenbankdateien direkt im Blob-Store gespeichert.

Die Datenbank-Erstellung kann dann so aussehen:

1) Saving data files directly on the Azure Blob Storage

The obvious advantage here is that data discs are not required – and these are what significantly limit scaling options. Instead of the data discs, the SQL Server database files are stored directly in the Blob storage.

The database creation can look something like this:

 

Diese Möglichkeit wird seit SQL Server 2014 unterstützt.
Hierbei erhält man ebenfalls pro File 500 IOPS, mit einem Limit von 20.000 je Storage Account, welches generell gilt.

Hier findet sich ein ausführliches Beispiel zur Einrichtung samt Code:
Create a SQL Server 2014 Database directly on Azure Blob storage with SQLXI

Der Nachteil bei dieser Variante ist in meinen Augen die Komplexität. Das Vorgehen mit Einrichtung der Shared Access Signature, die für den Zugriff auf den Blob-Container benötigt wird, ist nicht direkt trivial.

This option is supported since SQL Server 2014.
Here, too, you get 500 IOPS per file, with a general limit of 20.000 per storage account.

Here you can find a detailed example of the setup including a code:
Create a SQL Server 2014 Database directly on Azure Blob storage with SQLXI

The disadvantage of this option is, in my view, the complexity. The approach to creating the Shared Access Signature required for accessing the Blob container is not really trivial.

3) Speichern der Data-Files auf einer Azure Datei-Freigabe

Seit Mai letzten Jahres ist der Azure File-Service (Introducing Microsoft Azure File Service) als Vorschaufeature verfügbar.

Neben „echten“ Verzeichnissen unterstützt dieser Dienst auch Freigaben auf Basis von SMB 2.1.
Hier gibt es ein Maximum an 1000 IOPS pro Share. Das heißt ich benötige für dieselbe Menge an IOPS nur halb so viele Dateien wie für den Direkt-Zugriff auf Azure Blobs.
Wichtig ist, dass man zunächst das Preview-Feature für einen Storage-Account aktiviert hat.

3) Storing data files on an Azure File Share

Since May last year, the Azure file service (Introducing Microsoft Azure File Service) has been available as preview feature.

In addition to “real” directories, this service also supports releases on the basis of SMB 2.1.
Here we get a maximum of 1000 IOPS per share. I.e. for the same amount of IOPS only half as many files are required as for the direct access to Azure Blobs.
It is important to start by activating the preview feature for a storage account.

 

Danach erzeugt man per PowerShell die notwendigen Shares und verteilt seine Datenbank-Dateien darauf.

Next, you create the necessary shares per PowerShell and distribute your database files on them.

Auch hier gilt natürlich die Begrenzung auf die maximalen 20.000 IOPS je Storage Account. Aber der Zugriff ist in meinen Augen wesentlich einfacher.
Ein Nachteil dieser Variante ist, dass man dafür sorgen muss, dass der SQL Server Dienst erst startet, wenn die Freigaben über Netzwerk auch erreichbar sind.
Abseits von manchmal auftretenden Zugriffsproblemen, die sicherlich dem Preview-Stand geschuldet sind, ist diese Kombination in meinen Augen die am Einfachsten zu Administrierende, nachdem man sich einmal an einen automatisch gesteuerten verzögerten Dienst-Start gewöhnt hat.

Der Azure-File-Dienst wird zurzeit mit 50% Rabatt angeboten, und liegt damit rund 20% unter den Azure-Blob-Storage-Preisen.

A disadvantage of this option is that you have to make sure that the SQL Server service starts only when the shares are available via network.
Aside from occasionally occurring access problems that can probably be attributed to the preview status this combination, as I see it, is the easiest one to administrate – once you got used to the automatically controlled delayed service start. 

The Azure File service is currently offered with a 50% discount and is thus at around 20% below the Azure Blob storage prices.

Der Vorteil der beiden letzten Varianten liegt klar auf der Hand: man ist nicht an eine bestimmte Ausbaustufe des Systems gebunden, sondern kann zu bestimmten Zeiten seinen SQL Server auf einer Maschine mit weit mehr oder auch weit weniger CPU-Cores starten.

The advantage of the latter two options is evident: you are not bound to a particular configuration level of the system but you can start your SQL Server on a machine with far more or also far less CPU cores at certain times.

Ein Wort noch zum Transaktionsprotokoll:

Pro Datenbank gibt es nur eine Log-Datei (mehrere Log-Dateien würden sequentiell beschrieben werden und keinerlei Performance-Vorteile bringen). Dort bringen File-Shares direkt den Vorteil, anstelle von 500 IOPS 1000 IOPS zu liefern. Wenn das nicht ausreicht, bleibt leider nur der traditionelle Ansatz im Zusammenspiel mit Windows Server Storage Spaces: ein Striping aus mehreren Data-Disks für das Transaktionsprotokoll mit dem entsprechenden Skalierbarkeitsnachteil.

One final remark on the transaction log:

There is only one log file per database (several log files would be written to sequentially and not bring any performance advantages). There, the immediate benefit is that file shares deliver 1000 IOPS instead of 500 IOPS. If this is not sufficient, only the traditional approach combined with Windows Server Storage Spaces remains, unfortunately: striping of several data discs for the transaction log with the according scalability disadvantage.

Ich hoffe, ich konnte in diesem Artikel den für mich wichtigsten Vorteil des Cloud-basierten Ansatzes am Beispiel SQL Server etwas näherbringen. Sobald man sich einmal an das „Service-Konzept“ der Cloud gewöhnt hat, und traditionelle Denkmuster in der Form von „Ich benötige eine x-Core-Maschine“ hinter sich lassen kann, kann man durch das Kombinieren von verschiedenen Diensten, wie hier Virtuellen Maschinen und Dateidiensten, sehr kosten- und performance-effiziente Systeme bauen.

Und natürlich sind nicht immer IOPS das Maß der Dinge. Ich habe diese nur zur Vereinfachung über MB/sec gewählt und auch ohne auf die Request-Größe Rücksicht zu nehmen. Im Allgemeinen sind die Werte auf Basis von 4-K sequentiellen Lese-Requests zu verstehen. Das gilt aber für alle Speichermechanismen, die hier angesprochen wurden, und sollte daher zum Zwecke der Vergleichbarkeit ausreichen.

I hope this article made somewhat tangible what to me is the biggest advantage of the Cloud-based approach through the example of SQL Server.  As soon as you get used to the Cloud’s “service concept” and leave behind traditional thinking patterns like “I need an x-core machine” you can build very cost- and performance-efficient systems by combining different services, such as, as demonstrated above, virtual machines and file services.

Of course, IOPS are not always the ultimate performance indicator. I have chosen them over MB/sec for simplifying reasons alone and without taking into account the request-size. In general, the values are to be understood based on 4-K sequential reading requests. This applies to all storage mechanisms that have been addressed here and should therefore suffice for the purpose of comparability.

Wer Interesse hat, sich mit dem Thema noch mehr auseinanderzusetzen ist herzlich willkommen auf dem SQLSaturday Rheinland, einer 1-tägigen kostenfreien Konferenz für SQL Server am 13. Juni in Sankt Augustin.
Und am 12. Juni, also den Tag davor gibt es eine ebenso kostenfreie PreCon, „Hybrid IT Camp: Azure Szenarien & die eigene flexible Infrastruktur für jedermann“. (Short Link: http://bit.ly/sqlsat409hybridit), die ich zusammen mit Patrick Heyde von Microsoft (Blog/Twitter) durchführe.

Those who are interested in further dealing with this topic are welcome to join the free one-day SQL Server conference SQLSaturday Rheinland on 13 June in Sankt Augustin.

On 12 June, the day before, there will also be a free PreCon, Hybrid IT Camp: Azure Szenarien & die eigene flexible Infrastruktur für jedermann (“Azure scenarios & individual, flexible infrastructures for everybody”) (Short Link: http://bit.ly/sqlsat409hybridit), which I will be running with Patrick Heyde (Blog/Twitter) from Microsoft.

Hier noch eine Liste an weiterführenden Links:

Below is a list for further reading:

 Have fun on Azure cloud

 Andreas

PS: Noch ein explizites Dankeschön an Patrick Heyde für seine wertvollen Tipps und Mentoring in Microsoft Azure – auch ich musste mich ja erst einmal an eine neue Denkweise gewöhnen :-)

P.S.: A big “thank you” goes to Patrick Heyde for his valuable tips and mentoring in Microsoft Azure – I, too, had to get used to a new way of thinking :-)

Performance/ Management Data Warehouse Data Collector & AlwaysOn Availability Groups

Verwaltungs-Data Warehouse Datensammler & AlwaysOn Hochverfügbarkeitsgruppen

(EN)
This time, we are dealing with the „MDW“, short for Management Data Warehouse,(msdn.microsoft.com/en-us/library/bb677306.aspx), which I like to recommend as a minimal performance logging-approach.

From time to time, and most recently in the context of my PASS Essential „SQL Server Analysis tools & Techniques for Performance und general Monitoring“, the question arises as to whether the MDW operates together with the High Availability technologies Database Mirroring and AlwaysOn Availability Groups, and if so, how so.

(DE)
Diesmal geht es um das Management Data Warehouse, kurz „MDW“ (msdn.microsoft.com/de-de/library/bb677306.aspx), welches ich gerne als minimalen Performance-Protokollierungs-Ansatz empfehle.

Hin und wieder, zuletzt im Zusammenhang mit meinem PASS Essential „SQL Server Analysetools & Techniken für Performance und allg. Monitoring“ kommt die Frage auf, ob das MDW mit den Hochverfügbarkeitstechnologien Datenbankspiegelung und AlwaysOn Hochverfügbarkeitsgruppen zusammenspielt, und wenn, wie.

The short answer is: Yes, it does.
The MDW operates both with Database Mirroring as well as with AlwaysOn Availability Groups.

The following graph illustrates a possible setup using the latter:

Die kurze Antwort lautet: Ja.
Das MDW funktioniert sowohl mit Datenbankspiegelung als auch mit den AlwaysOn Hochverfügbarkeitsgruppen.

Das folgende Schaubild zeigt ein mögliches Setup unter Verwendung der letzteren Variante:

 

 

 

The server (0) holding the MDW database is located outside of the high availability nodes. The databases to be monitored are located in the AlwaysOn Availability Groups in the servers 1-3.
Keeping the MDW highly available is not the objective. It is simply about being able to see the performance data of all databases, no matter in which server they are active at the moment.

Der Server (0), der die MDW-Datenbank vorhält, liegt außerhalb der Hochverfügbarkeitsknoten. Die zu überwachenden Datenbanken liegen in AlwaysOn Hochverfügbarkeitsgruppen auf den Servern 1-3.
Das MDW hochverfügbar zu halten ist nicht das Ziel. Es geht nur darum, die Performance-Daten aller Datenbanken einsehen zu können, gleich auf welchem Server sie gerade aktiv sind.

Part 1: Databases in secondary role

If you set up the MDW as standard you will realize that after a failover, the data of the respective databases disappear from the “Disc Usage” reports of the server, while these were previously still present in the primary role.

The background to this is that after a failover, the respective databases now are present in a different server in the primary role, and now are no longer readable in the secondary, in the standard setting.

In this moment, the System Data Collection Set “Disc Usage”, or the underlying job “collection_set_1_noncached_collect_and_upload” cannot collect data for this database. In contrast on the new primary node these database will now reappear as long as they are active in the primary role there. In principle, this behavior is comprehensible: The Data Collector can no longer find any information on this database and assumes that the latter is no longer relevant – as if it was deleted. One may certainly wish for a possibility of intervention here; however, the MDW is currently not flexible in this regard.

The new report “Transaction Performance Analysis Overview” which is enriched through the newly existent “Transaction Performance Collection Set” in SQL Server 2014 also displays data for no longer active databases.

Having clarified this background, the possible solution is self-evident: The databases must remain readable.

With AlwaysOn High Availability Groups, this is in principal easily done:

Part 1: Datenbanken in Secondary-Rolle

Wenn man nun das MDW standardmäßig einrichtet, wird man feststellen, dass nach einem Failover die Daten der jeweiligen Datenbanken aus den „Disk Usage“-Berichten des Servers verschwinden, wo diese bis zuvor noch in der Primary-Role vorlagen.

Hintergrund ist, dass nach einem Failover die jeweiligen Datenbanken nun auf einem anderen Server in der Primary-Role vorliegen, und auf dem nun Secondary, in der Standardeinstellung nicht lesbar sind.

In diesem Moment kann das System Data Collection Set „Disk Usage“, bzw. der dahinterliegende Job „collection_set_1_noncached_collect_and_upload“ zu dieser Datenbank keine Daten auslesen. Auf dem neuen Primary-Knoten hingegen werden diese Datenbanken nun neu erscheinen, solange sie dort in der primären Rolle aktiv sind.

Prinzipiell ist dieses Verhalten nachvollziehbar: Der Data Collector kann keine Informationen zu dieser Datenbank mehr finden und geht davon aus, dass diese nicht mehr relevant ist – als ob sie gelöscht sei. Sicherlich kann man sich hier eine Eingriffsmöglichkeit wünschen, derzeit ist das MDW aber in dieser Hinsicht nicht flexibel.
- Der neue Bericht „Transaction Performance Analysis Overview“, der über das neu im SQL Server 2014 existierende „Transaction Performance Collection Set“ angereichert wird, zeigt auch Daten für bereits nicht mehr aktive Datenbanken an.

Wenn nun dieser Hintergrund klar ist, liegt die mögliche Lösung nahe: Die Datenbanken müssen lesbar bleiben.
Mit AlwaysOn Hochverfügbarkeitsgruppen (Availability Groups) ist das prinzipiell auch leicht gemacht:

 

 

However, one needs to be aware of the fact that these databases are now released for all reading access – which should be taken into consideration in respect to application architecture, performance as well as in terms of license. Hence, for the purpose of data collection for performance evaluation alone I CANNOT recommend it.

If however the business applications are supposed to maintain reading access to the secondary point anyway, the data collector is covered with this as well.

One more advice: The setting “Read-Intent only” unfortunately does not work with the MDW since one cannot manually adapt the Connection String accordingly.
Database Mirroring does not support this option at all.

Jedoch muss man sich hierüber im Klaren sein, dass diese Datenbanken nun für sämtliche Lesezugriffe freigegeben sind, was sowohl hinsichtlich Applikationsarchitektur, Performance als auch Lizenztechnisch genau bedacht werden sollte. Allein zum Zweck der Datensammlung zu Performance-Auswertung kann ich das also NICHT empfehlen.
Wenn die Geschäftsanwendungen aber ohnehin Lesezugriffe auf den Sekundärknoten erhalten sollen, dann ist damit der Datensammler ebenfalls abgedeckt.
Noch ein Hinweis: Die Einstellung „Read-Intent only“ funktioniert mit dem MDW bisher leider nicht, da man den Connection String nicht entsprechend manuell anpassen kann.
Datenbankspiegelung unterstützt diese Option gar nicht.

Part 2: Configuration of the MDW-Clients

Since the databases run on a different node after a failover, the MDW reports must be set up in all servers in which the Availability Group is running. Here, one needs to ensure that access to the central MDW-Server is possible from all servers.

To do this (before SQL Server 2014) the SQL Server Agent Account of the client-instance must be included in the mdw_writer role on the MDW-Server (mdw_admin is not necessary) when configuring the MDW through the “Configure Management Data Warehouse Wizard:

Part 2: Konfiguration der MDW-Clients

Da die Datenbanken nach einem Failover auf einem anderen Knoten laufen, müssen die MDW-Berichte auf allen Servern, auf denen die Availability Group läuft, eingerichtet werden.

Dabei muss sichergestellt werden, dass von allen Servern auf den zentralen MDW-Server zugegriffen werden kann.

Dazu muss (vor SQL Server 2014) bei der Konfiguration des MDW über den „Configure Management Data Warehouse Wizard“ der SQL Server Agent Account der Client-Instanz auf dem MDW-Server in die mdw_writer-Rolle aufgenommen werden (mdw_admin ist nicht notwendig):

 

 

 

 

From SQL Server 2014, at the configuration of the data collection in the client, it is possible to provide a SQL Server Agent Proxy of the type “Operating System (CmdExec)” as account for the access to the central MDW-Server:

Ab SQL Server 2014 kann man bei der Konfiguration der Data Collection auf dem Client einen SQL Server Agent Proxy vom Typ „Operating System (CmdExec)“ als Konto für den Zugriff auf den zentralen MDW-Server hinterlegen:

 

 

 

In this case, it is of course required to authorize the underlying Windows account in the server, instead of the agent itself, as „mdw-writer“.

In diesem Fall muss auf dem Server natürlich der dahinterstehende Windows-Account anstelle des Agents selber als „mdw_writer“ berechtigt werden.

As soon as all clients are authorized accordingly, one can read the data of all SQL Server AG nodes in the central management server. Depending on which server a database is currently present in in the primary role, it will then appear in the according subreport.
- This proceeding also works with mirrored databases in Database Mirroring scenarios – there one can only have one “partner instance” though.

Sobald alle Clients entsprechend berechtigt sind, kann man auf dem zentralen Management Server die Daten aller SQL Server Knoten der AG auslesen. Je nachdem auf welchem Server eine Datenbank gerade in der Primary-Rolle vorliegt, erscheint diese dann in dem entsprechenden Subreport.
- Diese Vorgehensweise funktioniert auch mit gespiegelten Datenbanken bei Datenbankspiegelungs-Szenarien – dort gibt es jedoch maximal eine „Partner-Instanz“.

 

 

 

 

 Happy collecting

 

Andreas