

# Amazon RDS for Db2 문제 해결
<a name="db2-troubleshooting"></a>

다음 콘텐츠는 RDS for Db2에 발생할 수 있는 문제를 해결하는 데 도움이 될 수 있습니다.

일반적인 Amazon RDS 문제 해결에 대한 자세한 내용은 [Amazon RDS 문제 해결](CHAP_Troubleshooting.md) 섹션을 참조하세요.

**Topics**
+ [데이터베이스 연결 오류](#db2-database-connection-error)
+ [파일 I/O 오류](#db2-file-input-output-error)
+ [저장된 프로시저 오류](#db2-troubleshooting-stored-procedures)

## 데이터베이스 연결 오류
<a name="db2-database-connection-error"></a>

다음 오류 메시지는 서버에 메모리가 충분하지 않아 데이터베이스가 연결되지 않았음을 나타냅니다.

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

DB 인스턴스의 메모리를 늘린 다음 데이터베이스에 다시 연결해 보세요. 메모리 사용량 및 데이터베이스 권장 사항에 대한 자세한 내용은 [단일 Amazon RDS for Db2 DB 인스턴스의 여러 데이터베이스](db2-multiple-databases.md) 섹션을 참조하세요. RDS for Db2 데이터베이스의 메모리를 업데이트하는 방법에 대한 자세한 내용은 [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param) 섹션을 참조하세요.

## 파일 I/O 오류
<a name="db2-file-input-output-error"></a>

`LOAD` 명령을 사용하거나 `rdsadmin.restore_database` 저장 프로시저를 직접 호출할 때 등 다양한 이유로 파일 I/O 오류가 발생할 수 있습니다.

이 예에서는 다음 `LOAD` 명령을 실행할 수 있습니다.

```
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 ')"
```

`LOAD` 명령은 다음 메시지를 반환합니다.

```
  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
```

오류 메시지를 보려면 이전 응답에서 제안한 대로 SQL 명령을 실행합니다. `SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('1594987316_285548770')) AS MSG`는 다음 메시지를 반환합니다.

```
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
```

Db2 진단 로그에는 다음과 유사한 로그 파일이 포함되어 있습니다.

```
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
```

이 파일 I/O 오류는 다양한 시나리오로 인해 발생할 수 있습니다. 예를 들어 RDS for Db2 DB 인스턴스를 만드는 데 사용되는 보안 그룹과 연결된 VPC에 Amazon S3 게이트웨이 엔드포인트가 없을 수 있습니다. 이 엔드포인트는 RDS for Db2가 Amazon S3에 액세스할 수 있도록 하는 데 필수적입니다. RDS for Db2 DB 인스턴스가 프라이빗 서브넷에 있는 경우 Amazon S3 게이트웨이 엔드포인트가 필요합니다. Amazon RDS 서브넷 그룹을 구성하여 DB 인스턴스가 프라이빗 서브넷을 사용하는지 아니면 퍼블릭 서브넷을 사용하는지 지정할 수 있습니다. 자세한 내용은 [DB 서브넷 그룹을 사용한 작업](USER_VPC.WorkingWithRDSInstanceinaVPC.md#USER_VPC.Subnets) 섹션을 참조하세요.

**Topics**
+ [1단계: Amazon S3에 대한 VPC 게이트웨이 엔드포인트 생성](#db2-creating-endpoint)
+ [2단계: Amazon S3용 VPC 게이트웨이 엔드포인트가 존재하는지 확인](#db2-confirming-endpoint)

### 1단계: Amazon S3에 대한 VPC 게이트웨이 엔드포인트 생성
<a name="db2-creating-endpoint"></a>

RDS for Db2 DB 인스턴스가 Amazon S3와 상호 작용하려면 프라이빗 서브넷에서 사용할 VPC와 Amazon S3 게이트웨이 엔드포인트를 만듭니다.

**S3에 대한 VPC 게이트웨이 엔드포인트를 만드는 방법**

1. VPC를 생성합니다. 자세한 내용은 *Amazon Virtual Private Cloud 사용 설명서*의 [VPC 생성](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html)을 참조하세요.

1. 프라이빗 서브넷에서 사용할 Amazon S3 게이트웨이 엔드포인트를 만듭니다. 자세한 내용은 *AWS PrivateLink 안내서*의 [Gateway endpoints](https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html)를 참조하세요.

### 2단계: Amazon S3용 VPC 게이트웨이 엔드포인트가 존재하는지 확인
<a name="db2-confirming-endpoint"></a>

AWS Management Console 또는 AWS CLI를 사용하여 Amazon S3 게이트웨이 엔드포인트를 성공적으로 만들었는지 확인합니다.

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

**Amazon S3 게이트웨이 엔드포인트를 확인하는 방법**

1. AWS Management Console에 로그인하고 [https://console.aws.amazon.com/vpc](https://console.aws.amazon.com/vpc)에서 Amazon VPC 콘솔을 엽니다.

1.  콘솔의 오른쪽 상단에서 VPC의 AWS 리전을 선택합니다.

1. 만든 VPC를 선택합니다.

1. **리소스 맵** 탭의 **네트워크 연결**에서 Amazon S3 게이트웨이 엔드포인트가 나열되었는지 확인합니다.

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

Amazon S3 게이트웨이 엔드포인트를 확인하려면 [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) 명령을 실행합니다. 다음 예시에서 *vpc\$1id*를 VPC ID로, *region*을 AWS 리전로, *profile*을 프로필 이름으로 바꿉니다.

대상 LinuxmacOS, 또는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
```

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
```

이 명령은 Amazon S3 게이트웨이 엔드포인트가 있는 경우 다음 예시와 유사한 출력을 생성합니다.

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

이 명령은 Amazon S3 게이트웨이 엔드포인트가 없는 경우 다음 예시와 유사한 출력을 생성합니다.

```
[]
```

Amazon S3 게이트웨이 엔드포인트가 나열되지 않았으면 [1단계: Amazon S3에 대한 VPC 게이트웨이 엔드포인트 생성](#db2-creating-endpoint)를 실행합니다.

## 저장된 프로시저 오류
<a name="db2-troubleshooting-stored-procedures"></a>

이 섹션에서는 저장 프로시저를 직접적으로 호출할 때 반환되는 다양한 오류와 이를 해결하는 방법을 설명합니다.


| 카테고리 | 저장된 프로시저 오류 | 
| --- | --- | 
|  데이터베이스 수  |  [rdsadmin.activate\$1database 오류](#db2-troubleshooting-activate-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.backup\$1database 오류](#db2-troubleshooting-backup-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.create\$1database 오류](#db2-troubleshooting-create-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.deactivate\$1database 오류](#db2-troubleshooting-deactivate-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.drop\$1database 오류](#db2-troubleshooting-drop-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.reactivate\$1database 오류](#db2-troubleshooting-reactivate-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.restore\$1database 오류](#db2-troubleshooting-restore-database-sp-errors)  | 
|  데이터베이스 수  |  [rdsadmin.update\$1db\$1param 오류](#db2-troubleshooting-update-db-param-sp-errors)  | 
|  테이블스페이스  |  [rdsadmin.alter\$1tablespace 오류](#db2-troubleshooting-alter-tablespace-sp-errors)  | 

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

[rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**공유 메모리 할당 실패**

다음 오류 메시지는 DB 인스턴스에 메모리가 충분하지 않아 저장 프로시저가 데이터베이스를 활성화하지 못했음을 나타냅니다.

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

DB 인스턴스의 메모리를 늘린 다음 `rdsadmin.activate_database` 저장 프로시저를 다시 직접 호출합니다. 메모리 사용량 및 데이터베이스 권장 사항에 대한 자세한 내용은 [단일 Amazon RDS for Db2 DB 인스턴스의 여러 데이터베이스](db2-multiple-databases.md) 섹션을 참조하세요.

**실행 중인 프로세스로 인해 활성화할 수 없음**

다음 오류 메시지는 `rdsadmin.create_database` 또는 `rdsadmin.restore_database` 저장 프로시저가 실행 중이므로 저장 프로시저가 데이터베이스를 활성화할 수 없음을 나타냅니다.

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

몇 분 기다린 후 `rdsadmin.activate_database` 저장 프로시저를 다시 직접적으로 호출합니다.

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

[rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**문이 유효하지 않음**

다음 오류 메시지는 저장 프로시저가 상호 배타적인 선택적 파라미터를 다른 선택적 파라미터와 결합했음을 나타냅니다. `rdsadmin.alter_tablespace` 저장 프로시저의 선택적 파라미터인 `reduce_max, reduce_stop`, `reduce_value`, `lower_high_water`, `lower_high_water_stop`, `switch_online` 파라미터는 함께 사용할 수 없습니다. `rdsadmin.alter_tablespace` 저장 프로시저에서 다른 선택적 파라미터(예: `buffer_pool_name`)와 조합할 수 없습니다. 이를 결합하면 `rdsadmin.get_task_status` 사용자 정의 함수를 호출할 때 Db2가 이 오류 메시지를 반환합니다.

```
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"
```

상호 배타적인 선택적 파라미터를 다른 선택적 파라미터와 결합하지 않고 `rdsadmin.alter_tablespace` 저장 프로시저를 다시 호출합니다. 그런 다음 `rdsadmin.get_task_status` 사용자 정의 함수를 호출합니다. 자세한 내용은 [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace) 및 [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status)를 참조하세요.

**tablespace\$1prefetch\$1size 값이 유효하지 않음**

다음 오류 메시지는 `tablespace_prefetch_size`를 `AUTOMATIC` 또는 0이 아닌 양수 값으로 설정하지 않았음을 나타냅니다. 예를 들어 `testinput`으로 설정하려고 했습니다.

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

`rdsadmin.alter_tablespace` 저장 프로시저를 다시 직접적으로 호출하고 `tablespace_prefetch_size`를 `AUTOMATIC` 또는 0이 아닌 양수 값으로 설정합니다.

**tablespace\$1prefetch\$1size 숫자 값이 유효하지 않음**

다음 오류 메시지는 `tablespace_prefetch_size`를 32,767보다 큰 숫자 값으로 설정했음을 나타냅니다.

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

`rdsadmin.alter_tablespace` 저장 프로시저를 다시 직접적으로 호출하고 `tablespace_prefetch_size`를 32,767 이하의 0이 아닌 양수 값으로 설정합니다.

**파라미터를 tablespace\$1prefetch\$1size와 함께 사용할 수 없음**

다음 오류 메시지는 `tablespace_prefetch_size`에 호환되지 않는 파라미터를 사용하려고 했음을 나타냅니다.

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

`rdsadmin.alter_tablespace` 저장 프로시저를 다시 직접적으로 호출하고 `tablespace_prefetch_size`에 호환되는 파라미터만 사용합니다. `tablespace_prefetch_size`에 사용할 수 있는 파라미터에 대한 자세한 내용은 [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace) 섹션을 참조하세요.

**테이블스페이스 변경 실패**

다음 오류 메시지는 테이블스페이스를 변경하려고 했음을 나타냅니다.

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

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

[rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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`  | 

**디스크 공간 부족**

다음 오류 메시지는 DB 인스턴스의 디스크 공간이 부족하여 데이터베이스를 백업할 수 없음을 나타냅니다.

```
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.
```

데이터베이스를 원격 스토리지에 백업할 때 백업 세션과 작업 파일을 위한 여유 디스크 공간이 충분한지 확인합니다. 각 백업 세션은 최대 5GB의 데이터를 처리하지만 트랜잭션 로그, 임시 파일 및 지속적인 데이터베이스 작업에 추가 공간이 필요합니다.

데이터베이스 크기에 따라 백업을 위해 다음과 같은 여유 디스크 공간을 확보하는 것이 좋습니다.
+ 5GB 미만의 데이터베이스의 경우 - 데이터베이스 크기 \$1 3GB 버퍼
+ 데이터베이스 5GB 이상 - 최소 10GB의 여유 공간

이 양의 여유 디스크 공간은 백업 세션 처리, 백업 중 트랜잭션 로그 누적, 임시 작업 파일 및 구성된 경우 병렬 백업 스트림을 고려합니다. 자세한 내용은 [DB 인스턴스 스토리지 용량 증가](USER_PIOPS.ModifyingExisting.md) 섹션을 참조하세요.

디스크 공간을 늘리고 [rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database) 저장 프로시저를 다시 직접 호출합니다. 데이터베이스가 올바르게 백업되었는지 확인하려면 [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status)를 사용하여 작업 상태를 확인합니다. *s3\$1prefix/dbi\$1resource\$1id/db\$1name*으로 Amazon S3 버킷에 백업 파일이 있는지 확인할 수도 있습니다.

**내부 오류**

다음 오류 메시지는 저장된 프로시저에 내부 오류가 발생했음을 나타냅니다.

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

[AWS Support](https://aws.amazon.com/premiumsupport/)에 문의하세요.

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

[rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**공유 메모리 할당 실패**

다음 오류 메시지는 DB 인스턴스에 메모리가 충분하지 않아 저장 프로시저가 데이터베이스를 만들지 못했음을 나타냅니다.

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

DB 인스턴스의 메모리를 늘린 다음 `rdsadmin.create_database` 저장 프로시저를 다시 직접 호출합니다. 메모리 사용량 및 데이터베이스 권장 사항에 대한 자세한 내용은 [단일 Amazon RDS for Db2 DB 인스턴스의 여러 데이터베이스](db2-multiple-databases.md) 섹션을 참조하세요.

데이터베이스가 만들어졌는지 확인하려면 [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) 사용자 정의 함수를 직접 호출하고 새 데이터베이스가 나열되었는지 확인합니다.

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

[rdsadmin.deactivate\$1database](db2-sp-managing-databases.md#db2-sp-deactivate-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**실행 중인 프로세스로 인해 비활성화할 수 없음**

다음 오류 메시지는 `rdsadmin.create_database` 또는 `rdsadmin.restore_database` 저장 프로시저가 실행 중이므로 저장 프로시저가 데이터베이스를 비활성화할 수 없음을 나타냅니다.

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

몇 분 기다린 후 `rdsadmin.deactivate_database` 저장 프로시저를 다시 직접적으로 호출합니다.

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

[rdsadmin.drop\$1database](db2-sp-managing-databases.md#db2-sp-drop-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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`  | 

**데이터베이스 이름이 존재하지 않음**

다음 오류 메시지는 `rdsadmin.drop_database` 저장 프로시저에서 잘못된 데이터베이스 이름을 전달했음을 나타냅니다.

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

올바른 데이터베이스 이름으로 `rdsadmin.drop_database` 저장 프로시저를 다시 호출합니다. 데이터베이스가 삭제되었는지 확인하려면 [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) 사용자 정의 함수를 직접 호출하고 삭제된 데이터베이스가 나열되지 않았는지 확인합니다.

**반품 상태 = 0**

다음 오류 메시지는 저장된 프로시저를 완료할 수 없음을 나타냅니다.

```
Return Status = 0
```

`Return Status = 0`을 수신한 후 [rdsadmin.get\$1task\$1status](db2-user-defined-functions.md#db2-udf-get-task-status) 사용자 정의 함수를 호출합니다.

**데이터베이스 삭제가 허용되지 않음**

다음 오류 메시지는 Amazon RDS 콘솔 또는 AWS CLI를 사용하여 데이터베이스를 생성했음을 나타냅니다. `rdsadmin.drop_database` 저장 프로시저를 호출하여 데이터베이스를 생성한 경우에만 [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database) 저장 프로시저를 사용할 수 있습니다.

```
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
```

Amazon RDS 콘솔 또는 AWS CLI를 사용하여 생성한 데이터베이스를 삭제하려면 클라이언트를 사용하여 데이터베이스에 연결한 다음 적절한 명령을 실행합니다.

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

[rdsadmin.reactivate\$1database](db2-sp-managing-databases.md#db2-sp-reactivate-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**공유 메모리 할당 실패**

다음 오류 메시지는 DB 인스턴스에 메모리가 충분하지 않아 저장 프로시저가 데이터베이스를 활성화하지 못했음을 나타냅니다.

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

DB 인스턴스의 메모리를 늘린 다음 `rdsadmin.activate_database` 저장 프로시저를 다시 직접 호출합니다. 메모리 사용량 및 데이터베이스 권장 사항에 대한 자세한 내용은 [단일 Amazon RDS for Db2 DB 인스턴스의 여러 데이터베이스](db2-multiple-databases.md) 섹션을 참조하세요.

**실행 중인 프로세스로 인해 재활성화할 수 없음**

다음 오류 메시지는 `rdsadmin.create_database` 또는 `rdsadmin.restore_database` 저장 프로시저가 실행 중이므로 저장 프로시저가 데이터베이스를 재활성화할 수 없음을 나타냅니다.

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

몇 분 기다린 후 `rdsadmin.reactivate_database` 저장 프로시저를 다시 직접적으로 호출합니다.

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

[rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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.`  | 

**디스크 공간 부족**

다음 오류 메시지는 DB 인스턴스의 디스크 공간이 부족하여 데이터베이스를 복원할 수 없음을 나타냅니다.

```
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.
```

DB 인스턴스의 여유 공간은 백업 이미지 크기의 두 배 이상이어야 합니다. 백업 이미지가 압축된 경우 DB 인스턴스의 여유 공간이 백업 이미지 크기의 3배 이상이어야 합니다. 자세한 내용은 [DB 인스턴스 스토리지 용량 증가](USER_PIOPS.ModifyingExisting.md) 섹션을 참조하세요.

디스크 공간을 늘리고 `rdsadmin.restore_database` 저장 프로시저를 다시 직접 호출합니다. 데이터베이스가 복원되었는지 확인하려면 [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) 사용자 정의 함수를 직접 호출하고 복원된 데이터베이스가 나열되었는지 확인합니다.

**내부 오류**

다음 오류 메시지는 저장된 프로시저에 내부 오류가 발생했음을 나타냅니다.

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

[AWS Support](https://aws.amazon.com/premiumsupport/)에 문의하세요.

**격리되지 않은 루틴은 허용되지 않음**

다음 오류 메시지는 데이터베이스에 격리되지 않은 루틴이 포함되어 있음을 나타냅니다.

```
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는 격리되지 않은 루틴 생성을 지원하지 않습니다. 소스 데이터베이스에서 격리되지 않은 루틴을 제거한 다음 `rdsadmin.restore_database`를 다시 직접적으로 호출합니다. 데이터베이스가 복원되었는지 확인하려면 [rdsadmin.list\$1databases](db2-user-defined-functions.md#db2-udf-list-databases) 사용자 정의 함수를 직접 호출하고 복원된 데이터베이스가 나열되었는지 확인합니다. 자세한 내용은 [울타리가 없는 루틴](db2-known-issues-limitations.md#db2-known-issues-limitations-non-fenced-routines) 섹션을 참조하세요.

**테이블스페이스가 복원되지 않음**

다음 오류 메시지는 RDS for Db2가 데이터베이스를 성공적으로 복원했지만 하나 이상의 테이블스페이스를 복원할 수 없음을 나타냅니다.

```
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는 비자동 스토리지를 지원하지 않습니다. 비자동 스토리지를 자동 스토리지로 변환한 다음 `rdsadmin.restore_database`를 다시 직접적으로 호출합니다. 자세한 내용은 IBM Db2 설명서에서 [자동 스토리지를 사용하도록 비자동 스토리지 데이터베이스 변환](https://www.ibm.com/docs/en/db2/11.5?topic=databases-converting-nonautomatic-storage-database-use-automatic-storage)을 참조하세요.

비자동 SMS 스토리지가 있는 데이터베이스는 수동 복원이 필요합니다. 데이터베이스에 비자동 SMS 스토리지가 있는 경우 [AWS 지원 팀](https://aws.amazon.com/premiumsupport/)에 문의하세요.

비자동 스토리지 및 일회성 마이그레이션에 대한 자세한 내용은 [마이그레이션 중 자동이 아닌 스토리지 테이블스페이스](db2-known-issues-limitations.md#db2-known-issues-limitations-non-automatic-storage-tablespaces) 섹션을 참조하세요.

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

[rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param) 저장된 프로시저를 직접적으로 호출할 때 다음과 같은 오류가 발생할 수 있습니다.


| 오류 | 오류 메시지 | 
| --- | --- | 
|  [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 | 

**파라미터가 지원되지 않거나 수정할 수 없음**

다음 오류 메시지는 지원되지 않거나 수정할 수 없는 데이터베이스 구성 파라미터를 수정하려고 했음을 나타냅니다.

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

파라미터 그룹을 보고 수정할 수 있는 파라미터를 확인할 수 있습니다. 자세한 내용은 [Amazon RDS에서 DB 파라미터 그룹의 파라미터 값 보기](USER_WorkingWithParamGroups.Viewing.md) 섹션을 참조하세요.