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
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 Amazon 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
Viewing 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 Amazon
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 |
|
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. |
|
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 Amazon infrastructure, you can use the console or the Amazon 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 table, 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.
Configuration area | RDS event message | Description | Action |
---|---|---|---|
Database | |||
Database health |
|
The support perimeter monitors the DB instance state. It also monitors how many restarts occurred during the previous hour and day. You're notified when the instance is in a state where it still exists, but you can't interact with it. |
Log in to the host and examine the state of your RDS Custom for SQL Server database.
If necessary, restart your RDS Custom for SQL Server DB instance to get it running again. Sometimes you might need to reboot the host. After the restart, the RDS Custom agent detects that the DB instance is no longer in an unresponsive state. It then notifies the support perimeter to reevaluate your DB instance state. |
Database file locations |
|
All SQL Server database files are stored on the D: drive by default,
in the If you create or alter the database file location to be anywhere other than the D: drive, then RDS Custom places the DB instance outside the support perimeter. We strongly recommend that you don't save any database files on the C: drive. You can lose data on the C: drive during certain operations, such as hardware failure. Storage on the C: drive doesn't offer the same durability as on the D: drive, which is an EBS volume. Also, if database files can't be found, RDS Custom places the DB instance outside the support perimeter. |
Store all RDS Custom for SQL Server database files on the D: drive. |
Shared memory connections |
|
The RDS Custom agent on the EC2 host connects to SQL Server using the shared memory protocol. If this protocol is turned off (Enabled is set to No), then RDS Custom can't perform its management actions and places the DB instance outside the support perimeter. |
To bring the RDS Custom for SQL Server DB instance back within the support perimeter, turn on the shared memory protocol on the Protocol page of the Shared Memory Properties window by setting Enabled to Yes. After you enable the protocol, restart SQL Server. |
Operating system | |||
RDS Custom agent status |
|
The RDS Custom agent must always be running. The support perimeter monitors the RDS Custom agent process state on the host every 1 minute. On RDS Custom for SQL Server, a stopped agent is recovered by the monitoring service. The DB instance goes outside the support perimeter if the RDS Custom agent is uninstalled. |
Log in to the host and make sure that the RDS Custom agent is running. You can use the following commands to find the agent's status.
If the status isn't
|
SSM agent status |
|
The SSM agent must always be running. The RDS Custom agent is responsible for making sure that the Systems Manager agent is running. The support perimeter monitors the SSM agent process state on the host every 1 minute. |
For more information, see Troubleshooting SSM Agent. |
Amazon resources | |||
Amazon EC2 instance state |
|
The support perimeter monitors EC2 instance state-change notifications. The EC2 instance must always be running. AMI associated with a CEV should always be active and available. |
If the EC2 instance is stopped, start it and remount the binary and data volumes. If the EC2 instance is terminated, RDS Custom performs an automated recovery to provision a new EC2 instance. |
Amazon EC2 instance attributes |
|
The support perimeter monitors the instance type of the EC2 instance where the RDS Custom DB instance is running. The EC2 instance type must stay the same as when you set it up during RDS Custom DB instance creation. |
Change the EC2 instance type back to the original type using the EC2 console or CLI. To change the instance type because of scaling requirements, do a PITR and specify the new instance type and class. However, doing this results in a new RDS Custom DB instance with a new host and Domain Name System (DNS) name. |
Amazon Elastic Block Store (Amazon EBS) volumes |
|
RDS Custom creates two types of EBS volume, besides the root volume created from the Amazon Machine Image (AMI), and associates them with the EC2 instance. The binary volume is where the database software binaries are located. The data volumes are where database files are located. The storage configurations that you set when creating the DB instance are used to configure the data volumes. The support perimeter monitors the following:
|
If you detached any initial EBS volumes, contact Amazon Support. If you modified the storage type, Provisioned IOPS, or storage throughput of an EBS volume, revert the modification to the original value. If you modified the storage size of an EBS volume, contact Amazon Support. |