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](https://docs.cloud.google.com/sql/docs/sqlserver/create-manage-users.md.txt) 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.

   ```sql
   USE [master];
   GO

   GRANT VIEW SERVER STATE TO MIGRATION_USER;
   GO
   ```

   Replace <var translate="no">MIGRATION_USER</var> 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.

   ```sql
   USE [master];
   GO

   GRANT VIEW SERVER PERFORMANCE STATE TO MIGRATION_USER;
   GO
   ```

   Replace <var translate="no">MIGRATION_USER</var> with the name of the migration user account.
3. [Enable point-in-time recovery (PITR)](https://docs.cloud.google.com/sql/docs/sqlserver/backup-recovery/configure-pitr.md.txt) on your source instance.

## What's next

Continue with your migration. See
[Migration guide for Cloud SQL for SQL Server sources](https://docs.cloud.google.com/database-migration/docs/sqlserver/csql-sql-server-src-guide.md.txt).