

# 对 BYOM 引擎版本和数据库实例进行故障排除
<a name="sqlserver-byom-troubleshooting"></a>

在创建和管理自带媒体（BYOM）引擎版本及 RDS for SQL Server 的数据库实例时，您可以利用下表来诊断和解决常见问题。


| 错误消息/症状 | 原因 | 建议修复 | 
| --- | --- | --- | 
| InvalidParameterValue: RDS can't create the custom engine version because the provided <Name>.ISO file doesn't match the expected installer file for engine version 15.00.4435.7.v1 | 您上传的 RTM 文件与命令中指定的 SQL Server 主要版本或修订版不匹配。例如，上传的是 SQL Server 2022 ISO，但目标版本为 2019 引擎版本（15.xx）。 | 1. 验证引擎版本前缀是否与 ISO 相匹配：15.xx = SQL Server 2019，16.xx = SQL Server 2022。2. 验证引擎参数是否与修订版相匹配：sqlserver-ee = 企业版，sqlserver-se = 标准版。3. 将正确的 RTM 文件上传到 S3。4. 如果创建了失败的 BYOM 引擎版本，请将其删除。5. 使用匹配的 ISO 重试 create-custom-db-engine-version。 | 
| CreateCustomDBEngineVersionFault: RDS was unable to access the specified installer file in the S3 bucket. | RDS 无法访问 S3 存储桶，或者在指定的 S3 位置找不到 ISO 文件。 | 1. 验证 S3 存储桶未设置阻止 RDS 服务访问的策略。2. 在 --database-installation-files-s3-bucket-name 中验证 S3 存储桶名称。3. 验证 --database-installation-files 中的文件名是否完全匹配。4. 确认存储桶与 BYOM 引擎版本位于相同区域中。5. 检查是否存在可能阻止访问的 SCP 或 VPC 端点策略。6. 重试。create-custom-db-engine-version | 
| InvalidParameterValue: RDS can't create the custom engine version because the provided file doesn't match the expected installer file for engine version | CU 文件与目标引擎版本不匹配。 | 1. 为您的目标次要版本确定正确的 CU KB 编号。2. 使用匹配的 CU 版本重试 create-custom-db-engine-version。 | 
| InvalidParameterValue: The custom engine version isn't valid. Names can include only lowercase letters (a-z), dashes (-), underscores (\_), and periods (.). Specify a valid CEV, refer to https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html\#custom-cev.create, and try again. | 确认您的 CEV 名称仅使用支持的字符，并且您使用的是 BYOM 支持的 SQL Server 修订版或版本。 | 1. 确认您使用的是支持的引擎：sqlserver-ee 或 sqlserver-se。2. 确认引擎版本是 SQL Server 2019（15.xx）或 SQL Server 2022（16.xx）。3. 使用支持的修订版和版本重试。 | 
| InvalidCustomDBEngineVersionStateFault: You can't delete custom engine version sqlserver-ee 15.00.4465.1.v1. At least one instance and one backup is using the CEV. Change the version or delete the instances and backups, and try again. | 数据库实例、快照或只读副本仍在使用 BYOM 版本。 | 1. 使用此版本识别资源：aws rds describe-db-instances --query "DBInstances[?EngineVersion=='<version>']"。2. 识别快照：aws rds describe-db-snapshots --query "DBSnapshots[?EngineVersion=='<version>']"。3. 将实例迁移到其他版本或将其删除。4. 删除关联的快照和自动备份。5. 重试。delete-custom-db-engine-version | 
| InvalidParameterCombination: The LicenseModel parameter is required for configurations with multiple options. | BYOM 已对此版本激活，但省略了 --license-model。 | 将 --license-model bring-your-own-media 或 --license-model license-included 添加到命令中。 | 
| The combination of engine sqlserver-se and version <version> isn't valid. Enter a valid custom engine version, and try again. | 在以下情况下会发生此错误：(1) 目标引擎版本没有 BYOM 引擎版本；(2) 目标 BYOM 引擎版本处于 incompatible-media 或 inactive 状态；(3) 指定的引擎版本不是支持的主要/次要版本组合。 | 要验证支持的引擎版本，请先运行 describe-db-engine-versions 并使用 create-custom-db-engine-version 创建 BYOM 引擎版本。 | 
| InvalidParameterCombination: RDS can't perform the operation because the custom engine version <version> is in incompatible-installation-media status. Choose a custom engine version in one of the following statuses and try again: available, creating, pending-validation, validating. | BYOM 引擎版本未通过验证状态。 | 删除失败的 BYOM 引擎版本，重新上传正确的安装媒体，然后创建新的 BYOM 引擎版本。 | 
| InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=<instance class>, Engine=<Edition>, EngineVersion=<version>, LicenseModel=bring-your-own-media. For supported combinations of instance class and database engine version, see the documentation. | BYOM 不支持您指定的实例类型。 | 要验证您的实例类是否支持 BYOM，请使用 describe-orderable-db-instance-options API：aws rds describe-orderable-db-instance-options --engine sqlserver-ee --engine-version <version> --db-instance-class <instance-class> --region <region> --query "OrderableDBInstanceOptions[?LicenseModel=='bring-your-own-media']"。或者，访问 [Amazon RDS for SQL Server 定价页面](https://www.amazonaws.cn/rds/sqlserver/pricing/)来了解支持的实例类。 | 
| InvalidParameterCombination: The combination of engine and version isn't valid. Enter a valid custom engine version, and try again.在 上。ModifyDBInstance | 要升级 BYOM 实例，目标版本的 BYOM 引擎版本必须存在，并且必须至少处于 available 状态。在以下情况下将会拒绝 modify-db-instance 调用：目标引擎版本不存在 BYOM 引擎版本；目标 BYOM 引擎版本处于 incompatible-media 或 inactive 状态；目标版本不在 ValidUpgradeTarget 数组中。 | 使用 describe-db-engine-versions 命令列出有效的次要版本升级目标。在对 BYOM 实例应用次要版本升级之前，请确认目标版本存在有效的 BYOM 引擎版本。如果没有，请创建引擎版本并等待其状态变为可用。 | 