

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Migrieren Sie mithilfe von AWS DMS eine Db2-Datenbank von Amazon EC2 zu Aurora MySQL-kompatibel
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms"></a>

*Pinesh Signal, Amazon Web Services*

## Zusammenfassung
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-summary"></a>

Nachdem Sie Ihre [IBM Db2 for LUW-Datenbank](https://www.ibm.com/docs/en/db2/11.5?topic=federation) zu [Amazon Elastic Compute Cloud (Amazon EC2)](https://docs.aws.amazon.com/ec2/) migriert haben, sollten Sie erwägen, die Datenbank neu zu strukturieren, indem Sie zu einer Cloud-nativen Amazon Web Services (AWS) -Datenbank wechseln. Dieses Muster behandelt die Migration einer IBM [Db2](https://www.ibm.com/docs/en/db2/11.5) for LUW-Datenbank, die auf einer [ EC2 Amazon-Instance ausgeführt wird, zu einer Amazon](https://docs.aws.amazon.com/ec2/) [Aurora MySQL-Compatible](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMySQL.html) Edition-Datenbank auf AWS.  

Das Muster beschreibt eine Online-Migrationsstrategie mit minimalen Ausfallzeiten für eine Db2-Quelldatenbank mit mehreren Terabyte und einer hohen Anzahl von Transaktionen. 

Dieses Muster verwendet das [AWS Schema Conversion Tool (AWS SCT)](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Welcome.html), um das Db2-Datenbankschema in ein Aurora MySQL-kompatibles Schema zu konvertieren. Anschließend verwendet das Muster den [AWS Database Migration Service (AWS DMS)](https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html), um Daten von der Db2-Datenbank in die Aurora MySQL-kompatible Datenbank zu migrieren. Für den Code, der nicht von AWS SCT konvertiert wurde, sind manuelle Konvertierungen erforderlich.

## Voraussetzungen und Einschränkungen
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-prereqs"></a>

**Voraussetzungen**
+ Ein aktives AWS-Konto mit einer Virtual Private Cloud (VPC)
+ AWS SCT
+ AWS DMS

**Produktversionen**
+ Aktuelle Version von AWS SCT
+ Db2 für Linux Version 11.1.4.4 und höher

## Architektur
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-architecture"></a>

**Quelltechnologie-Stack**
+ DB2/Linux x86-64 Bit ist auf einer Instanz gemountet EC2  

**Zieltechnologie-Stack**
+ Eine Amazon Aurora MySQL-kompatible Edition-Datenbank-Instance

**Quell- und Zielarchitektur**

Das folgende Diagramm zeigt die Datenmigrationsarchitektur zwischen der Db2-Quelle und den Aurora MySQL-kompatiblen Zieldatenbanken. Die Architektur in der AWS-Cloud umfasst eine Virtual Private Cloud (VPC) (Virtual Private Cloud), eine Availability Zone, ein öffentliches Subnetz für die Db2-Instance und die AWS DMS-Replikationsinstanz sowie ein privates Subnetz für die Aurora MySQL-kompatible Datenbank.

![\[Architektur der Datenmigration zwischen Quell-Db2 und Aurora MySQL-kompatiblen Zieldatenbanken.\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/images/pattern-img/5abfccc4-148c-4794-8d80-e3c122679125/images/f30664f8-2d6a-4448-8d5c-cff3988a52c7.png)


## Tools
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-tools"></a>

**AWS-Services**
+ [Amazon Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) ist eine vollständig verwaltete relationale Datenbank-Engine, die für die Cloud entwickelt wurde und mit MySQL und PostgreSQL kompatibel ist.
+ [AWS Database Migration Service (AWS DMS)](https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html) unterstützt Sie bei der Migration von Datenspeichern in die AWS-Cloud oder zwischen Kombinationen von Cloud- und lokalen Setups.
+ [Amazon Elastic Compute Cloud (Amazon EC2)](https://docs.aws.amazon.com/ec2/) bietet skalierbare Rechenkapazität in der AWS-Cloud. Sie können so viele virtuelle Server wie nötig nutzen und sie schnell nach oben oder unten skalieren.
+ Das [AWS Schema Conversion Tool (AWS SCT)](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Welcome.html) unterstützt heterogene Datenbankmigrationen, indem das Quelldatenbankschema und ein Großteil des benutzerdefinierten Codes automatisch in ein Format konvertiert werden, das mit der Zieldatenbank kompatibel ist. AWS SCT unterstützt als Quelle IBM Db2 für LUW-Versionen 9.1, 9.5, 9.7, 10.1, 10.5, 11.1 und 11.5.

## Best Practices
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-best-practices"></a>

Bewährte Methoden finden Sie unter [Bewährte Methoden für AWS Database Migration Service](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_BestPractices.html).

## Epen
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-epics"></a>

### Konfigurieren Sie die IBM Db2-Quelldatenbank
<a name="configure-the-source-ibm-db2-database"></a>


| Aufgabe | Description | Erforderliche Fähigkeiten | 
| --- | --- | --- | 
| Erstellen Sie die IBM Db2-Datenbank auf Amazon EC2. | Sie können eine IBM Db2-Datenbank auf einer EC2 Instance erstellen, indem Sie ein Amazon Machine Image (AMI) von AWS Marketplace verwenden oder indem Sie Db2-Software auf einer EC2 Instance installieren.Starten Sie eine EC2 Instance, indem Sie ein AMI für IBM Db2 auswählen (z. B. [IBM Db2 v11.5.7 RHEL 7.9](https://aws.amazon.com/marketplace/pp/prodview-aclrjj4hq2ols?sr=0-1&ref_=beagle&applicationId=AWS-EC2-Console)), das einer lokalen Datenbank ähnelt. | DBA, Allgemeines AWS | 
| Konfigurieren Sie Sicherheitsgruppen. | Konfigurieren Sie die eingehenden VPC-Sicherheitsgruppenregeln für SSH (Secure Shell) und TCP mit Port 22 bzw. 50000. | Allgemeines AWS | 
| Erstellen Sie die Datenbank-Instance. | Erstellen Sie eine neue Instanz (Benutzer) und Datenbank (Schema), oder verwenden Sie die `db2inst1` Standardinstanz und Beispieldatenbank.[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | DBA | 
| Vergewissern Sie sich, dass die Db2-DB-Instance verfügbar ist. | Verwenden Sie den Befehl, um zu bestätigen, dass die Db2-Datenbank-Instance betriebsbereit ist. `Db2pd -` | DBA | 

### Konfigurieren Sie die Aurora MySQL-kompatible Zieldatenbank
<a name="configure-the-target-aurora-mysql-compatible-database"></a>


| Aufgabe | Description | Erforderliche Fähigkeiten | 
| --- | --- | --- | 
| Erstellen Sie die Aurora MySQL-kompatible Datenbank. | Erstellen Sie eine Amazon Aurora Aurora-Datenbank mit MySQL-Kompatibilität aus dem AWS RDS-Service[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | DBA, Allgemeines AWS | 
| Konfigurieren Sie Sicherheitsgruppen. | Konfigurieren Sie die eingehenden Regeln der VPC-Sicherheitsgruppe für SSH- und TCP-Verbindungen. | Allgemeines AWS | 
| Vergewissern Sie sich, dass die Aurora-Datenbank verfügbar ist. | Gehen Sie wie folgt vor, um sicherzustellen, dass die Aurora MySQL-kompatible Datenbank betriebsbereit ist:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | DBA | 

### AWS SCT konfigurieren und ausführen
<a name="configure-and-run-aws-sct"></a>


| Aufgabe | Description | Erforderliche Fähigkeiten | 
| --- | --- | --- | 
| Installieren Sie AWS SCT. | Laden Sie die neueste Version von [AWS SCT herunter und installieren Sie sie](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Installing.html) (die aktuelle Version 1.0.628). | Allgemeines AWS | 
| Konfigurieren Sie AWS SCT. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | Allgemeines AWS | 
| Erstellen Sie ein AWS SCT-Projekt. | Erstellen Sie ein AWS SCT-Projekt und einen Bericht, der Db2 for LUW als Quell-DB-Engine und Aurora MySQL-kompatibel für die Ziel-DB-Engine verwendet.Informationen zu den Rechten, die für die Verbindung mit einer Db2 for LUW-Datenbank erforderlich sind, finden Sie unter [Verwenden von Db2 LUW als Quelle](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Source.DB2LUW.html) für AWS SCT. | Allgemeines AWS | 
| Validieren Sie die Objekte. | Wählen Sie **Schema laden** und validieren Sie die Objekte. Aktualisieren Sie alle falschen Objekte in der Zieldatenbank:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | DBA, Allgemeines AWS | 

### AWS DMS konfigurieren und ausführen
<a name="configure-and-run-aws-dms"></a>


| Aufgabe | Description | Erforderliche Fähigkeiten | 
| --- | --- | --- | 
| Erstellen Sie eine Replikationsinstanz. | Melden Sie sich bei der AWS-Managementkonsole an, navigieren Sie zum AWS DMS-Service und erstellen Sie eine Replikationsinstanz mit gültigen Einstellungen für die VPC-Sicherheitsgruppe, die Sie für die Quell- und Zieldatenbank konfiguriert haben. | Allgemeines AWS | 
| Endpunkte erstellen. | Erstellen Sie den Quellendpunkt für die Db2-Datenbank und den Zielendpunkt für die Aurora MySQL-kompatible Datenbank:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | Allgemeines AWS | 
| Erstellen Sie Migrationsaufgaben. | Erstellen Sie eine einzelne Migrationsaufgabe oder mehrere Migrationsaufgaben für Volllast und CDC- oder Datenvalidierung:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | Allgemeines AWS | 
| Planen Sie den Produktionslauf. | Bestätigen Sie Ausfallzeiten mit Stakeholdern wie Anwendungseigentümern, um AWS DMS in Produktionssystemen auszuführen. | Leiter der Migration | 
| Führen Sie die Migrationsaufgaben aus. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | Allgemeines AWS | 
| Validieren Sie die Daten. | Überprüfen Sie die Ergebnisse und Daten der Migrationsaufgaben in den DB2-Quelldatenbanken und den MySQL-Zieldatenbanken:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | DBA | 
| Stoppen Sie die Migrationsaufgaben. | Nachdem die Datenvalidierung erfolgreich abgeschlossen wurde, beenden Sie die Validierungsmigrationsaufgaben. | Allgemeines AWS | 

## Fehlerbehebung
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-troubleshooting"></a>


| Problem | Lösung | 
| --- | --- | 
| Die Quell- und Zieltestverbindungen von AWS SCT schlagen fehl. | Konfigurieren Sie JDBC-Treiberversionen und eingehende VPC-Sicherheitsgruppenregeln, um den eingehenden Datenverkehr zu akzeptieren. | 
| Der Testlauf für den Db2-Quellendpunkt schlägt fehl. | Konfigurieren Sie die zusätzliche Verbindungseinstellung`CurrentLSN=<scan>;`. | 
| Die AWSDMS Aufgabe kann keine Verbindung zur Db2-Quelle herstellen, und der folgende Fehler wird zurückgegeben.`database is recoverable if either or both of the database configuration parameters LOGARCHMETH1 and LOGARCHMETH2 are set to ON` | Führen Sie die folgenden Befehle aus, um den Fehler zu vermeiden:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/de_de/prescriptive-guidance/latest/patterns/migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms.html) | 

## Zugehörige Ressourcen
<a name="migrate-a-db2-database-from-amazon-ec2-to-aurora-mysql-compatible-by-using-aws-dms-resources"></a>

**Amazon EC2**
+ [Amazon EC2](https://aws.amazon.com/ec2/)
+ [ EC2 Amazon-Benutzerhandbücher](https://docs.aws.amazon.com/ec2/)

**Datenbanken**
+ [IBM Db2-Datenbank](https://www.ibm.com/products/db2-database)
+ [Amazon Aurora](https://aws.amazon.com/rds/aurora/)
+ [Arbeiten mit Amazon Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMySQL.html)

**AWS SCT**
+ [AWS-DMS-Schemakonvertierung](https://aws.amazon.com/dms/schema-conversion-tool/)
+ [Benutzerhandbuch für das AWS Schema Conversion Tool](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Welcome.html)
+ [Verwenden der AWS SCT-Benutzeroberfläche](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_UserInterface.html)
+ [IBM Db2 LUW als Quelle für AWS SCT verwenden](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Source.DB2LUW.html)

**AWS DMS**
+ [AWS Database Migration Service](https://aws.amazon.com/dms/)
+ [AWS Database Migration Service — Benutzerhandbuch](https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html)
+ [Quellen für die Datenmigration](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.html)
+ [Ziele für die Datenmigration](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.html)
+ [AWS Database Migration Service und AWS Schema Conversion Tool unterstützen jetzt IBM Db2 LUW als Quelle](https://aws.amazon.com/blogs/database/aws-database-migration-service-and-aws-schema-conversion-tool-now-support-ibm-db2-as-a-source/) (Blogbeitrag)
+ [Migrieren von Anwendungen, auf denen relationale Datenbanken ausgeführt werden, zu AWS](https://d1.awsstatic.com/whitepapers/Migration/migrating-applications-to-aws.pdf)