

# Troubleshooting for Amazon RDS for Db2
<a name="db2-troubleshooting"></a>

The following content can help you troubleshoot issues that you encounter with RDS for Db2.

For more information about general Amazon RDS troubleshooting issues, see [Troubleshooting for Amazon RDS](CHAP_Troubleshooting.md).

**Topics**
+ [Database connection error](#db2-database-connection-error)
+ [File I/O error](#db2-file-input-output-error)
+ [Stored procedure errors](#db2-troubleshooting-stored-procedures)

## Database connection error
<a name="db2-database-connection-error"></a>

The following error message indicates that a database failed to connect because the server doesn't have sufficient memory.

```
SQL1643C The database manager failed to allocate shared memory because the
database manager instance memory limit has been reached.
```

Increase the memory for your DB instance and then try to connect to your database again. For information about memory usage and recommendations for databases, see [Multiple databases on an Amazon RDS for Db2 DB instance](db2-multiple-databases.md). For information about how to update the memory for an RDS for Db2 database, see [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param).

## File I/O error
<a name="db2-file-input-output-error"></a>

You might encounter a file I/O error for different reasons, such as when you use the `LOAD` command or call the `rdsadmin.restore_database` stored procedure. 

In this example, you run the following `LOAD` command. 

```
db2 "call sysproc.admin_cmd('load from "DB2REMOTE://s3test//public/datapump/t6.del" of del lobs from "DB2REMOTE://s3test/public/datapump/" modified by lobsinfile MESSAGES ON SERVER insert INTO RDSDB.t6 nonrecoverable ')"
```

The `LOAD` command returns the following message:

```
  Result set 1
  --------------

  ROWS_READ            ROWS_SKIPPED         ROWS_LOADED          ROWS_REJECTED        ROWS_DELETED         ROWS_COMMITTED       ROWS_PARTITIONED     NUM_AGENTINFO_ENTRIES MSG_RETRIEVAL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    MSG_REMOVAL
  -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- --------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                     -                    -                    -                    -                    -                    -                    -                     - SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('1594987316_285548770')) AS MSG                                                                                                                                                                                                                                                                                                                                                                                                                                            CALL SYSPROC.ADMIN_REMOVE_MSGS('1594987316_285548770')

  1 record(s) selected.

  Return Status = 0

SQL20397W  Routine "SYSPROC.ADMIN_CMD" execution has completed, but at least
one error, "SQL1652", was encountered during the execution. More information
is available.  SQLSTATE=01H52
```

To view the error message, you run the SQL command as suggested in the previous response. `SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('1594987316_285548770')) AS MSG` returns the following message:

```
SQLCODE   MSG
--------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL2025N  An I/O error occurred. Error code “438”. Media on which this error occurred: “DB2REMOTE://s3test//public/datapump/t6.del”

SQL3500W The utility is beginning the LOAD phase at time “07/05/2024 21:21:48.082954”

SQL1652N File I/O error occurred
```

The Db2 diagnostic logs contain a log file similar to the following one:

```
2024-07-05-21.20.09.440609+000 I1191321E864          LEVEL: Error
PID     : 2710                 TID : 139619509200640 PROC : db2sysc 0
INSTANCE: rdsdb                NODE : 000            DB   : NTP
APPHDL  : 0-12180              APPID: xxx.xx.x.xxx.xxxxx.xxxxxxxxxxxx
UOWID   : 5                    ACTID: 1
AUTHID  : ADMIN                HOSTNAME: ip-xx-xx-x-xx
EDUID   : 147                  EDUNAME: db2lmr 0
FUNCTION: DB2 UDB, oper system services, sqloS3Client_GetObjectInfo, probe:219
MESSAGE : ZRC=0x870F01B6=-2029059658=SQLO_FAILED
          "An unexpected error is encountered"
DATA #1 : String, 29 bytes
S3:HeadObject request failed.
DATA #2 : signed integer, 4 bytes
99
DATA #3 : String, 0 bytes
Object not dumped: Address: 0x00007EFC08A9AE38 Size: 0 Reason: Zero-length data
DATA #4 : String, 33 bytes
curlCode: 28, Timeout was reached
```

This file I/O error could result from a number of different scenarios. For example, the VPC associated with the security group used to create your RDS for Db2 DB instance might lack an Amazon S3 gateway endpoint. This endpoint is essential for enabling RDS for Db2 to access Amazon S3. If your RDS for Db2 DB instance is in private subnets, then an Amazon S3 gateway endpoint is required. You can specify whether your DB instance uses private or public subnets by configuring Amazon RDS subnet groups. For more information, see [Working with DB subnet groups](USER_VPC.WorkingWithRDSInstanceinaVPC.md#USER_VPC.Subnets).

**Topics**
+ [Step 1: Create a VPC gateway endpoint for Amazon S3](#db2-creating-endpoint)
+ [Step 2: Confirm that your VPC gateway endpoint for Amazon S3 exists](#db2-confirming-endpoint)

### Step 1: Create a VPC gateway endpoint for Amazon S3
<a name="db2-creating-endpoint"></a>

For your RDS for Db2 DB instance to interact with Amazon S3, create a VPC and then an Amazon S3 gateway endpoint for private subnets to use.

**To create a VPC gateway endpoint for S3**

1. Create a VPC. For more information see [Create a VPC](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html) in the *Amazon Virtual Private Cloud User Guide*.

1. Create an Amazon S3 gateway endpoint for private subnets to use. For more information, see [Gateway endpoints](https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html) in the *AWS PrivateLink Guide*.

### Step 2: Confirm that your VPC gateway endpoint for Amazon S3 exists
<a name="db2-confirming-endpoint"></a>

Confirm that you successfully created an Amazon S3 gateway endpoint by using the AWS Management Console or the AWS CLI.

#### Console
<a name="db2-confirming-endpoing-console"></a>

**To confirm an Amazon S3 gateway endpoint**

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

1.  In the upper-right corner of the console, choose the AWS Region of your VPC.

1. Select the VPC that you created.

1. On the **Resource map** tab, under **Network connections**, confirm that an Amazon S3 gateway endpoint is listed. 

#### AWS CLI
<a name="db2-confirming-endpoint-cli"></a>

To confirm an Amazon S3 gateway endpoint, run the [https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html) command. In the following example, replace *vpc\$1id* with the VPC ID, *region* with your AWS Region, and *profile* with your profile name.

For Linux, macOS, or Unix:

```
aws ec2 describe-vpc-endpoints \
    --filters "Name=vpc-id,Values=$vpc_id" \
    "Name=service-name,\
    Values=com.amazonaws.${region}.s3" \
    --region $region --profile=$profile \
    --query "VpcEndpoints[*].VpcEndpointId" --output text
```

For Windows:

```
aws ec2 describe-vpc-endpoints ^
    --filters "Name=vpc-id,Values=$vpc_id" ^
    "Name=service-name,^
    Values=com.amazonaws.${region}.s3" ^
    --region $region --profile=$profile ^
    --query "VpcEndpoints[*].VpcEndpointId" --output text
```

This command produces output similar to the following example if an Amazon S3 gateway endpoint exists. 

```
[
    "vpce-0ea810434ff0b97e4"
]
```

This command produces output similar to the following example if an Amazon S3 gateway endpoint doesn't exist. 

```
[]
```

If you don't see an Amazon S3 gateway endpoint listed, then [Step 1: Create a VPC gateway endpoint for Amazon S3](#db2-creating-endpoint). 

## Stored procedure errors
<a name="db2-troubleshooting-stored-procedures"></a>

This section describes various errors returned when calling stored procedures and how to resolve them.


| Category | Stored procedure errors | 
| --- | --- | 
|  Databases  |  [rdsadmin.activate\$1database errors](#db2-troubleshooting-activate-database-sp-errors)  | 
|  Databases  |  [rdsadmin.backup\$1database errors](#db2-troubleshooting-backup-database-sp-errors)  | 
|  Databases  |  [rdsadmin.create\$1database errors](#db2-troubleshooting-create-database-sp-errors)  | 
|  Databases  |  [rdsadmin.deactivate\$1database errors](#db2-troubleshooting-deactivate-database-sp-errors)  | 
|  Databases  |  [rdsadmin.drop\$1database errors](#db2-troubleshooting-drop-database-sp-errors)  | 
|  Databases  |  [rdsadmin.reactivate\$1database errors](#db2-troubleshooting-reactivate-database-sp-errors)  | 
|  Databases  |  [rdsadmin.restore\$1database errors](#db2-troubleshooting-restore-database-sp-errors)  | 
|  Databases  |  [rdsadmin.update\$1db\$1param errors](#db2-troubleshooting-update-db-param-sp-errors)  | 
|  Tablespaces  |  [rdsadmin.alter\$1tablespace errors](#db2-troubleshooting-alter-tablespace-sp-errors)  | 

### rdsadmin.activate\$1database errors
<a name="db2-troubleshooting-activate-database-sp-errors"></a>

The following errors can occur when you call the [rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Failed to allocate shared memory](#activate-database-sp-failed-to-allocate-shared-memory)  |  `SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.`  | 
|  [Unable to activate because of running processes](#activate-database-sp-unable-to-activate-processes)  |  `The database can’t be activated because it's in the process of being created or restored.`  | 

**Failed to allocate shared memory**

The following error message indicates that the stored procedure failed to activate a database because the DB instance doesn't have sufficient memory.

```
SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.
```

Increase the memory for your DB instance and then call the `rdsadmin.activate_database` stored procedure again. For information about memory usage and recommendations for databases, see [Multiple databases on an Amazon RDS for Db2 DB instance](db2-multiple-databases.md).

**Unable to activate because of running processes**

The following error message indicates that the stored procedure couldn't activate a database because the `rdsadmin.create_database` or `rdsadmin.restore_database` stored procedure is running.

```
The database can’t be activated because it's in the process of being created or restored.
```

Wait a few minutes, and then call the `rdsadmin.activate_database` stored procedure again.

### rdsadmin.alter\$1tablespace errors
<a name="db2-troubleshooting-alter-tablespace-sp-errors"></a>

The following errors can occur when you call the [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Statement not valid](#alter-tablespace-sp-statement-not-valid)  |  `DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: ` `SQL1763N Invalid ALTER TABLESPACE statement for table space "TBSP_TEST" due to reason "12"`  | 
|  [tablespace_prefetch_size value not valid](#alter-tablespace-sp-prefetch-value-not-valid)  |  `Invalid tablespace_prefetch_size. Set value to AUTOMATIC or to a non-zero positive numerical value.`  | 
|  [tablespace_prefetch_size numerical value not valid](#alter-tablespace-sp-prefetch-numerical-value-not-valid)  |  `Invalid tablespace_prefetch_size. The number of pages can't be greater than 32767.`  | 
|  [Parameter can't be used with tablespace_prefetch_size](#alter-tablespace-sp-prefetch-incompatible-parameter)  |  `You can't use tablespace_prefetch_size with {parameter}.`  | 
|  [Tablespace change failed](#alter-tablespace-sp-tablespace-change-failed)  |  `The change to tablespace {tablespace_name} failed because you can only alter LARGE or REGULAR tablespaces.`  | 

**Statement not valid**

The following error message indicates that the stored procedure combined mutually exclusive optional parameters with other optional parameters. The optional parameters `reduce_max, reduce_stop`, `reduce_value`, `lower_high_water`, `lower_high_water_stop`, and `switch_online` for the `rdsadmin.alter_tablespace` stored procedure are mutually exclusive. You can't combine them with any other optional parameter, such as `buffer_pool_name`, in the `rdsadmin.alter_tablespace` stored procedure. If you combine them, then when you call the `rdsadmin.get_task_status` user-defined function, Db2 will return this error message. 

```
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: 
SQL1763N Invalid ALTER TABLESPACE statement for table space "TBSP_TEST" due to reason "12"
```

Call the `rdsadmin.alter_tablespace` stored procedure again without combining mutually exclusive optional parameters with other optional parameters. Then call the `rdsadmin.get_task_status` user-defined function. For more information, see [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace) and [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status).

**tablespace\$1prefetch\$1size value not valid**

The following error message indicates that you didn't set `tablespace_prefetch_size` to `AUTOMATIC` or a non-positive numerical value. For example, you tried to set it to `testinput`.

```
Invalid tablespace_prefetch_size. Set value to AUTOMATIC or to a non-zero positive numerical value.
```

Call the `rdsadmin.alter_tablespace` stored procedure again and set `tablespace_prefetch_size` to `AUTOMATIC` or a non-positive numerical value.

**tablespace\$1prefetch\$1size numerical value not valid**

The following error message indicates that you set `tablespace_prefetch_size` to a numerical value larger than 32767.

```
Invalid tablespace_prefetch_size. The number of pages can't be greater than 32767.
```

Call the `rdsadmin.alter_tablespace` stored procedure again and set `tablespace_prefetch_size` to a non-zero positive numerical value less than or equal to 32767.

**Parameter can't be used with tablespace\$1prefetch\$1size**

The following error message indicates that you tried to use `tablespace_prefetch_size` with an incompatible parameter. 

```
You can't use tablespace_prefetch_size with {parameter}.
```

Call the `rdsadmin.alter_tablespace` stored procedure again and only use `tablespace_prefetch_size` with compatible parameters. For information about parameters you can use with `tablespace_prefetch_size`, see [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace).

**Tablespace change failed**

The following error message indicates that you tried to alter a tablespace. 

```
The change to tablespace {tablespace_name} failed because you can only alter LARGE or REGULAR tablespaces.
```

### rdsadmin.backup\$1database errors
<a name="db2-troubleshooting-backup-database-sp-errors"></a>

The following errors can occur when you call the [rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Insufficient disk space](#backup-database-sp-insufficient-disk-space)  |  `Aborting task. Reason Backing up your database failed because of insufficient disk space. Increase the storage for your DB instance and rerun the rdsadmin.backup_database stored procedure.`  | 
|  [Internal error](#backup-database-sp-internal-error)  |  `Caught exception during executing task id 104, Aborting task. Reason Internal Error`  | 

**Insufficient disk space**

The following error message indicates that your DB instance has insufficient disk space to back up your database:

```
Aborting task. Reason Backing up your database failed because of insufficient disk space. Increase the storage for your DB instance and rerun the rdsadmin.backup_database stored procedure.
```

When backing up a database to remote storage, make sure that you have sufficient free disk space for the backup session and the working files. Each backup session processes up to 5 GB of data, but additional space is needed for transaction logs, temporary files, and ongoing database operations. 

We recommend that you have the following free disk space for backups based on the database size:
+ For databases under 5 GB – The database size \$1 3 GB buffer
+ For databases 5 GB and larger – At least 10 GB of free space

This amount of free disk space accounts for backup session processing, transaction log accumulation during backup, temporary working files, and parallel backup streams if configured. For more information, see [Increasing DB instance storage capacity](USER_PIOPS.ModifyingExisting.md).

Increase your disk space and then call the [rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database) stored procedure again. To confirm that the database was backed up correctly, check the task status by using [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status). You can also verify that the backup files exist in your Amazon S3 bucket under *s3\$1prefix/dbi\$1resource\$1id/db\$1name*.

**Internal error**

The following error message indicates that the stored procedure encountered an internal error: 

```
Caught exception during executing task id 104, Aborting task. Reason Internal Error
```

Contact [AWS Support](https://aws.amazon.com/premiumsupport/).

### rdsadmin.create\$1database errors
<a name="db2-troubleshooting-create-database-sp-errors"></a>

The following error can occur when you call the [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Failed to allocate shared memory](#create-database-sp-failed-to-allocate-shared-memory)  |  `SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.`  | 

**Failed to allocate shared memory**

The following error message indicates that the stored procedure failed to create a database because the DB instance doesn't have sufficient memory.

```
SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.
```

Increase the memory for your DB instance and then call the `rdsadmin.create_database` stored procedure again. For information about memory usage and recommendations for databases, see [Multiple databases on an Amazon RDS for Db2 DB instance](db2-multiple-databases.md).

To confirm that the database was created, call the [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) user-defined function and check that the new database is listed.

### rdsadmin.deactivate\$1database errors
<a name="db2-troubleshooting-deactivate-database-sp-errors"></a>

The following error can occur when you call the [rdsadmin.deactivate\$1database](db2-sp-managing-databases.md#db2-sp-deactivate-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Unable to deactivate because of running processes](#deactivate-database-sp-unable-to-deactivate-processes)  |  `The database can’t be deactivated because it's in the process of being created or restored.`  | 

**Unable to deactivate because of running processes**

The following error message indicates that the stored procedure couldn't deactivate a database because the `rdsadmin.create_database` or `rdsadmin.restore_database` stored procedure is running.

```
The database can’t be deactivated because it's in the process of being created or restored.
```

Wait a few minutes, and then call the `rdsadmin.deactivate_database` stored procedure again.

### rdsadmin.drop\$1database errors
<a name="db2-troubleshooting-drop-database-sp-errors"></a>

The following errors can occur when you call the [rdsadmin.drop\$1database](db2-sp-managing-databases.md#db2-sp-drop-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Database name doesn't exist](#drop-database-sp-database-name-not-exist)  |  `SQL0438N Application raised error or warning with diagnostic text: "Cannot drop database. Database with provided name does not exist". SQLSTATE=99993`  | 
|  [Return status = 0](#drop-database-sp-return-status-zero)  |  `Return Status = 0`  | 
|  [Dropping database not allowed](#drop-database-sp-not-allowed)  |  `1 ERROR DROP_DATABASE RDSDB 2023-10-10-16.33.03.744122 2023-10-10-16.33.30.143797 - 2023-10-10-16.33.30.098857 Task execution has started. 2023-10-10-16.33.30.143797 Caught exception during executing task id 1, Aborting task. Reason Dropping database created via rds CreateDBInstance api is not allowed. Only database created using rdsadmin.create_database can be dropped`  | 

**Database name doesn't exist**

The following error message indicates that you passed an incorrect database name in the `rdsadmin.drop_database` stored procedure.

```
SQL0438N Application raised error or warning with diagnostic text: "Cannot
drop database. Database with provided name does not exist". SQLSTATE=99993
```

Call the `rdsadmin.drop_database` stored procedure again with a correct database name. To confirm that the database was dropped, call the [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) user-defined function and check that the dropped database isn't listed.

**Return status = 0**

The following error message indicates that the stored procedure couldn't be completed. 

```
Return Status = 0
```

After you receive `Return Status = 0`, call the [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status) user-defined function. 

**Dropping database not allowed**

The following error message indicates that you created the database by using either the Amazon RDS console or the AWS CLI. You can only use the `rdsadmin.drop_database` stored procedure if you created the database by calling the [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) stored procedure.

```
1 ERROR DROP_DATABASE RDSDB 2023-10-10-16.33.03.744122 2023-10-10-16.33.30.143797 - 2023-10-10-16.33.30.098857 Task execution has started.
2023-10-10-16.33.30.143797 Caught exception during executing task id 1, Aborting task. 
Reason Dropping database created via rds CreateDBInstance api is not allowed. 
Only database created using rdsadmin.create_database can be dropped
```

To drop a database that you created by using either the Amazon RDS console or the AWS CLI, use a client to connect to the database and then run the appropriate command.

### rdsadmin.reactivate\$1database errors
<a name="db2-troubleshooting-reactivate-database-sp-errors"></a>

The following error can occur when you call the [rdsadmin.reactivate\$1database](db2-sp-managing-databases.md#db2-sp-reactivate-database) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Failed to allocate shared memory](#reactivate-database-sp-failed-to-allocate-shared-memory)  |  `SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.`  | 
|  [Unable to reactivate because of running processes](#reactivate-database-sp-unable-to-reactivate-processes)  |  `The database can’t be reactivated because it's in the process of being created or restored.`  | 

**Failed to allocate shared memory**

The following error message indicates that the stored procedure failed to activate a database because the DB instance doesn't have sufficient memory.

```
SQL1643C The database manager failed to allocate shared memory because the database manager instance memory limit has been reached.
```

Increase the memory for your DB instance and then call the `rdsadmin.activate_database` stored procedure again. For information about memory usage and recommendations for databases, see [Multiple databases on an Amazon RDS for Db2 DB instance](db2-multiple-databases.md).

**Unable to reactivate because of running processes**

The following error message indicates that the stored procedure couldn't reactivate a database because the `rdsadmin.create_database` or `rdsadmin.restore_database` stored procedure is running.

```
The database can’t be reactivated because it's in the process of being created or restored.
```

Wait a few minutes, and then call the `rdsadmin.reactivate_database` stored procedure again.

### rdsadmin.restore\$1database errors
<a name="db2-troubleshooting-restore-database-sp-errors"></a>

The following errors can occur when you call the [rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database) stored procedure:


| Error | Error message | 
| --- | --- | 
|  [Insufficient disk space](#restore-database-sp-insufficient-disk-space)  |  `Aborting task. Reason Restoring your database failed because of insufficient disk space. Increase the storage for your DB instance and rerun the rdsadmin.restore_database stored procedure.`  | 
|  [Internal error](#restore-database-sp-internal-error)  |  `Caught exception during executing task id 104, Aborting task. Reason Internal Error`  | 
|  [Non-fenced routines not allowed](#restore-database-sp-non-fenced-routines)  |  `Caught exception during executing task id 2, Aborting task. Reason Non fenced routines are not allowed. Please delete the routines and retry the restore.`  | 
| [Tablespaces not restored](#restore-database-sp-tablespaces-not-restored) |  `Reason SQL0970N The system attempted to write to a read-only file. Reason SQL2563W The Restore process has completed successfully. However one or more table spaces from the backup were not restored.`  | 

**Insufficient disk space**

The following error message indicates that your DB instance has insufficient disk space to restore your database:

```
Aborting task. Reason Restoring your database failed because of insufficient disk space. Increase the storage for your DB instance and rerun the rdsadmin.restore_database stored procedure.
```

The free space on your DB instance must be more than double the size of your backup image. If your backup image is compressed, the free space on your DB instance must be more than triple the size of your backup image. For more information, see [Increasing DB instance storage capacity](USER_PIOPS.ModifyingExisting.md).

Increase your disk space and then call the `rdsadmin.restore_database` stored procedure again. To confirm that the database was restored, call the [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) user-defined function and check that the restored database is listed.

**Internal error**

The following error message indicates that the stored procedure encountered an internal error: 

```
Caught exception during executing task id 104, Aborting task. Reason Internal Error
```

Contact [AWS Support](https://aws.amazon.com/premiumsupport/).

**Non-fenced routines not allowed**

The following error message indicates that your database contains non-fenced routines:

```
Caught exception during executing task id 2, Aborting task. Reason Non fenced routines are not allowed. Please delete the routines and retry the restore.
```

RDS for Db2 doesn't support non-fenced routines. Remove the non-fenced routines from the source database, and then call `rdsadmin.restore_database` again. To confirm that the database was restored, call the [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) user-defined function and check that the restored database is listed. For more information, see [Non-fenced routines](db2-known-issues-limitations.md#db2-known-issues-limitations-non-fenced-routines).

**Tablespaces not restored**

The following error message indicates that RDS for Db2 successfully restored your database, but couldn't restore one or more tablespaces:

```
Reason SQL0970N The system attempted to write to a read-only file.
Reason SQL2563W The Restore process has completed successfully. However one or more table spaces from the backup were not restored.
```

RDS for Db2 doesn't support non-automatic storage. Convert non-automatic storage to automatic storage and then call `rdsadmin.restore_database` again. For more information, see [Converting a nonautomatic storage database to use automatic storage](https://www.ibm.com/docs/en/db2/11.5?topic=databases-converting-nonautomatic-storage-database-use-automatic-storage) in the IBM Db2 documentation.

Databases with non-automatic SMS storage require manual restoration. If your database has non-automatic SMS storage, contact [AWS Support](https://aws.amazon.com/premiumsupport/). 

For information about non-automatic storage and one-time migrations, see [Non-automatic storage tablespaces during migration](db2-known-issues-limitations.md#db2-known-issues-limitations-non-automatic-storage-tablespaces).

### rdsadmin.update\$1db\$1param errors
<a name="db2-troubleshooting-update-db-param-sp-errors"></a>

The following error can occur when you call the [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param) stored procedure.


| Error | Error message | 
| --- | --- | 
|  [Parameter not supported or modifiable](#update-db-param-sp-parameter-not-supported-modifiable)  | SQL0438N Application raised error or warning with diagnostic text: "Parameter is either not supported or not modifiable to customers". SQLSTATE=99993 | 

**Parameter not supported or modifiable**

The following error message indicates that you tried to modify a database configuration parameter that either isn't supported or isn't modifiable.

```
SQL0438N Application raised error or warning with diagnostic text: "Parameter
is either not supported or not modifiable to customers". SQLSTATE=99993
```

You can see which parameters are modifiable by viewing your parameter groups. For more information, see [Viewing parameter values for a DB parameter group in Amazon RDS](USER_WorkingWithParamGroups.Viewing.md).