이 페이지에서는 Database Migration Service를 사용하여 SQL Server 데이터베이스를 SQL Server용 Cloud SQL 인스턴스로 마이그레이션하는 방법을 설명합니다.
마이그레이션 프로세스에는 다음 작업이 포함됩니다.
소스 SQL Server 인스턴스에서 전체 데이터베이스 백업 및 트랜잭션 로그 파일을 내보냅니다.
마이그레이션 프로세스에서 선택적 차등 데이터베이스 백업을 사용할 수도 있습니다.
백업 파일을 Cloud Storage 버킷에 업로드합니다.
대상 SQL Server용 Cloud SQL 인스턴스를 만듭니다.
Database Migration Service에서 마이그레이션 작업을 만들고 실행합니다.d
Database Migration Service 관찰 가능성 기능으로 마이그레이션 작업 진행률 모니터링
데이터가 완전히 마이그레이션된 후에 마이그레이션 작업을 승격합니다.
비용
Cloud SQL로의 동종 마이그레이션의 경우 Database Migration Service가 추가 비용 없이 제공됩니다. 하지만 Cloud SQL 및 Cloud Storage 가격은 네트워크 요금뿐만 아니라 마이그레이션 목적으로 생성된 Cloud SQL 및 Cloud Storage 항목에도 적용됩니다.
이 문서에서는 비용이 청구될 수 있는 다음과 같은Google Cloud구성요소를 사용합니다.
대상 데이터베이스를 만들 리전을 고려합니다.
Database Migration Service는 완전히 지역화된 제품이므로 마이그레이션과 관련된 모든 항목 (소스 및 대상 연결 프로필, 마이그레이션 작업, 대상 데이터베이스, 스토리지 버킷)을 단일 리전에 저장해야 합니다.
마이그레이션 작업을 시작하면 대상 SQL Server용 Cloud SQL 데이터베이스가 복구 모드로 전환되며 이 모드에서는 Database Migration Service에서 완전히 관리합니다. 데이터가 완전히 마이그레이션되면 대상 인스턴스를 승격할 수 있습니다. 대상 인스턴스가 승격되면 해당 인스턴스의 모든 데이터베이스가 완전히 작동하게 됩니다. 또한 이러한 데이터베이스에 대한 전체 쓰기 액세스 권한도 얻게 됩니다.
Database Migration Service 관찰 가능성 기능을 사용하여 이전 진행 상황과 대상 인스턴스 상태를 모니터링할 수 있습니다.
이전 작업 측정항목을 참고하세요.
새 트랜잭션 로그 백업 파일을 Cloud Storage 버킷에 계속 업로드합니다.
전체 백업 내보내기를 실행한 후 소스 데이터베이스에 표시되는 데이터를 처리하려면
거래 로그 백업 파일을 내보내고 저장소 버킷에 업로드합니다. Database Migration Service는 새 파일을 자동으로 감지하고 콘텐츠를 읽은 후 데이터를 대상 인스턴스로 푸시합니다.
거래 로그 내보내기 자동화를 참고하세요.
마이그레이션 완료
애플리케이션을 새 SQL Server용 Cloud SQL 인스턴스로 전환하기로 결정한 경우 다음 단계에 따라 마이그레이션을 완료하세요.
소스 데이터베이스의 모든 쓰기 작업을 중지합니다. 읽기 전용 모드로 전환하여 운영 기능을 유지할 수 있습니다.
마지막 트랜잭션 로그 백업을 수행하고 파일을 스토리지 버킷에 업로드한 후 Database Migration Service에서 점진적 로드 단계를 중지합니다.
다음 작업 중 하나를 실행하여 이 결과를 얻을 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[[["\u003cp\u003eThis guide outlines the process of migrating SQL Server databases to Cloud SQL for SQL Server using Database Migration Service, involving exporting backups, uploading them to Cloud Storage, creating a destination instance, and running a migration job.\u003c/p\u003e\n"],["\u003cp\u003eThe migration process requires specific IAM roles for both the user account performing the migration and the Database Migration Service account, such as Database Migration Admin, Storage Admin, and Cloud SQL Editor, to ensure proper permissions.\u003c/p\u003e\n"],["\u003cp\u003ePreparing for the migration involves performing full backups of the source SQL Server database, configuring a Cloud Storage bucket for backup files, and establishing connection profiles for both the source and destination.\u003c/p\u003e\n"],["\u003cp\u003eDatabase Migration Service offers cost-effective homogenous migrations at no additional charge, but users should be aware of the costs associated with Cloud SQL and Cloud Storage usage, as well as potential network charges.\u003c/p\u003e\n"],["\u003cp\u003eFinalizing the migration includes stopping write operations on the source database, taking and uploading the last transaction log backup, stopping the incremental load, and promoting the migration job to switch to the new Cloud SQL for SQL Server instance.\u003c/p\u003e\n"]]],[],null,["# Migrate your SQL Server databases to Cloud SQL for SQL Server\n\nThis page describes how to migrate your SQL Server databases to\nCloud SQL for SQL Server instance with Database Migration Service.\n\nThe migration process involves the following tasks:\n\n1. Exporting full database backup, and transaction\n log files from the source SQL Server instance.\n\n You can also use the optional differential database backup in your migration\n process.\n2. Uploading your backup files to a Cloud Storage bucket.\n\n3. Creating the destination Cloud SQL for SQL Server instance.\n\n4. Creating and running the migration job in Database Migration Service.\n\n5. Monitoring the migration job progress with Database Migration Service observability\n features.\n\n6. Promoting the migration job after the data is fully migrated.\n\nCosts\n-----\n\nFor homogenous migrations to Cloud SQL, Database Migration Service is offered\nat no additional charge. However, Cloud SQL and Cloud Storage pricing\napplies for network charges as well as Cloud SQL and Cloud Storage\nentities created for migration purposes.\n\nIn this document, you use the following billable components of\nGoogle Cloud:\n\n- Cloud Storage\n- Cloud SQL\n\nTo generate a cost estimate based on your projected usage, use the\n[pricing calculator](/products/calculator).\n\nBefore you begin\n----------------\n\n1. Verify if this migration path can fully support your scenario. See [SQL Server\n Known limitations](/database-migration/docs/sqlserver/known-limitations).\n2. Consider in which region you want to create the destination database. Database Migration Service is a fully-regional product, meaning all entities related to your migration (source and destination connection profiles, migration jobs, destination databases, storage buckets) must be saved in a single region.\n3. In the Google Cloud console, on the project selector page, select or [create a Google Cloud project](/resource-manager/docs/creating-managing-projects).\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n4. Enable the Database Migration Service, Compute Engine, Cloud Storage, and Cloud SQL Admin APIs. [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=compute.googleapis.com,datamigration.googleapis.com,sqladmin.googleapis.com,storage.googleapis.com)\n\n### Required roles\n\nTo get the permissions that you need to perform homogeneous SQL Server\nmigrations with Database Migration Service, ask your administrator to grant the\nrequired IAM roles on your project for the following\n[accounts involved in the migration process](/database-migration/docs/sqlserver/access-control)\n\n- User account that performs the migration:\n - [Database Migration Admin](/iam/docs/roles-permissions/datamigration#datamigration.admin) (`roles/datamigration.admin`)\n - [Storage Admin](/iam/docs/roles-permissions/storage#storage.admin) (`roles/storage.admin`)\n - [Cloud SQL Editor](/iam/docs/roles-permissions/cloudsql#cloudsql.editor) (`roles/cloudsql.editor`)\n- Database Migration Service service account:\n - [Database Migration Admin](/iam/docs/roles-permissions/datamigration#datamigration.admin) (`roles/datamigration.admin`)\n - [Storage Admin](/iam/docs/roles-permissions/storage#storage.admin) (`roles/storage.admin`)\n - [Cloud SQL Editor](/iam/docs/roles-permissions/cloudsql#cloudsql.editor) (`roles/cloudsql.editor`)\n - [Cloud SQL Studio User](/iam/docs/roles-permissions/cloudsql#cloudsql.studioUser) (`roles/cloudsql.studioUser`)\n\nFor more information about granting roles, see\n[Manage access](/iam/docs/granting-changing-revoking-access).\n\nThese predefined roles contain the permissions required to perform homogeneous\nSQL Server migrations with Database Migration Service. To see the exact permissions\nthat are required, expand the **Required permissions** section: \n\n#### Required permissions\n\nThe following permissions are required to perform homogeneous SQL Server\nmigrations with Database Migration Service:\n\n- User account that performs the migration:\n - `datamigration.* `\n - `resourcemanager.projects.get`\n - `resourcemanager.projects.list`\n - `cloudsql.operations.get`\n - `cloudsql.instances.create`\n - `cloudsql.instances.get`\n - `cloudsql.instances.list`\n - `cloudsql.instances.import`\n - `cloudsql.databases.get`\n - `cloudsql.databases.list`\n - `cloudsql.databases.delete`\n - `compute.machineTypes.list`\n - `compute.machineTypes.get`\n - `compute.projects.get`\n - `storage.buckets.create`\n - `storage.buckets.list`\n- Database Migration Service service account:\n - `datamigration.* `\n - `resourcemanager.projects.get`\n - `resourcemanager.projects.list`\n - `cloudsql.instances.create`\n - `cloudsql.instances.get`\n - `cloudsql.instances.list`\n - `cloudsql.instances.executeSql`\n - `storage.objects.create`\n - `storage.objects.list`\n\nYou might also be able to get these permissions with\n[custom roles](/iam/docs/creating-custom-roles) or other\n[predefined roles](/iam/docs/roles-permissions).\n\nPrepare your source data\n------------------------\n\nTo prepare your source data for migration, follow these steps:\n\n1. [Consider your backup strategy for the migration process](/database-migration/docs/sqlserver/supported-backup-files).\n Database Migration Service supports using a differential backup and the transaction log\n files for migrating data that appears in your database after you take the full\n backup.\n\n2. [Perform a full backup of your source SQL Server database](/database-migration/docs/sqlserver/export-backup-files).\n Make sure you use the correct naming pattern.\n\n3. [Prepare a Cloud Storage bucket and upload your backup files to it](/database-migration/docs/sqlserver/storage-buckets).\n Make sure you set up the necessary directory structure for each backup file type\n you want to use.\n\n4. [Create a source connection profile](/database-migration/docs/sqlserver/create-source-connection-profile) for the Cloud Storage bucket.\n\nPrepare your Cloud SQL for SQL Server destination instance\n----------------------------------------------------------\n\nTo configure your destination Cloud SQL instance, perform the following steps:\n\n1. [Create and configure your Cloud SQL for SQL Server destination instance](/database-migration/docs/sqlserver/create-cloud-sql-destination-instance).\n Make sure you use enough compute and memory resources to cover your migration needs,\n and assign the Storage Admin (`roles/storage.admin`) role to the instance's\n service account.\n\n2. [Create a destination\n connection profile](/database-migration/docs/sqlserver/create-destination-connection-profile) for your Cloud SQL instance.\n\nCreate and run the migration job\n--------------------------------\n\nTo configure and run your migration, perform the following steps:\n\n1. [Create and run the migration job](/database-migration/docs/sqlserver/create-migration-job).\n\n When you start the migration job, your destination Cloud SQL for SQL Server\n databases are put into recovery mode where they are fully managed by\n Database Migration Service. You can promote your destination instance\n when your data is fully migrated. After your destination instance is promoted,\n all the databases in that instance become fully operational. You also gain\n full write access to those databases.\n | **Note:** To you use a differential backup file in the migration process, you need to use a specific configuration when you create the migration job. You can upload the differential backup file at a later time- after you create the migration job, but before you start uploading transaction log files.\n\n You can monitor the migration progress, as well as your destination instance\n health with Database Migration Service observability\n features. See\n [Migration job metrics](/database-migration/docs/sqlserver/migration-job-metrics).\n2. Keep uploading new transaction log backup files to the Cloud Storage bucket.\n\n To cover data that appears in your source database after you perform\n the full backup export,\n [export transaction log backup files](/database-migration/docs/sqlserver/export-backup-files) and upload them to\n the storage bucket. Database Migration Service automatically detects new files,\n reads their contents, and pushes the data to your destination instance.\n See\n [Automate transaction log exports](/database-migration/docs/sqlserver/automate-backup-exports).\n\nFinalize the migration\n----------------------\n\nWhen you decide to switch your application to the new Cloud SQL for SQL Server\ninstance, finalize the migration by following these steps:\n\n1. Stop all write operations on your source databases. You can switch them to read-only mode to retain operational functionality.\n2. Take the last transaction log backup, upload the file to your storage bucket, and stop the incremental load phase in Database Migration Service. You can achieve this result by performing one of the following actions:\n - Stop your [automated backup file uploads](/database-migration/docs/sqlserver/automate-backup-exports), or upload the last transaction log file. Monitor the [unprocessed transaction log backups size](/database-migration/docs/sqlserver/migration-job-metrics) to determine when Database Migration Service finishes processing that file.\n - Optionally, you can upload a transaction log file whose name ends in `.trn.final` suffix. Database Migration Service stops continuous loads when it detects a backup file whose name matches the [`.trn.final` suffix convention](/database-migration/docs/sqlserver/export-backup-files).\n\n When Database Migration Service finishes processing that file, migration\n job status changes to\n [**Ready to promote**](/database-migration/docs/sqlserver/migration-job-statuses#ready-to-promote).\n3. [Promote the migration job](/database-migration/docs/sqlserver/finalize-migration).\n4. (Optional) [Verify migration data](/database-migration/docs/sqlserver/verify-migration) for completeness."]]