Troubleshooting DB issues for Amazon RDS Custom for SQL Server - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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.

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

Custom Engine Version creation expected a Sysprep’d AMI. Retry creation using a Sysprep’d AMI.

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.

EC2 Image permissions for image (AMI_ID) weren't found for customer (Customer_ID). Verify customer (Customer_ID) has valid permissions on the EC2 Image.

Verify that your account and profile used for creation has the required permissions on create EC2 Instance and Describe Images for the selected AMI.

Image (AMI_ID) doesn't exist in your account (ACCOUNT_ID). Verify (ACCOUNT_ID) is the owner of the EC2 image.

Ensure the AMI exists in the same customer account.

Image id (AMI_ID) isn't valid. Specify a valid image id, and try again.

The name of the AMI is incorrect. Ensure the correct AMI ID is provided.

Image (AMI_ID) operating system platform isn't supported. Specify a valid image, and try again.

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:

  • RunInstances:0102 - Windows with SQL Server Enterprise

  • RunInstances:0006 - Windows with SQL Server Standard

  • RunInstances:0202 - Windows with SQL Server Web

SQL Server Web Edition isn't supported for creating a Custom Engine Version using Bring Your Own Media. Specify a valid image, and try again.

Use an AMI that contains a supported edition of SQL Server. For more information, see Version support for RDS Custom for SQL Server CEVs.

The custom engine version can't be the same as the OEV engine version. Specify a valid CEV, and try again.

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 custom engine version isn't in an active state. Specify a valid CEV, and try again.

The CEV must be in an AVAILABLE state to complete the operation. Modify the CEV from INACTIVE to AVAILABLE.

The custom engine version isn't valid for an upgrade. Specify a valid CEV with an engine version greater or equal to (X), and try again.

The target CEV is not valid. Check the requirements for a valid upgrade path.

The custom engine version isn't valid. Names can include only lowercase letters (a-z), dashes (-), underscores (_), and periods (.). Specify a valid CEV, and try again.

Follow the required CEV naming convention. For more information, see Requirements for RDS Custom for SQL Server CEVs.

The custom engine version isn't valid. Specify valid database engine version, and try again. Example: 15.00.4073.23-cev123.

An unsupported DB engine version was provided. Use a supported DB engine version.

The expected architecture is (X) for image (AMI_ID), but architecture (Y) was found.

Use an AMI built on the x86_64 architecture.

The expected owner of image (AMI_ID) is customer account ID (ACCOUNT_ID), but owner (ACCOUNT_ID) was found.

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.

The expected platform is (X) for image (AMI_ID), but platform (Y) was found.

Use an AMI built with the Windows platform.

The expected root device type is (X) for image %s, but root device type (Y) was found.

Create the AMI with the EBS device type.

The expected SQL Server edition is (X), but (Y) was found.

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:

  • RunInstances:0102 - Windows with SQL Server Enterprise

  • RunInstances:0006 - Windows with SQL Server Standard

  • RunInstances:0202 - Windows with SQL Server Web

The expected state is (X) for image (AMI_ID), but the following state was found: (Y).

Ensure the AMI is in a state of AVAILABLE.

The provided Windows OS name (X) isn’t valid. Make sure the OS is one of the following: (Y).

Use a supported Windows OS.

RDS expected a Windows build version greater than or equal to (X), but found version (Y).

Use an AMI with a minimum OS build version of 14393.

RDS expected a Windows major version greater than or equal to (X).1f, but found version (Y).1f.

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

You need to manually recover the database on EC2 instance [i-xxxxxxxxxxxxxxxxx].

The DB instance restarted.

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.

ps -eo pid,state,command | grep smon

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

The RDS Custom instance is going out of perimeter because an unsupported configuration was used for database files location.

All SQL Server database files are stored on the D: drive by default, in the D:\rdsdbdata\DATA directory.

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 instance is going out of perimeter because an unsupported configuration was used for shared memory protocol.

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 instance is going out of perimeter because an unsupported configuration was used for RDS Custom agent.

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.

$name = "RDSCustomAgent" $service = Get-Service $name Write-Host $service.Status

If the status isn't Running, you can start the service with the following command:

Start-Service $name

SSM agent status

The RDS Custom instance is going out of perimeter because an unsupported configuration was used for SSM agent.

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 state of the EC2 instance [i-xxxxxxxxxxxxxxxxx] has changed from [RUNNING] to [STOPPING].

The Amazon EC2 instance [i-xxxxxxxxxxxxxxxxx] has been terminated and can't be found. Delete the database instance to clean up resources.

The Amazon EC2 instance [i-xxxxxxxxxxxxxxxxx] has been stopped. Start the instance, and restore the host configuration. For more information, see the troubleshooting documentation.

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 RDS Custom instance is going out of perimeter because an unsupported configuration was used for EC2 instance metadata.

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

The RDS Custom instance is going out of perimeter because an unsupported configuration was used for EBS volume metadata.

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:

  • The initial EBS volumes created with the DB instance are still associated.

  • The initial EBS volumes still have the same configurations as initially set: storage type, size, Provisioned IOPS, and storage throughput.

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.