Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara mengonfirmasi bahwa data yang dimigrasikan sudah lengkap dan
akurat. Setidaknya, Anda harus memverifikasi bahwa tabel Anda ada di
instance database Cloud SQL untuk SQL Server yang dimigrasikan.
Hubungkan ke instance Cloud SQL untuk SQL Server dengan alat tempat Anda dapat menjalankan perintah SQL terhadap database yang dimigrasikan.
Untuk informasi selengkapnya tentang cara terhubung ke instance Cloud SQL, lihat
Opsi koneksi
dalam dokumentasi Cloud SQL.
Jalankan perintah SQL untuk memverifikasi data yang dimigrasikan. Misalnya:
Mencantumkan semua database
Jalankan perintah berikut untuk memverifikasi apakah Cloud SQL untuk SQL Server tujuan Anda
berisi semua database sumber yang ingin Anda migrasikan:
EXECsp_databases;GO
Mencantumkan semua tabel dalam database
Jalankan perintah berikut untuk memeriksa apakah database yang dimigrasikan berisi semua tabel yang diperlukan:
Mulai menggunakan database tertentu:
USEDATABASE_NAME;GO
Mencantumkan semua tabel dalam database:
SELECT*FROMinformation_schema.tables;
Memeriksa konten dan definisi tabel
Jalankan perintah berikut untuk memverifikasi kebenaran tabel tertentu yang dimigrasikan:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-01 UTC."],[[["\u003cp\u003eThis guide helps verify the completeness and accuracy of migrated data in Cloud SQL for SQL Server.\u003c/p\u003e\n"],["\u003cp\u003eYou can connect to your Cloud SQL instance using tools capable of running SQL commands.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003eEXEC sp_databases;\u003c/code\u003e command to confirm that all intended databases have been migrated.\u003c/p\u003e\n"],["\u003cp\u003eUtilize \u003ccode\u003eUSE DATABASE_NAME;\u003c/code\u003e and \u003ccode\u003eSELECT * FROM information_schema.tables;\u003c/code\u003e to verify the presence of all required tables within a specific database.\u003c/p\u003e\n"],["\u003cp\u003eCheck table definitions with \u003ccode\u003eEXEC sp_help 'dbo.TABLE_NAME';\u003c/code\u003e and verify table contents using \u003ccode\u003eSELECT * FROM TABLE_NAME;\u003c/code\u003e to ensure the correctness of migrated tables.\u003c/p\u003e\n"]]],[],null,["# Verify a migration\n\nThis page describes how to confirm that your migrated data is complete and\naccurate. At a minimum, you should verify that your tables exist in the\nmigrated Cloud SQL for SQL Server databases instance.\n\n1. 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\n [Connection options](/sql/docs/sqlserver/connect-overview#tools_for_connecting_to)\n in Cloud SQL documentation.\n\n2. Run SQL commands to verify your migrated data. For example:\n\n #### List all databases\n\n Run the following command to verify if your destination Cloud SQL for SQL Server\n contains all the source databases you wanted to migrate: \n\n ```sql\n EXEC sp_databases;\n GO\n ```\n\n #### List all tables in a database\n\n Run the following commands to check if your migrated database\n contains all the necessary tables:\n 1. Start using a specific database: \n\n ```sql\n USE DATABASE_NAME;\n GO\n ```\n 2. List all tables in the database: \n\n ```sql\n SELECT * FROM information_schema.tables;\n ```\n\n #### Check table content and definitions\n\n Run the following commands to verify the correctness of a specific\n migrated table:\n 1. Start using a specific database: \n\n ```sql\n USE DATABASE_NAME;\n GO\n ```\n 2. View the table definition: \n\n ```sql\n EXEC sp_help 'dbo.\u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e';\n ```\n 3. Verify the table contents: \n\n ```sql\n SELECT * FROM TABLE_NAME';\n GO\n ```"]]