Troubleshooting DB issues for Amazon RDS Custom for SQL Server
The shared responsibility model of RDS Custom provides OS shell–level access and database administrator access. RDS Custom runs resources in your account, unlike Amazon RDS, which runs resources in a system account. With greater access comes greater responsibility. In the following sections, you can learn how to troubleshoot issues with Amazon RDS Custom for SQL Server DB instances.
Note
This section explains how to troubleshoot RDS Custom for SQL Server. For troubleshooting RDS Custom for Oracle, see Troubleshooting DB issues for Amazon RDS Custom for Oracle.
Topics
- Viewing RDS Custom events
- Subscribing to RDS Custom events
- Troubleshooting CEV errors for RDS Custom for SQL Server
- Fixing unsupported configurations in RDS Custom for SQL Server
- Troubleshooting Storage-Full in RDS Custom for SQL Server
- Troubleshooting PENDING_RECOVERY state for TDE enabled databases in RDS Custom for SQL Server
Viewing RDS Custom events
The procedure for viewing events is the same for RDS Custom and Amazon RDS DB instances. For more information, see Viewing Amazon RDS events.
To view RDS Custom event notification using the AWS CLI, use the describe-events
command. RDS Custom introduces several new
events. The event categories are the same as for Amazon RDS. For the list of events, see Amazon RDS event categories and event messages.
The following example retrieves details for the events that have occurred for the specified RDS Custom DB instance.
aws rds describe-events \ --source-identifier my-custom-instance \ --source-type db-instance
Subscribing to RDS Custom events
The procedure for subscribing to events is the same for RDS Custom and Amazon RDS DB instances. For more information, see Subscribing to Amazon RDS event notification.
To subscribe to RDS Custom event notification using the CLI, use the create-event-subscription
command. Include the
following required parameters:
-
--subscription-name
-
--sns-topic-arn
The following example creates a subscription for backup and recovery events for an RDS Custom DB instance in the current AWS
account. Notifications are sent to an Amazon Simple Notification Service (Amazon SNS) topic, specified by --sns-topic-arn
.
aws rds create-event-subscription \ --subscription-name my-instance-events \ --source-type db-instance \ --event-categories '["backup","recovery"]' \ --sns-topic-arn arn:aws:sns:us-east-1:123456789012:interesting-events
Troubleshooting CEV errors for RDS Custom for SQL Server
When you try to create a CEV, it might fail. In this case, RDS Custom issues the
RDS-EVENT-0198
event message. For more information on viewing RDS events,
see Amazon RDS event categories and event messages.
Use the following information to help you address possible causes.
Message | Troubleshooting suggestions |
---|---|
|
Run Sysprep on the EC2 instance that you created from the AMI. For more information about prepping an AMI using Sysprep, see Create a standardized Amazon Machine Image (AMI) using Sysprep. |
|
Verify that your account and profile used for creation has the required permissions on |
|
Verify that the |
|
Ensure the AMI exists in the same customer account. |
|
The name of the AMI is incorrect. Ensure the correct AMI ID is provided. |
|
Choose a supported AMI that has Windows Server with SQL Server Enterprise, Standard, or Web edition. Choose an AMI with one of the following usage operation codes from the EC2 Marketplace:
|
|
Use an AMI that contains a supported edition of SQL Server. For more information, see Version support for RDS Custom for SQL Server CEVs. |
|
Classic RDS Custom for SQL Server engine versions aren't supported. For example, version 15.00.4073.23.v1. Use a supported version number. |
|
The CEV must be in an |
|
The target CEV is not valid. Check the requirements for a valid upgrade path. |
|
Follow the required CEV naming convention. For more information, see Requirements for RDS Custom for SQL Server CEVs. |
|
An unsupported DB engine version was provided. Use a supported DB engine version. |
|
Use an AMI built on the x86_64 architecture. |
|
Create the EC2 instance from the AMI that you have permission for. Run Sysprep on the EC2 instance to create and save a base image. |
|
Use an AMI built with the Windows platform. |
|
Create the AMI with the EBS device type. |
|
Choose a supported AMI that has Windows Server with SQL Server Enterprise, Standard, or Web edition. Choose an AMI with one of the following usage operation codes from the EC2 Marketplace:
|
|
Ensure the AMI is in a state of |
|
Use a supported Windows OS. |
|
Verify that the log file is available at |
|
Use an AMI with a minimum OS build version of 14393. |
|
Use an AMI with a minimum OS major version of 10.0 or higher. |
Fixing unsupported configurations in RDS Custom for SQL Server
Because of the shared responsibility model, it's your responsibility to fix configuration
issues that put your RDS Custom for SQL Server DB instance into the unsupported-configuration
state.
If the issue is with the AWS infrastructure, you can use the console or the AWS CLI to fix
it. If the issue is with the operating system or the database configuration, you can log in
to the host to fix it.
Note
This section explains how to fix unsupported configurations in RDS Custom for SQL Server. For information about RDS Custom for Oracle, see Fixing unsupported configurations in RDS Custom for Oracle.
In the following tables, you can find descriptions of the notifications and events that the support perimeter sends and how to fix them. These notifications and the support perimeter are subject to change. For background on the support perimeter, see RDS Custom support perimeter. For event descriptions, see Amazon RDS event categories and event messages.
Event Code | Configuration area | RDS event message | Validation process |
---|---|---|---|
|
Manual Unsupported Configuration |
|
To resolve this issue, create a support case. |
AWS resource (infrastructure)
Event Code | Configuration area | RDS event message | Validation process |
---|---|---|---|
|
EC2 Instance State |
|
To check the status of a DB instance, use the console or run the following AWS CLI command:
|
|
EC2 Instance State |
|
Use the following AWS CLI command to check the status of a DB instance:
You can also check the status of the EC2 instance using the EC2 console. To start a DB instance, use the console or run the following AWS CLI command:
|
|
EC2 Instance Class |
|
Use the following CLI command to check the expected DB instance class:
|
|
EBS Storage Volume Not Accessible |
|
|
|
EBS Storage Volume Detached |
|
After re-attaching the EBS volume, use the following CLI commands to check if the EBS volume 'volume-id' is properly attached to the RDS instance:
|
|
EBS Storage Volume Size |
|
Use the following CLI command to compare the volume size of the EBS volume 'volume-id' details and the RDS instance details:
Use the following CLI command to view the actual allocated volume size:
|
|
EBS Storage Volume Configuration |
|
Use the following CLI command to compare the volume type of the EBS volume 'volume-id' details and the RDS instance details. Make sure that the values at the EBS level matches the values at the RDS level:
To get the expected value for Storage Throughput at the RDS level:
To get the expected value for Volume IOPS at the RDS level:
To get the current Storage Type at the EC2 Level:
To get the current value for Storage Throughput at the EC2 Level:
To get the current value for Volume IOPS at the EC2 Level:
|
|
EBS Storage Volume Size and Configuration |
|
Use the following CLI command to compare the volume type of the EBS volume 'volume-id' details and the RDS instance details. Make sure that the values at the EBS level matches the values at the RDS level:
To get the expected value for Storage Throughput at the RDS level:
To get the expected value for Volume IOPS at the RDS level:
To get the current Storage Type at the EC2 Level:
To get the current value for Storage Throughput at the EC2 Level:
To get the current value for Volume IOPS at the EC2 Level:
To get the expected Allocated Volume Size:
To get the actual Allocated Volume Size:
|
|
SQS Permissions |
|
|
|
SQS VPC Endpoint |
|
Operating system
Event Code | Configuration area | RDS event message | Validation proces |
---|---|---|---|
|
SQL Service Status |
|
|
|
RDS Custom Agent Status |
|
Log in to the host and make sure that the RDS Custom agent is running. You can use the following commands to view the agent status.
If the status isn't
If the agent can't start, check the Windows Events to see why it can't start. The agent requires a Windows user to start the service. Ensure a Windows user exists and has privileges to run the service. |
|
SSM Agent Status |
|
For more information, see Troubleshooting SSM Agent. To troubleshoot SSM endpoints, see Unable to connect to SSM endpoints and Use ssm-cli to troubleshoot managed node availability. |
|
RDS Custom Agent Login |
|
|
|
Timezone |
|
Run the For more information, see Local time zone for RDS Custom for SQL Server DB instances. |
|
High Availability Software Solution Version |
|
|
|
High Availability Software Solution Configuration |
|
|
SP-S2008 |
SQL Server Service |
|
You can use the following commands to view the agent status.
|
Database
Event Code | Configuration area | RDS event message | Validation proces |
---|---|---|---|
|
SQL Server Shared Memory Protocol |
|
You can validate this by checking: SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for MSSQLSERVER> Shared Memory as Enabled. After you enable the protocol, restart the SQL Server process. |
|
Service Master Key |
|
|
|
Service Master Key |
|
|
|
DB Engine Version and Edition |
|
Run the following query to get the SQL version:
Run the following AWS CLI command to get the RDS SQL engine version and edition:
For more information, see Modifying an RDS Custom for SQL Server DB instance and Upgrading a DB instance engine version. |
|
DB Engine Edition |
|
Run the following query to get the SQL edition:
Run the following AWS CLI command to get the RDS SQL engine edition:
|
|
DB Engine Version |
|
Run the following query to get the SQL version:
Run the following AWS CLI command to get the RDS SQL engine version:
For more information, see Modifying an RDS Custom for SQL Server DB instance and Upgrading a DB instance engine version. |
|
Database file location |
|
Run the following query to list the location of database files that aren't in the default path:
|
Troubleshooting Storage-Full
in RDS Custom for SQL Server
RDS Custom monitors the available space on both the root (C:) and data (D:) volumes of an RDS Custom for SQL Server DB instance.
RDS Custom moves the instance state to the Storage-Full
status when either volume has less than 500 MiB disk space available.
To scale the instance storage,
see Modifying the storage for an RDS Custom for SQL Server DB instance.
Note
Instances in Storage-Full
can take up to 30 minutes to resolve after scaling storage.
Troubleshooting PENDING_RECOVERY state for TDE enabled databases in RDS Custom for SQL Server
SQL Server databases with transparent data encryption (TDE) enabled might remain in
PENDING_RECOVERY
state if the automatic decryption runs into issues.
This typically occurs after a DB instance restore if the source DB instance Service Master Key (SMK) backup file
stored in the RDS Custom managed S3 bucket in your account has been deleted prior to the restore completion.
To enable the automatic decryption and bring the TDE enabled databases online, you need to open the Database Master Key (DMK) with its password and ecrypt the DMK using the SMK.
Use the following SQL Server commands for reference:
-- Identify PENDING_RECOVERY TDE databases USE MASTER; GO SELECT name, is_encrypted, state_desc FROM sys.databases; GO -- Open DMK using password OPEN MASTER KEY DECRYPTION BY PASSWORD = '<password>'; GO -- Encrypt DMK using SMK ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY; GO -- Close SMK CLOSE MASTER KEY; GO -- Bring the TDE databases online ALTER DATABASE <database_name> SET ONLINE; GO -- Verify TDE databases are now in ONLINE state SELECT name, is_encrypted, state_desc FROM sys.databases; GO