Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

SQL Server Grundlagen für den Teilzeit-DBA

Ähnliche Präsentationen


Präsentation zum Thema: "SQL Server Grundlagen für den Teilzeit-DBA"—  Präsentation transkript:

1 SQL Server Grundlagen für den Teilzeit-DBA
Microsoft TechNet Seminar 2006 SQL Server Grundlagen für den Teilzeit-DBA Steffen Krause Technical Evangelist Microsoft Seminar Name

2 Agenda Installation und Konfiguration Datenbanktools
Sichern/Wiederherstellen Wartungsaufgaben Hochverfügbarkeit Spezifisches zu Anwendungen

3 SQL Server Was ist das eigentlich alles?
Microsoft TechNet Seminar 2006 SQL Server Was ist das eigentlich alles? SQL Server Compact Mobile Datenhaltung Komplette Datenmanagement und Business Intelligence Plattform Skaliert von Desktop- bis zu Unternehmenslösungen und vom PDA bis zum 64-Bit High-End Rechenzentrum Bestes Preis-Leistungsverhältnis alle Komponenten und Werkzeuge enthalten günstigste Betriebskosten Kurze Implementierungszeiten Fulltext Engine Volltextsuche, Text Mining SOA Support XML, SOAP, Service Broker Reporting Services Berichtswesen Management-, Design- und Entwicklungs-Werkzeuge Client-Werkzeuge (Office, SharePoint) und Anwendungen Analysis Services OLAP & Data Mining Notification Services Notifications & Alerts Replication Services Daten-Synchronisierung Integration Services ETL/Datentransfer SQL Server Engine Relationale Datenbank Seminar Name

4 Was brauche ich? SQL Server Editionen
Express Kostenlos, max. DB-Größe 4GB, nur 32bit Workgroup Standard Enterprise Alle Features Evaluation Wie Enterprise, zeitlich beschränkt Kein Upgrade von/nach Evaluation möglich Installation einer Vollversion über Eval ist möglich Developer Wie Enterprise, lizenzrechtlich beschränkt Darf nicht für produktive Systeme eingesetzt werden Web Nur für Internet-Sites

5 Planung Hardwaresizing ist essenziell
IO und Hauptspeicher sind kritischste Faktoren Planungstools der Hardwarehersteller können helfen: Dell: HP:

6 Was brauche ich? - Hardware
… es kommt natürlich immer auf den Anwendungsfall an SQL Server sollte für Lastsysteme immer auf eigener Hardware laufen Hauptspeicher: Viel Noch mehr …wenn der gesamte aktive Teil der Datenbank in den Hauptspeicher passt reicht es aber Echter Hauptspeicher! -> 64bit bei >= 4GB Prozessor: meist überschätzt Lizenzierung ist pro Sockel! Multicore spart also richtig Geld

7 Was brauche ich? Platten
Die am häufigsten unterdimensionierte Komponente Kleine Trivialdatenbanken können auf c: bleiben Ansonsten Grundregeln: SQL Server Maschinen brauchen mindestens 3 Sätze Platten (physikalisch getrennte Platten!) Betriebssystem Daten Log Oft auch separate Platten für tempdb sinnvoll … und für lokales Backup

8 Was brauche ich? Plattenlayout - Daten
SQL Server Datenplatten machen Random IO Es geht also weder um Kapazität noch um Transferrate Es geht um IO Operationen pro Sekunde (IOPs) Dafür gibt es nur 2 Möglichkeiten (Schnelle) SSDs Viele Platten in einem RAID kleine, schnelle Platten RAID 10 ist meist gut, RAID 4/5/6 hat oft zu geringe zufällige Schreibrate SQL Server Log-Platten machen sequential writes Unbedingt von Daten trennen RAID 1 oft ausreichend, manchmal auch RAID 10 Nicht daran stören, dass Log-Platten fast leer sind

9 Einige Storageempfehlungen
Unbedingt Korrektheit & Performance messen Sqliosim: Korrektheit, sqlio: Performance Siehe Webcast „SQL Server Storage Performanceanalyse“ Volume Alignment mit diskpart.exe Automatisch bei Windows Server 2008 NTFS Allocation Size 64kB Bei SAN: unbedingt auf Anzahl der Platten in den einzelnen LUNs achten! HBA Queue Depth oft zu klein Kein Sharing der Disks mit irgendwas Lokale Plattenkäfige (DAS) oft günstiger als SAN Bei Virtualisierung: Keine dynamischen Disks verwenden! Siehe Whitepaper

10 Microsoft TechNet Seminar 2006
Installation Systemvoraussetzungen (.NET, Installer 4.5,…) können getrennt installiert werden Parallelinstallation mehrerer Instanzen möglich (SQL 2000 SP4, SQL 2005, SQL 2008) Aber wegen Kampf um Hauptspeicher und IO nicht für Lastsysteme empfohlen Nur die notwendigen Komponenten installieren: Seminar Name

11 Installation 2 Das SQL Server Dienstkonto sollte kein Administrator in Windows sein Sortierung Wenn nichts anderes von der Anwendung erwartet: Latin1_General_CI_AS Daten, Log und Backup-Verzeichnisse bei der Installation festlegen! Geht nur bei SQL Server 2008 Dienstkonto muss Schreibrechte haben Beispiel-Datenbanken und Codebeispiele sind in SQL 2008 NICHT mehr enthalten

12 Agenda Installation und Konfiguration Datenbanktools
Sichern/Wiederherstellen Wartungsaufgaben Hochverfügbarkeit Spezifisches zu Anwendungen

13 Management Studio SSMS 2008 kann auch SQL 2000 & 2005 verwalten (außer Analysis Services 2000) Integriertes Management Database Engine, Analysis Services, Reporting Services, SQL Server Mobile, Integration Services auch für ältere SQL Server Versionen (außer SSAS vor 2005) Server-Reports und Server-Dashboard Komfortable Editoren und Templates Integration in die Visual Studio-Umgebung Versionskontrolle, Teamsupport T-SQL Debugger in SSMS 2008 Verwaltung vieler Server und vieler Objekte Einfachste Durchführung von Routine-Aufgaben

14 Wie komme ich dahin? Configuration Manager
3 Teile: Dienstkonfiguration Startparameter, Trace Flags Systemverzeichnisse Dienstkonto nur hier ändern! Server-Netzwerkkonfiguration Aktivierte Protokolle (Express & Developer Standard nur lokal) Kommunikations-Verschlüsselung ohne und mit Zertifikat Client-Netzwerkkonfiguration Protokolle mit Reihenfolge Aliase, damit man später besser umziehen kann

15 Microsoft TechNet Seminar 2006
Weitere Tools Immer die Tools der neuesten installierten SQL Server Version verwenden! (Außer BIDS für Reporting Services) Sqlcmd – Kommandozeilenzugriff Kann mit „Dedicated Admin Connection“ auf ausgelasteten Server verbinden Profiler Überwachung der Datenbankaktivität Ereignisse sorgsam auswählen, kann sehr viel Last erzeugen Auf Testmaschine üben! Datenbank(modul)-Optimierungsratgeber Schlägt Indizes, Partitionierung u.a. auf Basis der DB-Last vor Nicht blind implementieren! Business Intelligence Development Studio (BIDS) Visual Studio mit Addins für Reporting, Analysis, Integration Services Seminar Name

16 Administrations-werkzeuge
3/28/2017 7:35 PM Administrations-werkzeuge demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Agenda Installation und Konfiguration Datenbanktools
Sichern/Wiederherstellen Wartungsaufgaben Hochverfügbarkeit Spezifisches zu Anwendungen

18 Sicherung und Wiederherstellung
Vor allem anderen: Haben Sie einen Notfallplan (im Detail) und testen sie ihn!

19 Sichern und Wiederherstellen Wiederherstellungsmodelle
Microsoft Solutioncenter Sichern und Wiederherstellen Wiederherstellungsmodelle Vollständig Alle schreibenden Operationen werden im Transaktionslog protokolliert Wiederherstellung zum aktuellen Zeitpunkt oder zu jedem beliebigen Zeitpunkt (point in time) Massenprotokolliert Bulk Copy (BCP), SELECT … INTO, CREATE INDEX, WRITETEXT, UPDATETEXT werden nur minimal im Transaktionslog protokolliert In Transaktionsprotokollsicherung Datenseiten dieser Vorgänge enthalten Kein Point in Time Restore Einfach Transaktionsprotokoll wird abgeschnitten, wenn Datenseiten geschrieben sind Massenprotokollierte Vorgänge minimal protokolliert Restore nur auf den Zeitpunkt der Sicherung SQL Server 2000 Überblick

20 Grundlagen der Sicherung
Vollständig und Massenprotokolliert: Sie müssen Log-Sicherungen machen Oft bis sehr oft! Hält Log klein Vollständige Kette von Log-Backups ist essentiell Einfach: Sie können keine Log-Sicherungen machen Datenbanken und Sicherungen haben auf allen Plattformen (x86, x64, IA64) dasselbe Format und sind austauschbar Sicherungen von alter Version können auf neuer Version wiederhergestellt werden z.B. Sicherung auf SQL Server 2000, Wiederherstellung auf SQL Server 2008 Nicht umgekehrt! Upgrade erfolgt beim Restore Sicherungen können immer auf höherwertigen Editionen wiederhergestellt werden Im Notfall Developer Edition für Restore verwenden

21 Best Practices Verwenden Sie immer Online-Backups
Ausnahme: Snapshot-Backups bestimmter SAN-Hersteller sind ebenso gut (VSS-Support) BACKUP hält keine Locks (Sperren), Transaktionen warten also nicht Verwenden Sie Datenbankwartungspläne oder UI + Script-Action zur Erstellung von Backup Jobs Lesen Sie Books Online vor dem Erstellen eines Backup-Plans und vor einem Restore Behalten Sie mehr als eine vollständige Sicherung (Großvater/Vater/Sohn Prinzip) Bei vollständig/massenprotokolliert + komplette Log-Sicherungen Master und msdb sichern!

22 Sichern Wiederherstellen
3/28/2017 7:35 PM Sichern Wiederherstellen demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 Agenda Installation und Konfiguration Datenbanktools
Sichern/Wiederherstellen Wartungsaufgaben Hochverfügbarkeit Spezifisches zu Anwendungen

24 Grundlegende Wartungsaufgaben
Dateigrößen überwachen Sichern und Überprüfung der Sicherung Überprüfung der Protokolle Windows-Ereignisanzeige SQL Server Protokolle Defragmentierung bzw. Neuerstellung der Indizes Ggf Statistiken aktualisieren Datenbankkonsistenz prüfen Performance optimieren Aber das ist ein anderes Thema Alle Änderungen dokumentieren

25 Der Wartungsplan Dein Freund und Helfer
Grafisches Tool im Management Studio Vereinfacht Standard-Wartungsaufgaben 2 Sichten Wartungsplan-Assistent Wartungplan-Editor Kann einfach mit Zeitplan versehen werden Bedingungen, Benachrichtigungen, weitere Schritte können im Wartungplan-Editor hinzugefügt werden

26 Datenbank-Wartungspläne
3/28/2017 7:35 PM Datenbank-Wartungspläne demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 Zusammenfassung Datenbankwartung
Shrink (verkleinern) nicht ausführen Weder im Wartungsplan noch sonst Statistiken aktuell halten Nicht jede Nacht Indizes neu erstellen Fragmentierung und ihre Effekte verstehen, Gründe beseitigen Sichern und Sicherungen prüfen Man hat keine Sicherung, solange man nicht sicher ist, sie wiederherstellen zu können Regelmäßig Konsistenzprüfungen ausführen um Hardwareprobleme zu erkennen Seitenprüfsummen einschalten

28 Microsoft TechNet Seminar 2006
Ressourcen Webcasts Blog Steffen Krause SQL Customer Advisory Team Books Online, aktuellste Version! Storage Design Whitepaper SharePoint und SQL User Group: SQLPASS Seminar Name

29 Your MSDN resources check out these websites, blogs & more!
3/28/2017 7:35 PM Your MSDN resources check out these websites, blogs & more! Presentations TechDays: MSDN Events: MSDN Webcasts: MSDN Events MSDN Events: Save the date: Tech•Ed 2009 Europe, 9-13 November 2009, Berlin MSDN Flash (our by weekly newsletter) Subscribe: MSDN Team Blog RSS: Developer User Groups & Communities Mobile Devices: Microsoft Solutions User Group Switzerland: .NET Managed User Group of Switzerland: FoxPro User Group Switzerland: © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 Your TechNet resources check out these websites, blogs & more!
3/28/2017 7:35 PM Your TechNet resources check out these websites, blogs & more! Presentations TechDays: TechNet Events TechNet Events: Save the date: Tech•Ed 2009 Europe, 9-13 November 2009, Berlin TechNet Flash (our by weekly newsletter) Subscribe: Schweizer IT Professional und TechNet Blog RSS: IT Professional User Groups & Communities SwissITPro User Group: NT Anwendergruppe Schweiz: PASS (Professional Association for SQL Server): © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

31 Save the date for tech·days next year!
3/28/2017 7:35 PM Save the date for tech·days next year! 7. – 8. April 2010 Congress Center Basel © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

32 Premium Sponsoring Partners
3/28/2017 7:35 PM Premium Sponsoring Partners Classic Sponsoring Partners Media Partner © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

33 3/28/2017 7:35 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Herunterladen ppt "SQL Server Grundlagen für den Teilzeit-DBA"

Ähnliche Präsentationen


Google-Anzeigen