Configure your source Cloud SQL for SQL Server instance

This page describes how to configure a Cloud SQL for SQL Server source for for continuous homogeneous SQL Server migrations.

In this migration path, Database Migration Service automatically handles all the required backup file exports to a Cloud Storage bucket when you migrate between two Cloud SQL for SQL Server instances.

To prepare your Cloud SQL for SQL Server instance for a homogeneous migration with Database Migration Service, do the following:

  1. Create a dedicated migration user account in your instance. See Create a user in the Cloud SQL documentation.
  2. Assign the necessary privileges to the dedicated migration user account. Run the following commands:

    SQL Server 2019 and earlier

    For SQL Server 2019 and earlier versions, grant the VIEW SERVER STATE permission.

    USE [master];
    GO
    
    GRANT VIEW SERVER STATE TO MIGRATION_USER;
    GO

    Replace MIGRATION_USER with the name of the migration user account.

    SQL Server 2022 and later

    For SQL Server 2022 and later versions, grant the VIEW SERVER STATE permission.

    USE [master];
    GO
    
    GRANT VIEW SERVER PERFORMANCE STATE TO MIGRATION_USER;
    GO

    Replace MIGRATION_USER with the name of the migration user account.

  3. Enable point-in-time recovery (PITR) on your source instance.

What's next

Continue with your migration. See Migration guide for Cloud SQL for SQL Server sources.