새로운 주 버전에는 데이터베이스 인스턴스를 업그레이드하기 전 애플리케이션 코드, 스키마, 데이터베이스 설정을 수정해야 할 수 있는 호환되지 않는 변경사항이 포함됩니다. 대상 주 버전의 출시 노트를 참조해서 해결해야 할 비호환성 문제를 확인해야 합니다. 주 버전을 건너뛸 경우에는 건너뛰는 각 버전에 대해 나열된 비호환성 문제를 해결해야 합니다.
프로덕션 데이터베이스를 업그레이드하기 전 테스트 인스턴스에서 엔드 투 엔드 업그레이드 프로세스의 시험 이전을 수행합니다. 프로덕션 워크로드에 내보내기로 인한 성능 영향을 방지하기 위해 프로덕션 데이터베이스 대신 클론을 사용하여 업그레이드를 테스트할 수 있습니다.
업그레이드가 성공적으로 완료되는지 검증하는 것 외에도 업그레이드의 예상 다운타임을 파악하고, 업그레이드 워크플로를 확인하고, 업그레이드된 데이터베이스에서 애플리케이션이 예상한 대로 작동하는지 확인하는 테스트를 실행합니다. 자동 스토리지 증가를 사용 설정하지 않았으면 업그레이드된 시험 이전 인스턴스에 사용되는 디스크 스토리지를 기록해서 업그레이드 전 프로덕션 인스턴스의 스토리지 용량을 늘려야 하는지 확인합니다.
업그레이드할 시간을 결정합니다.
데이터 마이그레이션
마이그레이션을 수행하면 소스 인스턴스에서 BAK 파일로 데이터 내보내기와 대상 인스턴스로 데이터 가져오기가 수행됩니다.
최신 데이터베이스 버전을 실행하는 Cloud SQL 인스턴스로 데이터를 마이그레이션하려면 다음 단계를 수행합니다.
sqlserver 시스템 데이터베이스를 내보내지 마세요. sqlserver 데이터베이스는 다른 데이터베이스를 만들기 전 연결된 기본 데이터베이스입니다. 다른 데이터베이스를 만든 후 새 데이터베이스로 전환하여 테이블을 만들고 데이터를 삽입합니다. 애플리케이션 데이터에 sqlserver 데이터베이스를 사용하지 마세요.
[[["이해하기 쉬움","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-08-14(UTC)"],[],[],null,["# Upgrade the database major version by migrating data\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/upgrade-major-db-version-migrate \"View this page for the MySQL database engine\") \\| [PostgreSQL](/sql/docs/postgres/upgrade-major-db-version-migrate \"View this page for the PostgreSQL database engine\") \\| SQL Server\n\n\u003cbr /\u003e\n\nThis page describes how to migrate your data to an instance running a later\nversion of SQL Server. Before proceeding with this method, consider\n[upgrading the database major version in-place](/sql/docs/sqlserver/upgrade-major-db-version-inplace).\n\nPlan a major version upgrade\n----------------------------\n\n1. Choose a target major version and edition.\n\n See the [list of versions that Cloud SQL supports](/sql/docs/sqlserver/db-versions).\n2. Consider the features offered in each SQL Server version and address\n incompatibilities.\n\n New major versions introduce incompatible changes that might require you to\n modify the application code, the schema, or the database settings before\n you can upgrade your database instance. Review the release notes of your\n target major version to determine the incompatibilities that you need to\n address. If you're skipping major versions, address the incompatibilities\n listed for each version that you're skipping.\n - [SQL Server 2022](https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2022?view=sql-server-ver16)\n - [SQL Server 2019](https://docs.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-ver15?view=sql-server-ver15)\n - [SQL Server 2017](https://docs.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2017?view=sql-server-ver15)\n3. Test the upgrade with a dry run.\n\n Perform a dry run of the end-to-end upgrade process with a test instance\n before you upgrade the production database. You might want to test the upgrade\n using a [clone](/sql/docs/sqlserver/clone-instance)\n instead of your production database to avoid any performance impact from the\n export on your production workload.\n\n In addition to validating that the upgrade completes successfully, run\n tests to understand the expected downtime of the upgrade, confirm your\n upgrade workflow, and ensure that the application behaves as expected on the upgraded\n database. If you haven't enabled [automatic storage increases](/sql/docs/sqlserver/instance-settings#automatic-storage-increase-2ndgen),\n take note of the disk storage used by the upgraded dry run instance to\n determine whether you need to increase the storage capacity for the\n production instance before upgrading.\n4. Decide when you want to upgrade.\n\n | **Note:** Upgrades require the instance to become unavailable for a period of time. Be sure to schedule your upgrade when database activity is low.\n\nMigrate your data\n-----------------\n\nMigrating entails [exporting the data](/sql/docs/sqlserver/import-export/import-export-bak#export_data_to_a_bak_file)\nfrom the source instance to a BAK file and [importing the data](/sql/docs/sqlserver/import-export/import-export-bak#import_data_from_a_bak_file)\ninto the target instance.\n\nTo migrate your data to a Cloud SQL instance running a more recent database\nversion, follow these steps:\n\n1. Create the target instance with the desired SQL Server version.\n\n Make sure the target instance has:\n - Sufficient storage to hold all of the current instance's data.\n - The same authorized networks as the current instance. [Learn more](/sql/docs/sqlserver/configure-ip).\n - The same user accounts, with the same SQL Server privileges and passwords.\n\n For more information, see [Creating an instance](/sql/docs/sqlserver/create-instance).\n2. Confirm that you can [connect to the new instance](/sql/docs/sqlserver/connect-admin-ip)\n with your local SQL Server tools and update them, if necessary.\n\n3. Export the current instance's data to a SQL Server BAK file by following the\n instructions in\n [Export data to a BAK file](/sql/docs/sqlserver/import-export/import-export-bak#export_data_to_a_bak_file).\n\n Do *not* export the `sqlserver` system database. The `sqlserver` database is\n the default database you connect to before you create any other\n databases. After you create another database, switch to the new database\n to create tables and insert data. Don't use the `sqlserver` database for your\n application's data.\n4. [Create a Cloud Storage bucket](/storage/docs/creating-buckets)\n if needed, and upload your BAK file to the bucket.\n\n5. Import the data to the target instance by following the instructions in\n [Import from a BAK file](/sql/docs/sqlserver/import-export/import-export-bak#import_data_from_a_bak_file).\n\n6. Update your applications to connect to the new instance.\n\n7. Upgrade the [database compatibility level](/sql/docs/sqlserver/upgrade-major-db-version-inplace#db-compat).\n\n8. When you're confident that your new instance is operating successfully,\n delete the old instance.\n\nWhat's next\n-----------\n\n- Learn about [importing and exporting data](/sql/docs/sqlserver/import-export).\n- Learn about [options for connecting to an instance](/sql/docs/sqlserver/external-connection-methods)."]]