

# Overview of Db2 on Amazon RDS
<a name="db2-overview"></a>

You can read the following sections to get an overview of Db2 on Amazon RDS.

**Topics**
+ [Amazon RDS for Db2 features](Db2.Concepts.FeatureSupport.md)
+ [Db2 on Amazon RDS versions](Db2.Concepts.VersionMgmt.md)
+ [Amazon RDS for Db2 licensing options](db2-licensing.md)
+ [Amazon RDS for Db2 instance classes](Db2.Concepts.General.InstanceClasses.md)
+ [Amazon RDS for Db2 default roles](db2-default-roles.md)
+ [Amazon RDS for Db2 parameters](db2-supported-parameters.md)
+ [EBCDIC collation for Db2 databases on Amazon RDS](db2-ebcdic.md)
+ [Local time zone for Amazon RDS for Db2 DB instances](db2-time-zone.md)

# Amazon RDS for Db2 features
<a name="Db2.Concepts.FeatureSupport"></a>

Amazon RDS for Db2 supports most of the features and capabilities of the IBM Db2 database. Some features might have limited support or restricted privileges. For more information about the Db2 database features for specific Db2 versions, see the [IBM Db2 documentation](https://www.ibm.com/docs/en/db2).

You can filter new Amazon RDS features on the [What's New with Database?](https://aws.amazon.com/about-aws/whats-new/database/) page. For **Products**, choose **Amazon RDS**. Then, you can search by using keywords such as **Db2 2023**.

**Note**  
The following lists aren't exhaustive.

**Topics**
+ [Supported features in RDS for Db2](#db2-supported-features)
+ [Unsupported features in RDS for Db2](#db2-unsupported-features)

## Supported features in RDS for Db2
<a name="db2-supported-features"></a>

RDS for Db2 supports features that include features that are native to IBM Db2 and features that are core to Amazon RDS.

### Features native to IBM Db2
<a name="db2-supported-features-native-db2"></a>

RDS for Db2 supports the following Db2 database features:
+ Creation of a standard database that uses a customer-defined code set, collation, page size, and territory. Use the Amazon RDS [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) stored procedure.
+ Addition, deletion, or modification of local users and groups. Use the Amazon RDS stored procedures for [Stored procedures for granting and revoking privileges for RDS for Db2](db2-sp-granting-revoking-privileges.md).
+ Creation of roles with the Amazon RDS [rdsadmin.create\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-create-role) stored procedure.
+ Support for standard row-organized tables.
+ Support for analytic workload for column-organized tables.
+ Ability to define Db2-compatibility features such as Oracle and MySQL.
+ Support for Java-based external stored procedures.
+ Support for data encryption in transit by using SSL/TLS.
+ Monitoring the status of a database (`ALIVE`, `DOWN`, `STORAGE_FULL`, `UNKNOWN`, and `STANDBY_CONNECTABLE`).
+ Restoration of a customer-provided offline or online Linux (LE) database. Use Amazon RDS stored procedures for [Stored procedures for databases for RDS for Db2](db2-sp-managing-databases.md).
+ Application of customer-provided Db2 archive logs to keep the database synchronized with self-managed Db2 databases. Use Amazon RDS stored procedures for [Stored procedures for databases for RDS for Db2](db2-sp-managing-databases.md).
+ Support for Db2 instance-level and database-level auditing.
+ Support for homogeneous federation.
+ Ability to load a table from data files in Amazon Simple Storage Service (Amazon S3).
+ Authorizations granted to users, groups or roles, such as `CONNECT`, `SYSMON`, `ACCESSCTRL`, `DATAACCESS`, `SQLADM`, `WLMADM`, `EXPLAIN`, `LOAD`, or `IMPLICIT_SCHEMA`.
+ Creation of multiple databases. 
**Note**  
An RDS for Db2 DB instance can contain up to 50 databases. For more information, see [Multiple databases on an Amazon RDS for Db2 DB instance](db2-multiple-databases.md). 

### Features core to Amazon RDS
<a name="db2-supported-features-rds-core"></a>

RDS for Db2 supports the following core Amazon RDS features:
+ Custom parameter groups to assign to DB instances
+ Creation, modification, and deletion of DB instances
+ Restoration of a self-managed Db2 offline or online Linux (LE) database backup
**Note**  
To be able to restore your backup, don't provide a name for your database when you create a DB instance. For more information, see [Creating an Amazon RDS DB instance](USER_CreateDBInstance.md).
+ Support of gp3, io2, and io1 storage types
+ Use of AWS Managed Microsoft AD for Kerberos authentication, and LDAP group authorization for RDS for Db2
+ Modification of security groups, ports, instance types, storage, backup retention periods, and other settings for existing Db2 instances
+ Deletion protection for DB instances
+ Cross-Region point-in-time recovery (PITR), including for encrypted backups
+ Use of AWS Key Management Service (AWS KMS) for storage encryption and encryption at rest
+ Multi-AZ DB instances with one standby for high availability
+ Reboots of DB instances
+ Updates to master passwords
+ Restoration of DB instances to a specific time
+ Backup and restoration of DB instances by using storage-level backups
+ Start and stop of DB instances
+ Maintenance of DB instances
+ Same-Region and cross-Region standby and read replicas

## Unsupported features in RDS for Db2
<a name="db2-unsupported-features"></a>

RDS for Db2 doesn't support the following Db2 database features: 
+ `SYSADM`, `SECADM`, and `SYSMAINT` access for the master user.
+ External stored procedures written in C, C\$1\$1, or Cobol.
+ Multiple Db2 DB instances on a single host.
+ External GSS-API plugins for authentication.
+ External third-party plugins to back up or restore Db2 databases.
+ Multi-node massively parallel processing (MPP), such as IBM Db2 Warehouse.
+ IBM Db2 pureScale.
+ Manual setup of High Availability Disaster Recovery (HADR) for RDS for Db2.
**Note**  
Amazon RDS supports and manages HADR for RDS for Db2 through replicas. For more information, see [Working with replicas for Amazon RDS for Db2](db2-replication.md).  
RDS for Db2 supports Multi-AZ deployments, cross-Region automated backups, and replication. For more information, see [Multi-AZ DB instance deployments for Amazon RDS](Concepts.MultiAZSingleStandby.md) and [Replicating automated backups to another AWS Region](USER_ReplicateBackups.md).
+ Native database encryption.
+ Heterogeneous federation to Informix, Sybase, and Teradata. For more information, see [Amazon RDS for Db2 federation](db2-federation.md).
+ Creation of non-fenced routines and migration of existing non-fenced routines by backing up and restoring data. For more information, see [Non-fenced routines](db2-known-issues-limitations.md#db2-known-issues-limitations-non-fenced-routines). 
+ Creation of new non-automatic storage tablespaces. For more information, see [Non-automatic storage tablespaces during migration](db2-known-issues-limitations.md#db2-known-issues-limitations-non-automatic-storage-tablespaces).
+ External tables.

# Db2 on Amazon RDS versions
<a name="Db2.Concepts.VersionMgmt"></a>

For Db2, version numbers take the form of *major.minor.build.revision*, for example, 11.5.9.0.sb00000000.r1. Our version implementation matches that of Db2.

**major**  
The major version number is both the integer and the first fractional part of the version number, for example, 11.5. A version change is considered major if the major version number changes—for example, going from version 11.5 to 12.1.

**minor**  
The minor version number is both the third and fourth parts of the version number, for example, 9.0 in 11.5.9.0. The third part indicates the Db2 modpack, for example, 9 in 9.0. The fourth part indicates the Db2 fixpack, for example, 0 in 9.0. A version change is considered minor if either the Db2 modpack or the Db2 fixpack changes—for example, going from version 11.5.9.0 to 11.5.9.1, or from 11.5.9.0 to 11.5.10.0, with exceptions to provide catalog table updates. (Amazon RDS takes care of these exceptions.)

**build**  
The build number is the fifth part of the version number, for example, sb00000000 in 11.5.9.0.sb00000000. A build number where the number portion is all zeroes indicates a standard build. A build number where the number portion isn't all zeroes indicates a special build. A build number changes if there is a security fix or special build of an existing Db2 version. A build number change also indicates that Amazon RDS automatically applied a new minor version.

**revision**  
The revision number is the sixth part of the version number, for example, r1 in 11.5.9.0.sb00000000.r1. A revision is an Amazon RDS revision to an existing Db2 release. A revision number change indicates that Amazon RDS automatically applied a new minor version.

**Topics**
+ [Upgrade management for Amazon RDS Db2 instances](Db2.Concepts.VersionMgmt.Supported.md)
+ [Supported Db2 major versions on Amazon RDS](#Db2.Concepts.VersionMgmt.ReleaseCalendar)

# Upgrade management for Amazon RDS Db2 instances
<a name="Db2.Concepts.VersionMgmt.Supported"></a>

To see the current list of supported Db2 minor versions on RDS, use one of the following commands:

```
aws rds describe-db-engine-versions --engine db2-se
aws rds describe-db-engine-versions --engine db2-ae
```

Amazon RDS also supports upgrade rollout policy to manage automatic minor version upgrades across multiple database resources and AWS accounts. For more information, see [Using AWS Organizations upgrade rollout policy for automatic minor version upgrades](RDS.Maintenance.AMVU.UpgradeRollout.md).

You can specify any currently supported Db2 version when creating a new DB instance. You can specify the major version (such as Db2 11.5) and any supported minor version for the specified major version. If no version is specified, Amazon RDS defaults to a supported version, typically the most recent version. If a major version is specified but a minor version is not, Amazon RDS defaults to a recent release of the major version that you have specified. To see a list of supported versions, as well as defaults for newly created DB instances, use the [https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html) AWS Command Line Interface (AWS CLI) command. 

For example, to list the supported engine versions for Amazon RDS for Db2, run the following AWS CLI command. Replace *region* with your AWS Region.

For Linux, macOS, or Unix:

```
aws rds describe-db-engine-versions \
    --filters Name=engine,Values=db2-ae,db2-se \
    --query "DBEngineVersions[].{Engine:Engine, EngineVersion:EngineVersion, DBParameterGroupFamily:DBParameterGroupFamily}" \
    --region region
```

For Windows:

```
aws rds describe-db-engine-versions ^
    --filters Name=engine,Values=db2-ae,db2-se ^
    --query "DBEngineVersions[].{Engine:Engine, EngineVersion:EngineVersion, DBParameterGroupFamily:DBParameterGroupFamily}" ^
    --region region
```

This command produces output similar to the following example:

```
[
    {
    "Engine": "db2-ae",
    "EngineVersion": "11.5.9.0.sb00000000.r1",
    "DBParameterGroupFamily": "db2-ae-11.5"
    },
    {
    "Engine": "db2-se",
    "EngineVersion": "11.5.9.0.sb00000000.r1",
    "DBParameterGroupFamily": "db2-se-11.5"
    }
]
```

The default Db2 version might vary by AWS Region. To create a DB instance with a specific minor version, specify the minor version during DB instance creation. You can determine the default version for an AWS Region for `db2-ae` and `db2-se` database engines by running the` describe-db-engine-versions` command. The following example returns the default version for `db2-ae` in US East (N. Virginia).

For Linux, macOS, or Unix:

```
aws rds describe-db-engine-versions \
    --default-only --engine db2-ae \
    --query "DBEngineVersions[].{Engine:Engine, EngineVersion:EngineVersion, DBParameterGroupFamily:DBParameterGroupFamily}" \
    --region us-east-1
```

For Windows:

```
aws rds describe-db-engine-versions ^
    --default-only --engine db2-ae ^
    --query "DBEngineVersions[].{Engine:Engine, EngineVersion:EngineVersion, DBParameterGroupFamily:DBParameterGroupFamily}" ^
    --region us-east-1
```

This command produces output similar to the following example:

```
[
    {
    "Engine": "db2-ae",
    "EngineVersion": "11.5.9.0.sb00000000.r1",
    "DBParameterGroupFamily": "db2-ae-11.5"
    }
]
```

With Amazon RDS, you control when to upgrade your Db2 instance to a new major version supported by Amazon RDS. You can maintain compatibility with specific Db2 versions, test new versions with your application before deploying in production, and perform major version upgrades at times that best fit your schedule.

When automatic minor version upgrade is enabled, Amazon RDS automatically upgrades your DB instances to new Db2 minor versions as they are supported by Amazon RDS. This patching occurs during your scheduled maintenance window. You can modify a DB instance to enable or disable automatic minor version upgrades. 

Except for Db2 versions 11.5.9.1 and 11.5.10.0, automatic upgrades to new Db2 minor version includes automatic upgrades to new builds and revisions. For 11.5.9.1 and 11.5.10.0, manually upgrade minor versions.

If you opt out of automatically scheduled upgrades, you can manually upgrade to a supported minor version release by following the same procedure as you would for a major version update. For information, see [Upgrading a DB instance engine version](USER_UpgradeDBInstance.Upgrading.md). 

## Supported Db2 major versions on Amazon RDS
<a name="Db2.Concepts.VersionMgmt.ReleaseCalendar"></a>

RDS for Db2 major versions are available under standard support at least until IBM end of support (base) for the corresponding IBM version. The following table shows the dates that you can use to plan your testing and upgrade cycles. If Amazon extends support for an RDS for Db2 version for longer than originally stated, we plan to update this table to reflect the later date.

You can use the following dates to plan your testing and upgrade cycles. 

**Note**  
Dates with only a month and a year are approximate and are updated with an exact date when it’s known.  
You can view the major versions of your Db2 databases by running the [describe-db-major-engine-versions](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-major-engine-versions.html) AWS CLI command or by using the [DescribeDBMajorEngineVersions](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBMajorEngineVersions.html) RDS API operation.


| Db2 major version  | IBM release date  | RDS release date  | IBM end of support (Standard and Advanced Edition) | IBM end of support (extended) | 
| --- | --- | --- | --- | --- | 
|  Db2 11.5  |  27 June 2019  |  27 November 2023  | 30 April 2027 |  30 April 2031  | 

# Amazon RDS for Db2 licensing options
<a name="db2-licensing"></a>

Amazon RDS for Db2 has two licensing options: bring your own license (BYOL) and Db2 license through AWS Marketplace.

**Topics**
+ [Bring your own license (BYOL) for Db2](#db2-licensing-options-byol)
+ [Db2 license through AWS Marketplace](#db2-licensing-options-marketplace)
+ [Switching between Db2 licenses](#db2-edition-license-switching)

## Bring your own license (BYOL) for Db2
<a name="db2-licensing-options-byol"></a>

In the BYOL model, you use your existing Db2 database licenses to deploy databases on Amazon RDS. Verify that you have the appropriate Db2 database license for the DB instance class and Db2 database edition that you want to run. You must also follow IBM policies for licensing IBM database software in the cloud computing environment.

**Note**  
Multi-AZ DB instances are cold standbys because the Db2 database is installed but not running. Standbys aren't readable, running, or serving requests. For more information, see [IBM Db2 licensing information]( https://www.ibm.com/support/customer/csol/terms/licenses#license-search) on the IBM website.

In this model, you continue to use your active IBM support account, and you contact IBM directly for Db2 database service requests. If you have an Support account with case support, you can contact Support for Amazon RDS issues. Amazon Web Services and IBM have a multi-vendor support process for cases that require assistance from both organizations. 

Amazon RDS supports the BYOL model for Db2 Standard Edition and Db2 Advanced Edition.

**Topics**
+ [IBM IDs for bring your own license (BYOL) for Db2](#db2-prereqs-ibm-info)
+ [Adding IBM IDs to a parameter group for RDS for Db2 DB instances](#db2-licensing-options-byol-adding-ids)
+ [Integrating with AWS License Manager](#db2-lms-integration)

### IBM IDs for bring your own license (BYOL) for Db2
<a name="db2-prereqs-ibm-info"></a>

In the BYOL model, you need your IBM Customer ID and your IBM Site ID to create, modify, or restore RDS for Db2 DB instances. You must create a custom parameter group with your IBM Customer ID and your IBM Site ID *before* you create an RDS for Db2 DB instance. For more information, see [Adding IBM IDs to a parameter group for RDS for Db2 DB instances](#db2-licensing-options-byol-adding-ids). You can run multiple RDS for Db2 DB instances with different IBM Customer IDs and IBM Site IDs in the same AWS account or AWS Region. 

**Important**  
If we can't verify your license by your IBM Customer ID and your IBM Site ID, we might terminate any DB instances running with these unverified licenses.

If you're a new IBM Db2 customer, you must first purchase a Db2 software license from [https://www.ibm.com/products/db2/pricing](https://www.ibm.com/products/db2/pricing). After you purchase a Db2 software license, you will receive a Proof of Entitlement from IBM, which lists your IBM Customer ID and your IBM Site ID.

If you're an existing IBM Db2 customer, you can find your IBM Customer ID and your IBM Site ID on your Proof of Entitlement certificate from IBM. 

You can also find your IBM Customer ID and your IBM Site ID in your [IBM Passport Advantage Online](https://www.ibm.com/software/passportadvantage/pao_customer.html) account. After your log in, you can view both IDs on either the main page or the Software downloads page.

### Adding IBM IDs to a parameter group for RDS for Db2 DB instances
<a name="db2-licensing-options-byol-adding-ids"></a>

Because you can't modify default parameter groups, you must create a custom parameter group and then modify it to include the values for your IBM Customer ID and your IBM Site ID. For information about parameter groups, see [DB parameter groups for Amazon RDS DB instances](USER_WorkingWithDBInstanceParamGroups.md). 

**Important**  
You must create a custom parameter group with your IBM Customer ID and your IBM Site ID *before* you create an RDS for Db2 DB instance.

Use the parameter settings in the following table.


| Parameter | Value | 
| --- | --- | 
|  `rds.ibm_customer_id`  |  `<your IBM Customer ID>`  | 
|  `rds.ibm_site_id`  |  `<your IBM Site ID>`  | 
|  `ApplyMethod`  |  `immediate`, `pending-reboot`  | 

These parameters are dynamic, which means that any changes to them take effect immediately and that you don't need to reboot the DB instance. If you don't want the changes to take effect immediately, you can set `ApplyMethod` to `pending-reboot` and schedule these changes to be made during a maintenance window.

You can create and modify a custom parameter group by using the AWS Management Console, the AWS CLI, or the Amazon RDS API. 

#### Console
<a name="db2-licensing-options-adding-ids-console"></a>

**To add your IBM Customer ID and your IBM Site ID to a parameter group**

1. Create a new DB parameter group. For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameter group that you created. For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

#### AWS CLI
<a name="db2-licensing-options-adding-ids-cli"></a>

**To add your IBM Customer ID and your IBM Site ID to a parameter group**

1. Create a custom parameter group by running the [https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-parameter-group.html) command. 

   Include the following required options:
   + `--db-parameter-group-name` – A name for the parameter group that you are creating.
   + `--db-parameter-group-family` – The Db2 engine edition and major version. Valid values: `db2-se-11.5`, `db2-ae-11.5`. 
   + `--description` – A description for this parameter group.

   For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameters in the custom parameter group that you created by running the [https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-parameter-group.html) command.

   Include the following required options:
   + `--db-parameter-group-name` – The name of the parameter group that you created.
   + `--parameters` – An array of parameter names, values, and the application methods for the parameter update.

   For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

#### RDS API
<a name="db2-licensing-options-adding-ids-api"></a>

**To add your IBM Customer ID and your IBM Site ID to a parameter group**

1. Create a custom DB parameter group by using the Amazon RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html) operation.

   Include the following required parameters:
   + `DBParameterGroupName`
   + `DBParameterGroupFamily`
   + `Description`

   For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameters in the custom parameter group that you created by using the RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBParameterGroup.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBParameterGroup.html) operation.

   Include the following required parameters:
   + `DBParameterGroupName`
   + `Parameters`

   For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

Now you are ready to create a DB instance and attach the custom parameter group to the DB instance. For more information, see [Creating an Amazon RDS DB instance](USER_CreateDBInstance.md) and [Associating a DB parameter group with a DB instance in Amazon RDS](USER_WorkingWithParamGroups.Associating.md).

### Integrating with AWS License Manager
<a name="db2-lms-integration"></a>

To aid in monitoring RDS for Db2 license usage in the BYOL model, [AWS License Manager](https://aws.amazon.com/license-manager/) integrates with RDS for Db2. License Manager supports tracking of RDS for Db2 engine editions based on virtual CPUs (vCPUs). You can also use License Manager with AWS Organizations to manage all of your organizational accounts centrally.

To track license usage of your RDS for Db2 DB instances, you must create self-managed licenses. You can create self-managed licenses by using the AWS Management Console, the AWS License Manager CLI, and the AWS License Manager API. Or, you can automate the creation of self-managed licenses with CloudFormation and Terraform templates. 

RDS for Db2 resources that match the product information filter are automatically associated with the self-managed license. Discovery of RDS for Db2 DB instances can take up to 24 hours.

The following table shows available values for the Engine Edition product information filter for RDS for Db2.


| Value | Description | 
| --- | --- | 
|  `db2-se`  |  Db2 Standard Edition  | 
|  `db2-ae`  |  Db2 Advanced Edition  | 

**Topics**
+ [Terminology](#db2-lms-integration-terms)
+ [Creating a self-managed license in AWS License Manager](#db2-lms-integration-tracking)
+ [Automating the creation of self-managed licenses in AWS License Manager with templates](#db2-lms-integration-templates)
+ [Settings for creating self-managed licenses](#db2-settings-lms)

#### Terminology
<a name="db2-lms-integration-terms"></a>

This page uses the following terminology when discussing the Amazon RDS integration with AWS License Manager.

Self-managed license  
Self-managed license is a term used in AWS License Manager. The Amazon RDS console refers to the license as an AWS License Manager configuration. A self-managed license contains licensing rules based on the terms of your enterprise agreements. The rules that you create determine how AWS processes commands that consume licenses. While creating a self-managed license, work closely with your organization's compliance team to review your enterprise agreements. For more information, see [Self-managed licenses in License Manager](https://docs.aws.amazon.com/license-manager/latest/userguide/license-configurations.html).

#### Creating a self-managed license in AWS License Manager
<a name="db2-lms-integration-tracking"></a>

You can create a self-managed license by using the AWS Management Console, the AWS License Manager CLI, and the AWS License Manager API.

**Note**  
If you create an RDS for Db2 DB instance by using the AWS Management Console, you will create a self-managed license by entering a name for the license. Then Amazon RDS associates the DB instance with this license. (In the Amazon RDS console, this license is referred to as an AWS License Manager configuration.) If you want to create an RDS for Db2 DB instance by using the AWS License Manager CLI or AWS License Manager API, you must first create a self-managed license with the following steps. The same situation applies to restoring an RDS for Db2 DB instance to a point in time or from a snapshot.

##### Console
<a name="db2-lms-integration.console"></a>

**To create a self-managed license to track the license usage of your RDS for Db2 DB instances**

1. Go to [https://console.aws.amazon.com/license-manager/](https://console.aws.amazon.com/license-manager/).

1. Create a self-managed license.

   For instructions, see [Create a self-managed license](https://docs.aws.amazon.com/license-manager/latest/userguide/create-license-configuration.html) in the *AWS License Manager User Guide*.

   Add a rule for an **RDS Product Information Filter** in the **Product Information** panel.

   For more information, see [ProductInformation](https://docs.aws.amazon.com/license-manager/latest/APIReference/API_ProductInformation.html) in the *AWS License Manager API Reference*.

##### AWS License Manager CLI
<a name="db2-lms-integration.cli"></a>

**Note**  
This procedure uses an AWS License Manager CLI command.

To create a self-managed license by using the AWS CLI, run the AWS License Manager [create-license-configuration](https://docs.aws.amazon.com/cli/latest/reference/license-manager/create-license-configuration.html) command. Use the `--cli-input-json` or `--cli-input-yaml` options to pass the options to the command. 

For more information, see [Settings for creating self-managed licenses](#db2-settings-lms).

The following command creates a self-managed license for Db2 Standard Edition.

```
aws license-manager create-license-configuration --cli-input-json file://rds-db2-se.json
```

The following JSON is the content of the `rds-db2-se.json` file used in the previous command.

```
{
    "Name": "rds-db2-se",
    "Description": "RDS Db2 Standard Edition",
    "LicenseCountingType": "vCPU",
    "LicenseCountHardLimit": false,
    "ProductInformationList": [
        {
            "ResourceType": "RDS",
            "ProductInformationFilterList": [
                {
                    "ProductInformationFilterName": "Engine Edition",
                    "ProductInformationFilterValue": ["db2-se"],
                    "ProductInformationFilterComparator": "EQUALS"
                }
            ]
        }
    ]
}
```

For more information about product information, see [Automated discovery of resource inventory](https://docs.aws.amazon.com/license-manager/latest/userguide/automated-discovery.html) in the *AWS License Manager User Guide*.

For more information about the `--cli-input` parameter, see [Generating AWS CLI skeleton and input parameters from a JSON or YAML input file](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-skeleton.html) in the *AWS CLI User Guide*.

##### AWS License Manager API
<a name="db2-lms-integration.api"></a>

**Note**  
This procedure uses an AWS License Manager API command.

To create a self-managed license, use the [https://docs.aws.amazon.com/license-manager/latest/APIReference/API_CreateLicenseConfiguration.html](https://docs.aws.amazon.com/license-manager/latest/APIReference/API_CreateLicenseConfiguration.html) AWS License Manager API operation with the following required parameters:
+ `Name`
+ `LicenseCountingType` 
+ `ProductInformationList`
+ `ResourceType`
+ `ProductInformationFilterList`
+ `ProductInformationFilterName`
+ `ProductInformationFilterValue`
+ `ProductInformationFilterComparator`

For more information about the parameters, see [Settings for creating self-managed licenses](#db2-settings-lms).

#### Automating the creation of self-managed licenses in AWS License Manager with templates
<a name="db2-lms-integration-templates"></a>

You can automate the creation of self-managed licenses by using CloudFormation and Terraform templates.

The following example CloudFormation template creates self-managed licenses for Db2 Standard Edition on RDS for Db2. For a template for Db2 Advanced Edition, update the values for `Name`, `Description`, and `ProductInformationFilter`.

```
AWSTemplateFormatVersion: "2010-09-09"
Description: CloudFormation template to create a License Configuration for Db2 Standard Edition on RDS for Db2.

Resources:
  Db2LicenseConfiguration:
    Type: "AWS::LicenseManager::LicenseConfiguration"
    Properties:
      Name: "rds-db2-se"
      Description: "Db2 Standard Edition on RDS for Db2"
      LicenseCountingType: "vCPU"
      LicenseCountHardLimit: false
      ProductInformationList:
        - ResourceType: "RDS"
          ProductInformationFilterList:
            - ProductInformationFilterName: "Engine Edition"
              ProductInformationFilterValue:
                - "db2-se"
              ProductInformationFilterComparator: "EQUALS"
```

For more information about using CloudFormation with Amazon RDS, see [Creating Amazon RDS resources with AWS CloudFormation](creating-resources-with-cloudformation.md).

The following example Terraform template creates self-managed licenses for Db2 Standard Edition on RDS for Db2. Replace *us-east-1* with your AWS Region. For a template for Db2 Advanced Edition, update the values for `name`, `description`, and `product_information_filter`.

```
provider "aws" {
  region = "us-east-1"
}

resource "aws_licensemanager_license_configuration" "rds_db2_license_config" {
  name                     = "rds-db2-se"
  description              = "Db2 Standard Edition on RDS for Db2
  license_counting_type    = "vCPU"
  license_count_hard_limit = false

  product_information_list {
    resource_type = "RDS"

    product_information_filter {
      name       = "Engine Edition"
      comparator = "EQUALS"
      value      = ["db2-se"]
    }
  }
}
```

For more information about using Terraform and Amazon RDS, see [Using Terraform as an IaC tool for the AWS Cloud](https://docs.aws.amazon.com/prescriptive-guidance/latest/choose-iac-tool/terraform.html) and [Best practices for using the Terraform AWS Provider](https://docs.aws.amazon.com/prescriptive-guidance/latest/terraform-aws-provider-best-practices/introduction.html) in * AWS Prescriptive Guidance*.

#### Settings for creating self-managed licenses
<a name="db2-settings-lms"></a>

In the following table, you can find details about the settings for creating self-managed licenses by using the AWS License Manager CLI, the AWS License Manager API, an CloudFormation template, and a Terraform template. The parameter name in the following table appears in the format of the name used in the AWS License Manager API and the CloudFormation template.


| Parameter name | Data type | Required | Description | 
| --- | --- | --- | --- | 
|  Name  |  string  |  Yes  |  The name of the license configuration.  | 
|  Description  |  string  |  No  |  The description of the license configuration.  | 
|  LicenseCountingType  |  string  |  Yes  |  The dimension used to track the license inventory. Valid value: `vCPU`.  | 
| LicenseCountHardLimit | boolean | No | Indicates whether hard or soft license enforcement is used. Exceeding a hard limit blocks the launch of new instances. | 
|  ProductInformationList  |  array of objects  |  Yes  | A list of product information for a license configuration. | 
|  ResourceType  |  string  |  Yes  |  The resource type. Valid value: `RDS`.  | 
|  ProductInformationFilterList  |  array of objects  |  Yes  |  A list of product information filters for a license configuration.  | 
|  ProductInformationFilterName  |  string  |  Yes  |  The name of the type of filter being declared. Valid value: `Engine Edition`.  | 
|  ProductInformationFilterValue  |  array of strings  | Yes |  The value to filter on. You must only specify one value. Valid values: `db2-se` or `db2-ae`.  | 
| ProductInformationFilterComparator |  string  |  Yes  | The logical operator for ProductInformationFilterName. Valid value: EQUALS. | 

## Db2 license through AWS Marketplace
<a name="db2-licensing-options-marketplace"></a>

In the Db2 license through AWS Marketplace model, you pay an hourly rate to subscribe to Db2 licenses. This model helps you get started quickly with RDS for Db2 without needing to purchase licenses. 

To use Db2 license through AWS Marketplace, you need an active AWS Marketplace subscription for the particular IBM Db2 edition that you want to use. If you don't already have one, [subscribe to AWS Marketplace](#db2-marketplace-subscribing-registering) for that IBM Db2 edition.

Amazon RDS supports Db2 license through AWS Marketplace for IBM Db2 Standard Edition and IBM Db2 Advanced Edition.

**Topics**
+ [Terminology](#db2-marketplace-terminology)
+ [Payments and billing](#db2-marketplace-billing)
+ [Subscribing to Db2 Marketplace listings and registering with IBM](#db2-marketplace-subscribing-registering)
+ [Obtaining a private offer](#db2-marketplace-private-offer)

### Terminology
<a name="db2-marketplace-terminology"></a>

This page uses the following terminology when discussing the Amazon RDS integration with AWS Marketplace.

SaaS subscription  
In AWS Marketplace, software-as-a-service (SaaS) products such as the pay-as-you-go license model adopt a usage-based subscription model. IBM, the software seller for Db2, tracks your usage and you pay only for what you use.

Public offer  
Public offers allow you to purchase AWS Marketplace products directly from the AWS Management Console.

Private offer  
Private offers are a purchasing program that allow sellers and buyers to negotiate custom prices and end user licensing agreement (EULA) terms for purchases in AWS Marketplace.

Db2 Marketplace fees  
Fees charged for the Db2 software license usage by IBM. These service fees are metered through AWS Marketplace and appear on your AWS bill under the AWS Marketplace section.

Amazon RDS fees  
Fees that AWS charges for the RDS for Db2 services, which excludes licenses when using AWS Marketplace for Db2 licenses. Fees are metered through the Amazon RDS service being used and appear on your AWS bill.

### Payments and billing
<a name="db2-marketplace-billing"></a>

RDS for Db2 integrates with AWS Marketplace to offer hourly, pay-as-you-go licenses for Db2. The Db2 Marketplace fees cover the license costs of the Db2 software, and the Amazon RDS fees cover the costs of your RDS for Db2 DB instance usage. For information about pricing, see [Amazon RDS for Db2 pricing](https://aws.amazon.com/rds/db2/pricing/).

To stop these fees, you must delete any RDS for Db2 DB instances. In addition, you can remove your subscriptions to AWS Marketplace for Db2 licenses. If you remove your subscriptions without deleting your DB instances, Amazon RDS will continue to bill you for the use of the DB instances. For more information, see [Deleting a DB instance](USER_DeleteInstance.md).

You can view bills and manage payments for your RDS for Db2 DB instances that use Db2 license through AWS Marketplace in the [AWS Billing console](https://console.aws.amazon.com/billing). Your bills includes two charges: one for your usage of Db2 license through AWS Marketplace and one for your usage of Amazon RDS. For more information about billing, see [Viewing your bill](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/getting-viewing-bill.html) in the *AWS Billing and Cost Management User Guide*.

### Subscribing to Db2 Marketplace listings and registering with IBM
<a name="db2-marketplace-subscribing-registering"></a>

To use Db2 license through AWS Marketplace, you must use the AWS Management Console to complete the following two tasks. You can't complete these tasks through the AWS CLI or the RDS API.

**Note**  
If you want to create your DB instances by using the AWS CLI or the RDS API, you must complete these two tasks first.

**Topics**
+ [Task 1: Subscribe to Db2 in AWS Marketplace](#db2-marketplace-subscribing)
+ [Task 2: Register your subscription with IBM](#db2-marketplace-registering)

#### Task 1: Subscribe to Db2 in AWS Marketplace
<a name="db2-marketplace-subscribing"></a>

To use Db2 license with AWS Marketplace, you need to have an active AWS Marketplace subscription for Db2. Because subscriptions are associated with a specific IBM Db2 edition, you need to subscribe to Db2 in AWS Marketplace for each edition of Db2 that you want to use: [IBM Db2 Advanced Edition](https://aws.amazon.com/marketplace/pp/prodview-w6m4yctzzy5fk), [IBM Db2 Standard Edition](https://aws.amazon.com/marketplace/pp/prodview-gbsgwalbkphv6). For information about AWS Marketplace subscriptions, see [Saas usage-based subscriptions](https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-saas-products.html#saas-pricing-models) in the *AWS Marketplace Buyer Guide*.

We recommend that you subscribe to Db2 in AWS Marketplace *before* you start to [create a DB instance](USER_CreateDBInstance.md). 

#### Task 2: Register your subscription with IBM
<a name="db2-marketplace-registering"></a>

After you subscribe to Db2 in AWS Marketplace, complete the registration of your IBM order from the AWS Marketplace page for the type of Db2 subscription that you chose. On the AWS Marketplace page, choose **View purchase options**, and then choose **Set up your account**. You can register either with your existing IBM account or by creating a free IBM account. 

### Obtaining a private offer
<a name="db2-marketplace-private-offer"></a>

You can request an AWS Marketplace private offer for Db2 from IBM. For more information, see [Private offers](https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-private-offers.html) in the *AWS Marketplace Buyer Guide*.

**Note**  
If you are an AWS Organizations user and received a private offer that was issued to your payer and member accounts, follow the procedure below to subscribe to Db2 directly on each account in your organization.

**To obtain a Db2 private offer**

1. After a private offer has been issued, sign in to the AWS Marketplace Console.

1. Open the email with a Db2 private offer link.

1. Follow the link to directly access the private offer.
**Note**  
Following this link before logging in to the correct account will result in a **Page note found** (404) error.

1. Review the terms and conditions.

1. Choose **Accept terms**.
**Note**  
If an AWS Marketplace private offer is not accepted, the Db2 service fees from AWS Marketplace will continue to be billed at the public hourly rate.

1. To verify the offer details, select **Show details** in the product listing.

After you've completed the procedure, you can create your DB instance by following the steps in [Creating an Amazon RDS DB instance](USER_CreateDBInstance.md). In the AWS Management Console, under **License**, make sure that you choose **Through AWS Marketplace**.

## Switching between Db2 licenses
<a name="db2-edition-license-switching"></a>

You can switch between Db2 licenses in RDS for Db2. For example, you can start with bring your own license (BYOL), and then switch to Db2 license through AWS Marketplace. 

**Important**  
If you want to switch to Db2 license through AWS Marketplace, make sure that you have an active AWS Marketplace subscription for the IBM Db2 edition that you want to use. If you don't, first [subscribe to Db2 in AWS Marketplace](#db2-marketplace-subscribing-registering) for that Db2 edition, and then complete the restore procedure. 

### Console
<a name="db2-restore-pitr-console"></a>

**To switch between Db2 licenses**

1. Sign in to the AWS Management Console and open the Amazon RDS console at [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/).

1. In the navigation pane, choose **Automated backups**.

   The automated backups are displayed on the **Current Region** tab.

1. Choose the DB instance that you want to restore.

1. For **Actions**, choose **Restore to point in time**.

   The **Restore to point in time** window appears.

1. Choose **Latest restorable time** to restore to the latest possible time, or choose **Custom** to choose a time.

   If you chose **Custom**, enter the date and time you want to restore the instance to.
**Note**  
Times are shown in your local time zone, which is indicated by an offset from Coordinated Universal Time (UTC). For example, UTC-5 is Eastern Standard Time/Central Daylight Time.

1. For **DB engine**, choose the Db2 license you want to use.

1. For **DB instance identifier**, enter the name of the target restored DB instance. The name must be unique.

1. Choose other options as needed, such as DB instance class, storage, and whether you want to use storage autoscaling.

   For information about each setting, see [Settings for DB instances](USER_CreateDBInstance.Settings.md).

1. Choose **Restore to point in time**. 

For more information, see [Restoring a DB instance to a specified time for Amazon RDS](USER_PIT.md).

### AWS CLI
<a name="db2-restore-pitr-cli"></a>

To switch between Db2 licenses, run the [restore-db-instance-to-point-in-time](https://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-to-point-in-time.html) command. The following example restores the latest point-in-time version, sets the DB engine to IBM Db2 Advanced Edition, and sets the license model to Db2 license through AWS Marketplace.

You can specify other settings. For information about each setting, see [Settings for DB instances](USER_CreateDBInstance.Settings.md).

**Example**  
For Linux, macOS, or Unix:  

```
1. aws rds restore-db-instance-to-point-in-time \
2.     --source-db-instance-identifier my_source_db_instance \
3.     --target-db-instance-identifier my_target_db_instance \
4.     --use-latest-restorable-time \
5.     --engine db2-ae \
6.     --license-model marketplace-license
```
For Windows:  

```
1. aws rds restore-db-instance-to-point-in-time ^
2.     --source-db-instance-identifier my_source_db_instance ^
3.     --target-db-instance-identifier my_target_db_instance ^
4.     --use-latest-restorable-time ^
5.     --engine db2-ae ^
6.     --license-model marketplace-license
```

For more information, see [Restoring a DB instance to a specified time for Amazon RDS](USER_PIT.md).

### RDS API
<a name="db2-restore-pitr-api"></a>

To switch between Db2 licenses, call the Amazon RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceToPointInTime.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceToPointInTime.html) operation with the following parameters:
+ `SourceDBInstanceIdentifier`
+ `TargetDBInstanceIdentifier`
+ `RestoreTime`
+ `Engine`
+ `LicenseModel`

For more information, see [Restoring a DB instance to a specified time for Amazon RDS](USER_PIT.md).

# Amazon RDS for Db2 instance classes
<a name="Db2.Concepts.General.InstanceClasses"></a>

The computation and memory capacity of a DB instance is determined by its instance class. The DB instance class you need depends on your processing power and memory requirements.



## Supported RDS for Db2 instance classes
<a name="Db2.Concepts.InstanceClasses.Supported"></a>

The supported Amazon RDS for Db2 instance classes are a subset of the Amazon RDS DB instance classes. For the complete list of Amazon RDS instance classes, see [DB instance classes](Concepts.DBInstanceClass.md).

**Topics**
+ [Supported RDS for Db2 instance classes for Db2 Standard Edition](#Db2.Concepts.InstanceClasses.Supported.SE)
+ [Supported RDS for Db2 instance classes for Db2 Advanced Edition](#Db2.Concepts.InstanceClasses.Supported.AE)

### Supported RDS for Db2 instance classes for Db2 Standard Edition
<a name="Db2.Concepts.InstanceClasses.Supported.SE"></a>

The following table lists all instance classes supported for the Db2 Standard Edition of Db2 database version 11.5.9.0. These instance classes are available for both bring your own license (BYOL) and Db2 license through AWS Marketplace.


| Instance class type | Instance class | 
| --- | --- | 
|  General purpose instance classes with 3rd generation Intel Xeon Scalable processors, SSD storage, and network optimization  |  db.m6idn.large–db.m6idn.8xlarge  | 
|  General purpose instance classes powered by 3rd generation Intel Xeon Scalable processors  |  db.m6in.large–db.m6in.8xlarge  | 
|  General purpose instance classes  |  db.m7i.large–db.m7i.8xlarge db.m6i.large–db.m6i.8xlarge  | 
|  Memory optimized instance classes with local NVMe-based SSDs, powered by 3rd generation Intel Xeon Scalable processors  |  db.x2iedn.xlarge  | 
|  Memory optimized instance classes powered by 3rd generation Intel Xeon Scalable processors  |  db.r6idn.large–db.r6idn.4xlarge db.r6in.large–db.r6in.4xlarge  | 
|  Memory optimized instance classes  |  db.r7i.large–db.r7i.8xlarge db.r6i.large–db.r6i.4xlarge  | 
|  Burstable performance instance classes  |  db.t3.small–db.t3.2xlarge  | 

### Supported RDS for Db2 instance classes for Db2 Advanced Edition
<a name="Db2.Concepts.InstanceClasses.Supported.AE"></a>

The following table lists all instance classes supported for the Db2 Advanced Edition of Db2 database version 11.5.9.0. These instance classes are available for both bring your own license (BYOL) and Db2 license through AWS Marketplace.


| Instance class type | Instance class | 
| --- | --- | 
|  General purpose instance classes with 3rd generation Intel Xeon Scalable processors, SSD storage, and network optimization  |  db.m6idn.large–db.m6idn.32xlarge  | 
|  General purpose instance classes powered by 3rd generation Intel Xeon Scalable processors  |  db.m6in.large–db.m6in.32xlarge  | 
|  General purpose instance classes  |  db.m6i.large–db.m7i.48xlarge db.m7i.large–db.m7i.48xlarge  | 
|  Memory optimized instance classes with local NVMe-based SSDs, powered by 3rd generation Intel Xeon Scalable processors  |  db.x2iedn.xlarge–db.x2iedn.32xlarge  | 
|  Memory optimized instance classes powered by 3rd generation Intel Xeon Scalable processors  |  db.r6idn.large–db.r6idn.32xlarge db.r6in.8xlarge–db.r6in.32xlarge  | 
|  Memory optimized instance classes  |  db.r6i.large–db.r7i.48xlarge db.r7i.large–db.r7i.48xlarge  | 
|  Burstable performance instance classes  |  db.t3.small–db.t3.2xlarge  | 

# Amazon RDS for Db2 default roles
<a name="db2-default-roles"></a>

RDS for Db2 adds the following six roles and grants them to the `master_user_role` with the `ADMIN` option. When the database is provisioned, RDS for Db2 grants `master_user_role` to the master user. The master user can in turn grant these roles to other users, groups, or roles with native `GRANT` statements by connecting to the database.
+ **DBA** – RDS for Db2 creates this empty role with `DATAACCESS` authorization. The master user can add more authorizations or privileges to this role, and then grant the role to other users, groups, or roles. 
+ **DBA\$1RESTRICTED** – RDS for Db2 creates this empty role. The master user can add privileges to this role, and then grant the role to other users, groups, or roles.
+ **DEVELOPER** – RDS for Db2 creates this empty role with `DATAACCESS` authorization. The master user can add more authorizations or privileges to this role, and then grant the role to other users, groups, or roles. 
+ **ROLE\$1NULLID\$1PACKAGES** – RDS for Db2 grants `EXECUTE` privileges to this role on `ALL NULLID` packages that were bound by Db2 when `CREATE DATABASE` was run.
+ **ROLE\$1PROCEDURES** – RDS for Db2 grants `EXECUTE` privileges to this role on all `SYSIBM` procedures.
+ **ROLE\$1TABLESPACES** – RDS for Db2 grants `USAGE` privileges on tablespaces created by the `CREATE DATABASE` command.

# Amazon RDS for Db2 parameters
<a name="db2-supported-parameters"></a>

Amazon RDS for Db2 uses three types of parameters: database manager configuration parameters, registry variables, and database configuration parameters. You can manage the first two types through parameter groups and the last type through the [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param) stored procedure.

By default, an RDS for Db2 DB instance uses a DB parameter group that is specific to a Db2 database and DB instance. This parameter group contains parameters for the IBM Db2 database engine, specifically the database manager configuration parameters and registry variables. For information about working with parameter groups, see [Parameter groups for Amazon RDS](USER_WorkingWithParamGroups.md).

RDS for Db2 database configuration parameters are set to the default values of the storage engine that you have selected. For more information about Db2 parameters, see the [Db2 database configuration parameters](https://www.ibm.com/docs/en/db2/11.5?topic=parameters-database-configuration) in the IBM Db2 documentation.

**Topics**
+ [Viewing the parameters in parameter groups](#db2-viewing-parameter-group-parameters)
+ [Viewing all parameters with Db2 commands](#db2-viewing-parameters-db2-commands)
+ [Modifying the parameters in parameter groups](#db2-modifying-parameter-group-parameters)
+ [Modifying the database configuration parameters with Db2 commands](#db2-modifying-parameters-db2-commands)

## Viewing the parameters in parameter groups
<a name="db2-viewing-parameter-group-parameters"></a>

The database manager configuration parameters and the registry variables are set in parameter groups. You can view the database manager configuration parameters and the registry variables for a specific Db2 version by using the AWS Management Console, the AWS CLI, or the RDS API.

### Console
<a name="db2-viewing-parameter-group-parameters-console"></a>

**To view the parameter values for a DB parameter group**

1. Sign in to the AWS Management Console and open the Amazon RDS console at [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/).

1. In the navigation pane, choose **Parameter groups**.

   The DB parameter groups appear in a list.

1. Choose the name of the parameter group to see its list of parameters.

### AWS CLI
<a name="db2-viewing-parameter-group-parameters-cli"></a>

You can view the database manager configuration parameters and the registry variables for a Db2 version by running the [https://docs.aws.amazon.com/cli/latest/reference/rds/describe-engine-default-parameters.html](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-engine-default-parameters.html) command. Specify one of the following values for the `--db-parameter-group-family` option:
+ `db2-ae-11.5`
+ `db2-se-11.5`

For example, to view the parameters for Db2 Standard Edition 11.5, run the following command:

```
aws rds describe-engine-default-parameters --db-parameter-group-family db2-se-11.5
```

This command produces output similar to the following example:



```
{
    "EngineDefaults": {
        "Parameters": [
            {
                "ParameterName": "agent_stack_sz",
                "ParameterValue": "1024",
                "Description": "You can use this parameter to determine the amount of memory that is allocated by Db2 for each agent thread stack.",
                "Source": "engine-default",
                "ApplyType": "static",
                "DataType": "integer",
                "AllowedValues": "256-32768",
                "IsModifiable": false
            },
            {
                "ParameterName": "agentpri",
                "ParameterValue": "-1",
                "Description": "This parameter controls the priority given to all agents and to other database manager instance processes and threads by the operating system scheduler. This priority determines how CPU time is allocated to the database manager processes, agents, and threads relative to other processes and threads running on the machine.",
                "Source": "engine-default",
                "ApplyType": "static",
                "DataType": "integer",
                "AllowedValues": "1-99",
                "IsModifiable": false
            },
            ...
        ]
    }
}
```

To list only the modifiable parameters for Db2 Standard Edition 11.5, run the following command:

For Linux, macOS, or Unix:

```
aws rds describe-engine-default-parameters \
    --db-parameter-group-family db2-se-11.5 \
    --query 'EngineDefaults.Parameters[?IsModifiable==`true`].{ParameterName:ParameterName, DefaultValue:ParameterValue}'
```

For Windows:

```
aws rds describe-engine-default-parameters ^
    --db-parameter-group-family db2-se-11.5 ^
    --query 'EngineDefaults.Parameters[?IsModifiable==`true`].{ParameterName:ParameterName, DefaultValue:ParameterValue}'
```

### RDS API
<a name="db2-viewing-parameter-group-parameters-api"></a>

To view the parameter values for a DB parameter group, use the [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html) operation with the following required parameter.
+ `DBParameterGroupName`

## Viewing all parameters with Db2 commands
<a name="db2-viewing-parameters-db2-commands"></a>

You can view the settings for database manager configuration parameters, database configuration parameters, and registry variables by using Db2 commands.

**To view the settings**

1. Connect to your Db2 database. In the following example, replace *database\$1name*, *master\$1username*, and *master\$1password* with your information.

   ```
   db2 "connect to database_name user master_username using master_password"
   ```

1. Find the supported Db2 version.

   ```
   db2 "select service_level, fixpack_num from table(sysproc.env_get_inst_info()) as instanceinfo"
   ```

1. View the parameters for a specific Db2 version.
   + View database manager configuration parameters by running the following command:

     ```
     db2 "select cast(substr(name,1,24) as varchar(24)) as name, case 
         when value_flags = 'NONE' then '' else value_flags end flags, 
         cast(substr(value,1,64) as varchar(64)) as current_value
         from sysibmadm.dbmcfg
         order by name asc with UR"
     ```
   + View all of your database configuration parameters by running the following command:

     ```
     db2 "select cast(substr(name,1,24) as varchar(24)) as name, case 
         when value_flags = 'NONE' then '' else value_flags end flags, 
         cast(substr(value,1,64) as varchar(64)) as current_value 
         from table(db_get_cfg(null)) order by name asc, member asc with UR"
     ```
   + View the currently set registry variables by running the following command:

     ```
     db2 "select cast(substr(reg_var_name,1,50) as varchar(50)) as reg_var_name, 
         cast(substr(reg_var_value,1,50) as varchar(50)) as reg_var_value, 
         level from table(env_get_reg_variables(null)) 
         order by reg_var_name,member with UR"
     ```

## Modifying the parameters in parameter groups
<a name="db2-modifying-parameter-group-parameters"></a>

You can modify the database manager configuration parameters and the registry variables in custom parameter groups by using the AWS Management Console, the AWS CLI, or the RDS API. For more information, see [DB parameter groups for Amazon RDS DB instances](USER_WorkingWithDBInstanceParamGroups.md).

### Console
<a name="db2-modifying-parameter-group-parameters-console"></a>

**To modify database manager configuration parameters and registry variables**

1. Create a custom parameter group. For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameters in that custom parameter group. For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

### AWS CLI
<a name="db2-modifying-parameter-group-parameters-cli"></a>

**To modify database manager configuration parameters and registry variables**

1. Create a custom parameter group by running the [https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-parameter-group.html) command. 

   Include the following required options:
   + `--db-parameter-group-name` – A name for the parameter group that you are creating.
   + `--db-parameter-group-family` – The Db2 engine edition and major version. Valid values: `db2-se-11.5`, `db2-ae-11.5`. 
   + `--description` – A description for this parameter group.

   For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameters in the custom parameter group that you created by running the [https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-parameter-group.html) command.

   Include the following required options:
   + `--db-parameter-group-name` – The name of the parameter group that you created.
   + `--parameters` – An array of parameter names, values, and the application methods for the parameter update.

   For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

### RDS API
<a name="db2-modifying-parameter-group-parameters-api"></a>

**To modify database manager configuration parameters and registry variables**

1. Create a custom DB parameter group by using the [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html) operation.

   Include the following required parameters:
   + `DBParameterGroupName`
   + `DBParameterGroupFamily`
   + `Description`

   For more information about creating a DB parameter group, see [Creating a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Creating.md).

1. Modify the parameters in the custom parameter group that you created by using the [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBParameterGroup.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBParameterGroup.html) operation.

   Include the following required parameters:
   + `DBParameterGroupName`
   + `Parameters`

   For more information about modifying a parameter group, see [Modifying parameters in a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Modifying.md).

## Modifying the database configuration parameters with Db2 commands
<a name="db2-modifying-parameters-db2-commands"></a>

You can modify the database configuration parameters with Db2 commands.

**To modify the database configuration parameters**

1. Connect to the `rdsadmin` database. In the following example, replace *master\$1username* and *master\$1password* with your information.

   ```
   db2 "connect to rdsadmin user master_username using master_password"
   ```

1. Change the database configuration parameters by calling the `rdsadmin.update_db_param` stored procedure. For more information, see [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param). 

   ```
   db2 "call rdsadmin.update_db_param(
       'database_name', 
       'parameter_to_modify', 
       'changed_value',
       'restart_database')"
   ```

# EBCDIC collation for Db2 databases on Amazon RDS
<a name="db2-ebcdic"></a>

Amazon RDS for Db2 supports EBCDIC collation for Db2 databases. You can only specify an EBCDIC collation sequence for a database when you create the database by using the Amazon RDS [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) stored procedure. 

When you create an RDS for Db2 DB instance by using the AWS Management Console, AWS CLI, or RDS API, you can specify a database name. If you specify a database name, Amazon RDS creates a database with the default collation of `SYSTEM`. If you need to create a database with EBCDIC collation, don't specify a database name when you create a DB instance.

The collation for a database in RDS for Db2 is set at the time of creation and is immutable.

**To create a Db2 database with EBCDIC collation**

1. If you don't have an RDS for Db2 DB instance, create a DB instance but don't specify a database name You can create a DB instance by using the AWS Management Console, AWS CLI, or RDS API. For more information, see [Creating a DB instance](USER_CreateDBInstance.md#USER_CreateDBInstance.Creating).

1. Create a Db2 database and set the collation option to an EBCDIC value by calling the `rdsadmin.create_database` stored procedure. For more information, see [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database).
**Important**  
After you create a database using the stored procedure, you can't change the collation sequence. If you want a database to use a different collation sequence, drop the database by calling the [rdsadmin.drop\$1database](db2-sp-managing-databases.md#db2-sp-drop-database) stored procedure. Then, create a database with the required collation sequence.

# Local time zone for Amazon RDS for Db2 DB instances
<a name="db2-time-zone"></a>

The time zone of an Amazon RDS DB instance running Db2 is set by default. The default is Coordinated Universal Time (UTC). To match the time zone of your applications, you can set the time zone of your DB instance to a local time zone instead.

You set the time zone when you first create your DB instance. You can create your DB instance by using the AWS Management Console, the RDS API, or the AWS CLI. For more information, see [Creating a DB instance](USER_CreateDBInstance.md#USER_CreateDBInstance.Creating).

If your DB instance is part of a Multi-AZ deployment, then when it fails over, its time zone remains the local time zone that you set.

You can restore your DB instance to a point in time that you specify. The time appears in your local time zone. For more information, see [Restoring a DB instance to a specified time for Amazon RDS](USER_PIT.md).

Setting the local time zone on your DB instance has the following limitations:
+ You can't modify the time zone of an existing Amazon RDS for Db2 DB instance.
+ You can't restore a snapshot from a DB instance in one time zone to a DB instance in a different time zone.
+ We strongly recommend that you don't restore a backup file from one time zone to a different time zone. If you restore a backup file from one time zone to another, then you must audit your queries and applications for the effects of the time zone change.

## Available time zones
<a name="db2-time-zone-values"></a>

You can use the following values for the time zone setting.


| Zone | Time zone | 
| --- | --- | 
|  Africa  |  Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Lagos, Africa/Luanda, Africa/Monrovia, Africa/Nairobi, Africa/Tripoli, Africa/Windhoek  | 
|  America  |  America/Araguaina, America/Argentina/Buenos\$1Aires, America/Asuncion, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Cuiaba, America/Denver, America/Detroit, America/Fortaleza, America/Godthab, America/Guatemala, America/Halifax, America/Lima, America/Los\$1Angeles, America/Manaus, America/Matamoros, America/Mexico\$1City, America/Monterrey, America/Montevideo, America/New\$1York, America/Phoenix, America/Santiago, America/Sao\$1Paulo, America/Tijuana, America/Toronto  | 
|  Asia  |  Asia/Amman, Asia/Ashgabat, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Beirut, Asia/Calcutta, Asia/Damascus, Asia/Dhaka, Asia/Hong\$1Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Magadan, Asia/Manila, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Taipei, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Vladivostok, Asia/Yakutsk, Asia/Yerevan  | 
|  Atlantic  |  Atlantic/Azores, Atlantic/Cape\$1Verde  | 
|  Australia  |  Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Eucla, Australia/Hobart, Australia/Lord\$1Howe, Australia/Perth, Australia/Sydney  | 
|  Brazil  |  Brazil/DeNoronha, Brazil/East  | 
|  Canada  |  Canada/Newfoundland, Canada/Saskatchewan  | 
|  Etc  |  Etc/GMT-3  | 
|  Europe  |  Europe/Amsterdam, Europe/Athens, Europe/Berlin, Europe/Dublin, Europe/Helsinki, Europe/Kaliningrad, Europe/London, Europe/Madrid, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Sarajevo, Europe/Stockholm  | 
|  Pacific  |  Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fiji, Pacific/Guam, Pacific/Honolulu, Pacific/Kiritimati, Pacific/Marquesas, Pacific/Samoa, Pacific/Tongatapu, Pacific/Wake  | 
|  US  |  US/Alaska, US/Central, US/East-Indiana, US/Eastern, US/Pacific  | 
|  UTC  |  UTC  | 