Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird beschrieben, wie Sie prüfen können, ob Ihre migrierten Daten vollständig und korrekt sind. Prüfen Sie mindestens, ob Ihre Tabellen in der migrierten Cloud SQL for SQL Server-Datenbankinstanz vorhanden sind.
Stellen Sie eine Verbindung zu Ihrer Cloud SQL for SQL Server-Instanz mit einem Tool her, mit dem Sie SQL-Befehle für Ihre migrierten Datenbanken ausführen können.
Weitere Informationen zum Herstellen einer Verbindung zu Cloud SQL-Instanzen finden Sie in der Cloud SQL-Dokumentation unter Verbindungsoptionen.
Führen Sie SQL-Befehle aus, um die migrierten Daten zu überprüfen. Beispiel:
Alle Datenbanken auflisten
Führen Sie den folgenden Befehl aus, um zu prüfen, ob die Ziel-Cloud SQL for SQL Server-Datenbank alle Quelldatenbanken enthält, die Sie migrieren möchten:
EXECsp_databases;GO
Alle Tabellen in einer Datenbank auflisten
Führen Sie die folgenden Befehle aus, um zu prüfen, ob Ihre migrierte Datenbank alle erforderlichen Tabellen enthält:
So verwenden Sie eine bestimmte Datenbank:
USEDATABASE_NAME;GO
Listen Sie alle Tabellen in der Datenbank auf:
SELECT*FROMinformation_schema.tables;
Tabelleninhalt und -definitionen prüfen
Führen Sie die folgenden Befehle aus, um die Richtigkeit einer bestimmten migrierten Tabelle zu prüfen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[[["\u003cp\u003eThis guide helps verify the completeness and accuracy of migrated data in Cloud SQL for SQL Server.\u003c/p\u003e\n"],["\u003cp\u003eYou can connect to your Cloud SQL instance using tools capable of running SQL commands.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003eEXEC sp_databases;\u003c/code\u003e command to confirm that all intended databases have been migrated.\u003c/p\u003e\n"],["\u003cp\u003eUtilize \u003ccode\u003eUSE DATABASE_NAME;\u003c/code\u003e and \u003ccode\u003eSELECT * FROM information_schema.tables;\u003c/code\u003e to verify the presence of all required tables within a specific database.\u003c/p\u003e\n"],["\u003cp\u003eCheck table definitions with \u003ccode\u003eEXEC sp_help 'dbo.TABLE_NAME';\u003c/code\u003e and verify table contents using \u003ccode\u003eSELECT * FROM TABLE_NAME;\u003c/code\u003e to ensure the correctness of migrated tables.\u003c/p\u003e\n"]]],[],null,["# Verify a migration\n\nThis page describes how to confirm that your migrated data is complete and\naccurate. At a minimum, you should verify that your tables exist in the\nmigrated Cloud SQL for SQL Server databases instance.\n\n1. Connect to your Cloud SQL for SQL Server instance with a tool where you can run SQL commands against your migrated databases. For more information on connecting to Cloud SQL instances, see\n [Connection options](/sql/docs/sqlserver/connect-overview#tools_for_connecting_to)\n in Cloud SQL documentation.\n\n2. Run SQL commands to verify your migrated data. For example:\n\n #### List all databases\n\n Run the following command to verify if your destination Cloud SQL for SQL Server\n contains all the source databases you wanted to migrate: \n\n ```sql\n EXEC sp_databases;\n GO\n ```\n\n #### List all tables in a database\n\n Run the following commands to check if your migrated database\n contains all the necessary tables:\n 1. Start using a specific database: \n\n ```sql\n USE DATABASE_NAME;\n GO\n ```\n 2. List all tables in the database: \n\n ```sql\n SELECT * FROM information_schema.tables;\n ```\n\n #### Check table content and definitions\n\n Run the following commands to verify the correctness of a specific\n migrated table:\n 1. Start using a specific database: \n\n ```sql\n USE DATABASE_NAME;\n GO\n ```\n 2. View the table definition: \n\n ```sql\n EXEC sp_help 'dbo.\u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e';\n ```\n 3. Verify the table contents: \n\n ```sql\n SELECT * FROM TABLE_NAME';\n GO\n ```"]]