Verify a migration

This page describes how to confirm that your migrated data is complete and accurate. At a minimum, you should verify that your tables exist in the migrated Cloud SQL for SQL Server databases instance.

  1. 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 Connection options in Cloud SQL documentation.

  2. Run SQL commands to verify your migrated data. For example:

    List all databases

    Run the following command to verify if your destination Cloud SQL for SQL Server contains all the source databases you wanted to migrate:

    EXEC sp_databases;
    GO
    

    List all tables in a database

    Run the following commands to check if your migrated database contains all the necessary tables:

    1. Start using a specific database:
      USE DATABASE_NAME;
      GO
      
    2. List all tables in the database:
      SELECT * FROM information_schema.tables;
      

    Check table content and definitions

    Run the following commands to verify the correctness of a specific migrated table:

    1. Start using a specific database:
      USE DATABASE_NAME;
      GO
      
    2. View the table definition:
      EXEC sp_help 'dbo.TABLE_NAME';
      
    3. Verify the table contents:
      SELECT * FROM TABLE_NAME';
      GO