[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Discover and import databases\n\nThis page describes how to use the database collection scripts to discover,\ncollect, and upload your database data to Migration Center.\nMigration Center uses\n[open-source collection scripts available on GitHub](https://github.com/GoogleCloudPlatform/database-assessment)\nto collect data. To understand the type of data that Migration Center\ncollects, you can review the code of the collection scripts.\n\nBefore you begin\n----------------\n\n- The database collection scripts support the following databases and database versions:\n - Microsoft SQL Server for Windows Versions 2008R2 (SP2) to SQL Server 2022\n - MySQL version 8\n - PostgreSQL versions 14 and 15.\n\nDownload and run the scripts\n----------------------------\n\nTo discover and collect data from your databases, follow these steps:\n\n1. Download the latest version of the collection scripts for the database\n type that you want to discover:\n\n - [Download scripts for Microsoft SQL Server](https://github.com/GoogleCloudPlatform/database-assessment/releases/latest/download/db-migration-assessment-collection-scripts-sqlserver.zip).\n - [Download scripts for PostgreSQL](https://github.com/GoogleCloudPlatform/database-assessment/releases/latest/download/db-migration-assessment-collection-scripts-postgres.zip).\n - [Download scripts for MySQL](https://github.com/GoogleCloudPlatform/database-assessment/releases/latest/download/db-migration-assessment-collection-scripts-mysql.zip).\n2. Extract the files, then in the `scripts/collector` folder, open the\n folder for your database.\n\n3. Follow the instructions in the README file to run the script. When it\n finishes running, the script creates a ZIP file with the collected data\n in the output folder that you select.\n\nUpload the collected data to Migration Center\n---------------------------------------------\n\nThe ZIP files created by the collection scripts contain all the specifications\nand performance data collected from your database.\n\n#### Permissions required for this task\n\nTo perform this task, you must have the following\n[permissions](/iam/docs/overview#permissions):\n\n\n- `rma.collectors.create` on the project\n- `migrationcenter.sources.create` on the project\n- `migrationcenter.importJobs.create` on the project\n\n\u003cbr /\u003e\n\nTo upload the ZIP files to Migration Center, follow these steps:\n\n1. Go to the **Data import** page.\n2. Click **Add data \\\u003e Upload files**.\n3. In the **Set up file upload** section, enter the name of the file upload.\n4. From the **File format** list, select **Database import file**.\n5. Click **Select files to upload**, then select all the files that you want to upload.\n6. To upload the files, click **Upload files**.\n7. If the files are validated correctly, to create the assets from the files, click **Import data** , then click **Confirm**.\n\nReview the upload\n-----------------\n\nAfter you upload your files, Migration Center validates them\nto check if they are formally correct. If the validation is successful,\nMigration Center then processes the data to create new assets,\nor update existing ones. You can check the status of your upload jobs\nfrom the Google Cloud console.\n\nTo review the status of your upload job, follow these steps:\n\n1. Go to the **Data import** page, then click **File uploads**.\n2. From the list of file imports, select the upload you want to review.\n3. On the file upload page, under **Data import progress** , review the **Status** for your uploaded files.\n\nYou can see your files in one of the following statuses.\n\n### List of statuses\n\n- **Completed**. The import of your file was successful.\n- **Ready**. Your file passed validation, and is ready to be imported.\n- **Pending**. Your file is waiting for another file to finish processing.\n- **Running**. Your file is processing.\n- **Validating**. Your file is in the validation stage.\n- **Failed validation**. Your file contains some errors. Fix the errors then try to upload your file again.\n- **Failed**. Your file couldn't be imported.\n\n### Review error details\n\nIf you encounter errors after importing your files, you can review\nthe error message directly in the Google Cloud console.\n\nTo review the errors of your upload job, follow these steps:\n\n1. Go to the **Data import** page, then click **File uploads**.\n2. Click the import file that shows a warning or error. The import file details page shows the complete list of errors.\n\nOn the import file details page, you can review the assets and data fields\nthat cause the errors, and view a description of the error.\nErrors in the file import job might prevent Migration Center from\ncreating new assets or update existing ones with the new changes.\nTo fix the error, edit your files and create a new file import job to upload\nthem again.\n\nFor more information about the possible error messages, see\n[Troubleshoot file import errors](/migration-center/docs/troubleshooting/file-import-errors).\n\nWhat's next\n-----------\n\n- Learn more about [Migration Center collection methods](/migration-center/docs/start-asset-discovery#collection_methods).\n- Learn how to [manage your file uploads](/migration-center/docs/manage-file-uploads)."]]