

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon RDS for Db2 預存程序參考
<a name="db2-stored-procedures"></a>

您可以透過呼叫內建預存程序來管理執行 Db2 引擎的 Amazon RDS for Db2 資料庫執行個體。


| 預存程序 | 類別 | 描述 | 
| --- | --- | --- | 
|  [rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database)  |  資料庫  |  使用 `rdsadmin.activate_database` 預存程序在獨立的 RDS for Db2 資料庫執行個體上啟用資料庫。  | 
|  [rdsadmin.add\$1groups](db2-sp-granting-revoking-privileges.md#db2-sp-add-groups)  |  授予及撤銷權限  |  使用 `rdsadmin.add_groups` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫，將一或多個群組新增至使用者。  | 
|  [rdsadmin.add\$1user](db2-sp-granting-revoking-privileges.md#db2-sp-add-user)  |  授予及撤銷權限  |  使用 `rdsadmin.add_user` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫，將使用者新增至授權清單。  | 
|  [rdsadmin.alter\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-alter-buffer-pool)  |  緩衝集區  |  使用 `rdsadmin.alter_bufferpool` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫修改緩衝集區。  | 
|  [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace)  |  資料表空間  |  使用 `rdsadmin.alter_tablespace` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫修改資料表空間。  | 
|  [rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database)  |  資料庫  |  使用 `rdsadmin.backup_database` 預存程序將 RDS for Db2 資料庫執行個體上的資料庫備份至 Amazon S3 儲存貯體。然後，您可以將備份從 Amazon S3 還原至 RDS for Db2 資料庫執行個體，或還原至其他位置，例如本機伺服器。  | 
|  [rdsadmin.catalog\$1storage\$1access](db2-sp-managing-storage-access.md#db2-sp-catalog-storage-access)  |  儲存體存取  |  使用 `rdsadmin.catalog_storage_access` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫，編目儲存別名以存取 Amazon S3 儲存貯體與 Db2 資料檔案。  | 
|  [rdsadmin.change\$1password](db2-sp-granting-revoking-privileges.md#db2-sp-change-password)  |  授予及撤銷權限  |  使用 `rdsadmin.change_password` 預存程序變更 RDS for Db2 資料庫執行個體上資料庫的使用者密碼。  | 
|  [rdsadmin.complete\$1rollforward](db2-sp-managing-databases.md#db2-sp-complete-rollforward)  |  資料庫  |  使用 `rdsadmin.complete_rollforward` 預存程序，將 RDS for Db2 資料庫執行個體上的資料庫從 `ROLL-FORWARD PENDING` 狀態上線。當您呼叫 [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database) 但將 `complete_rollforward` 參數設定為 `FALSE` 時，會發生 `ROLL-FORWARD PENDING` 狀態。  | 
|  [rdsadmin.configure\$1db\$1audit](db2-sp-managing-audit-policies.md#db2-sp-configure-db-audit)  |  稽核政策  |  使用 `rdsadmin.configure_db_audit` 預存程序來修改 RDS for Db2 資料庫執行個體上資料庫的稽核政策。如果沒有稽核政策，則執行此預存程序會建立稽核政策。  | 
|  [rdsadmin.create\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-create-buffer-pool)  |  緩衝集區  |  使用 `rdsadmin.create_bufferpool` 預存程序為 RDS for Db2 資料庫執行個體上的資料庫建立緩衝集區。  | 
|  [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database)  |  資料庫  |  使用 `rdsadmin.create_database` 預存程序在 RDS for Db2 資料庫執行個體上建立資料庫。  | 
|  [rdsadmin.create\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-create-role)  |  授予及撤銷權限  |  使用 `rdsadmin.create_role` 預存程序來建立角色，以連接至 RDS for Db2 資料庫執行個體上的資料庫。  | 
|  [rdsadmin.create\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-create-tablespace)  |  資料表空間  |  使用 `rdsadmin.create_tablespace` 預存程序為 RDS for Db2 資料庫執行個體上的資料庫建立資料表空間。  | 
|  [rdsadmin.db2pd\$1command](db2-sp-managing-databases.md#db2-sp-db2pd-command)  |  資料庫  |  使用 `rdsadmin.db2pd_command` 預存程序收集 RDS for Db2 資料庫執行個體上資料庫的相關資訊。此資訊有助於監控和故障診斷 RDS for Db2 中的資料庫。  | 
|  [rdsadmin.db2support\$1command](db2-sp-managing-databases.md#db2-sp-db2support-command)  |  資料庫  |  使用 `rdsadmin.db2support_command` 預存程序收集 RDS for Db2 資料庫執行個體上資料庫的診斷資訊，並將其上傳至 Amazon S3 儲存貯體。  | 
|  [rdsadmin.dbadm\$1grant](db2-sp-granting-revoking-privileges.md#db2-sp-dbadm-grant)  |  授予及撤銷權限  |  使用 `rdsadmin.dbadm_grant` 預存程序將一或多個授權類型 (`DBADM`、`ACCESSCTRL` 或 `DATAACCESS`) 授予 RDS for Db2 資料庫執行個體上之資料庫的一或多個角色、使用者或群組。  | 
|  [rdsadmin.dbadm\$1revoke](db2-sp-granting-revoking-privileges.md#db2-sp-dbadm-revoke)  |  授予及撤銷權限  |  使用 `rdsadmin.dbadm_revoke` 預存程序，從 RDS for Db2 資料庫執行個體上之資料庫的一或多個角色、使用者或群組撤銷一或多個授權類型 (`DBADM`、`ACCESSCTRL` 或 `DATAACCESS`)。  | 
|   [rdsadmin.deactivate\$1database](db2-sp-managing-databases.md#db2-sp-deactivate-database)  |  資料庫  |  使用 `rdsadmin.deactivate_database` 預存程序來停用 RDS for Db2 資料庫執行個體上的資料庫。您可以停用資料庫以節省記憶體資源。  | 
|  [rdsadmin.disable\$1db\$1audit](db2-sp-managing-audit-policies.md#db2-sp-disable-db-audit)  |  稽核政策  |  使用 `rdsadmin.disable_db_audit` 預存程序來停止稽核記錄，並從 RDS for Db2 資料庫執行個體上的資料庫移除稽核政策。  | 
|  [rdsadmin.drop\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-drop-buffer-pool)  |  緩衝集區  |  使用 `rdsadmin.drop_bufferpool` 預存程序從 RDS for Db2 資料庫執行個體上的資料庫捨棄緩衝集區。  | 
|  [rdsadmin.drop\$1database](db2-sp-managing-databases.md#db2-sp-drop-database)  |  資料庫  |  使用 `rdsadmin.drop_database` 預存程序從 RDS for Db2 資料庫執行個體捨棄資料庫。  | 
|  [rdsadmin.drop\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-drop-role)  |  授予及撤銷權限  |  使用 `rdsadmin.drop_role` 預存程序從 RDS for Db2 資料庫執行個體上的資料庫刪除角色。  | 
|  [rdsadmin.drop\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-drop-tablespace)  |  資料表空間  |  使用 `rdsadmin.drop_tablespace` 預存程序從 RDS for Db2 資料庫執行個體上的資料庫捨棄資料表空間。  | 
|  [rdsadmin.fgac\$1command](db2-sp-managing-databases.md#db2-sp-fgac-command)  |  資料庫  |  使用 `rdsadmin.fgac_command` 預存程序控制對 RDS for Db2 資料庫執行個體上資料庫中資料表資料的列或欄層級存取。  | 
|  [rdsadmin.force\$1application](db2-sp-managing-databases.md#db2-sp-force-application)  |  資料庫  |  使用 `rdsadmin.force_application` 預存程序強制應用程式離開 RDS for Db2 資料庫執行個體上的資料庫，以執行維護。  | 
|  [rdsadmin.grant\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-grant-role)  |  授予及撤銷權限  |  使用 `rdsadmin.grant_role` 預存程序將角色指派給 RDS for Db2 資料庫執行個體上之資料庫中的承授者角色、使用者或群組。您也可以使用此預存程序來授予承授者角色指派角色的 `DBADM` 授權。  | 
|  [rdsadmin.list\$1archive\$1log\$1information](db2-sp-managing-databases.md#db2-sp-list-archive-log-information)  |  資料庫  |  使用 `rdsadmin.list_archive_log_information` 預存程序傳回 RDS for Db2 資料庫執行個體上之資料庫封存日誌的相關資訊。此資訊包含個別日誌檔案的大小和建立日期，以及封存日誌檔案所使用的總儲存體等詳細資訊。  | 
|  [rdsadmin.list\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-list-sid-group-mapping)  |  授予及撤銷權限  |  使用 `rdsadmin.list_sid_group_mapping` 預存程序傳回在 RDS for Db2 資料庫執行個體上設定的所有安全 ID (SID) 和 Active Directory 群組映射清單。  | 
|  [rdsadmin.list\$1users](db2-sp-granting-revoking-privileges.md#db2-sp-list-users)  |  授予及撤銷權限  |  使用 `rdsadmin.list_users` 預存程序傳回 RDS for Db2 資料庫執行個體上之資料庫的授權清單上的使用者清單。  | 
|  [rdsadmin.reactivate\$1database](db2-sp-managing-databases.md#db2-sp-reactivate-database)  |  資料庫  |  進行資料庫組態變更後，請使用 `rdsadmin.reactivate_database` 預存程序在 RDS for Db2 資料庫執行個體上重新啟用資料庫。對於獨立資料庫執行個體上的資料庫，您可以使用此預存程序或 [rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database) 預存程序。對於複本來源資料庫執行個體上的資料庫，您必須使用 `rdsadmin.reactivate_database` 預存程序。  | 
|  [rdsadmin.remove\$1groups](db2-sp-granting-revoking-privileges.md#db2-sp-remove-groups)  |  授予及撤銷權限  |  使用 `rdsadmin.remove_groups` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫，從使用者移除一或多個群組。  | 
|  [rdsadmin.remove\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-remove-sid-group-mapping)  |  授予及撤銷權限  |  使用 `rdsadmin.remove_sid_group_mapping` 預存程序從 RDS for Db2 資料庫執行個體中移除安全 ID (SID) 及其對應的 Active Directory 群組映射。  | 
|  [rdsadmin.remove\$1user](db2-sp-granting-revoking-privileges.md#db2-sp-remove-user)  |  授予及撤銷權限  |  使用 `rdsadmin.remove_user` 預存程序從 RDS for Db2 資料庫執行個體上的資料庫授權清單中移除使用者。  | 
|  [rdsadmin.rename\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-rename-tablespace)  |  資料表空間  |  使用 `rdsadmin.rename_tablespace` 預存程序來重新命名 RDS for Db2 資料庫執行個體上資料庫的資料表空間。  | 
|  [rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database)  |  資料庫  |  使用 `rdsadmin.restore_database` 預存程序從 Amazon S3 儲存貯體還原 RDS for Db2 資料庫執行個體上的資料庫。  | 
|  [rdsadmin.revoke\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-revoke-role)  |  授予及撤銷權限  |  使用 `rdsadmin.revoke_role` 預存程序從 RDS for Db2 資料庫執行個體上之資料庫中的承授者角色、使用者或群組撤銷角色。  | 
|  [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database)  |  資料庫  |  使用 `rdsadmin.rollforward_database` 預存程序將 RDS for Db2 資料庫執行個體上的資料庫上線，並在您透過呼叫 [rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database) 還原 RDS for Db2 資料庫執行個體上的資料庫之後，套用交易日誌。  | 
|  [rdsadmin.rollforward\$1status](db2-sp-managing-databases.md#db2-sp-rollforward-status)  |  資料庫  |  使用 `rdsadmin.rollforward_status` 預存程序來查詢呼叫 [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database) 或 RDS for Db2 資料庫執行個體上 [rdsadmin.complete\$1rollforward](db2-sp-managing-databases.md#db2-sp-complete-rollforward) 預存程序的向前捲動狀態。  | 
|  [rdsadmin.set\$1archive\$1log\$1retention](db2-sp-managing-databases.md#db2-sp-set-archive-log-retention)  |  資料庫  |  使用 `rdsadmin.set_archive_log_retention` 預存程序來設定在 RDS for Db2 資料庫執行個體上保留資料庫封存日誌檔案的時間。您也可以使用此預存程序來停用封存日誌保留。  | 
|  [rdsadmin.set\$1configuration](db2-sp-managing-databases.md#db2-sp-set-configuration)  |  資料庫  |  使用 `rdsadmin.set_configuration` 預存程序，針對 RDS for Db2 資料庫執行個體上的資料庫設定特定設定。  | 
|  [rdsadmin.set\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-set-sid-group-mapping)  |  授予及撤銷權限  |  使用 `rdsadmin.set_sid_group_mapping` 預存程序在 RDS for Db2 資料庫執行個體上的安全 ID (SID) 與對應的 Active Directory 群組之間建立映射。  | 
|  [rdsadmin.show\$1archive\$1log\$1retention](db2-sp-managing-databases.md#db2-sp-show-archive-log-retention)  |  資料庫  | 使用 rdsadmin.show\$1archive\$1log\$1retention 預存程序傳回 RDS for Db2 資料庫執行個體上之資料庫目前的封存日誌保留設定。 | 
|  [rdsadmin.show\$1configuration](db2-sp-managing-databases.md#db2-sp-show-configuration)  |  資料庫  | 使用 rdsadmin.show\$1configuration 預存程序傳回 RDS for Db2 資料庫執行個體上之資料庫的一或多個可修改設定。 | 
|  [rdsadmin.uncatalog\$1storage\$1access](db2-sp-managing-storage-access.md#db2-sp-uncatalog-storage-access)  |  儲存體存取  |  使用 `rdsadmin.uncatalog_storage_access` 預存程序移除儲存別名，以使用 Db2 資料檔案存取 Amazon S3 儲存貯體。  | 
|  [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param)  |  資料庫  | 使用 rdsadmin.update\$1db\$1param 預存程序來更新 RDS for Db2 資料庫執行個體上之資料庫的資料庫參數。 | 
|  [rdsadmin.enable\$1archive\$1log\$1copy](db2-sp-managing-databases.md#db2-sp-enable_archive_log_copy)  |  資料庫  | 使用 rdsadmin.enable\$1archive\$1log\$1copy 預存程序來啟用 RDS Db2 資料庫封存日誌複製到 Amazon S3。 | 
|  [rdsadmin.disable\$1archive\$1log\$1copy](db2-sp-managing-databases.md#db2-sp-disable_archive_log_copy)  |  資料庫  | 使用rdsadmin.disable\$1archive\$1log\$1copy預存程序來停用 RDS Db2 資料庫封存日誌複製到 Amazon S3。 | 

**Topics**
+ [Amazon RDS for Db2 預存程序的考量](db2-stored-procedures-considerations.md)
+ [授予及撤銷 RDS for Db2 權限的預存程序](db2-sp-granting-revoking-privileges.md)
+ [RDS for Db2 稽核政策的預存程序](db2-sp-managing-audit-policies.md)
+ [RDS for Db2 緩衝集區的預存程序](db2-sp-managing-buffer-pools.md)
+ [RDS for Db2 資料庫的預存程序](db2-sp-managing-databases.md)
+ [RDS for Db2 儲存體存取的預存程序](db2-sp-managing-storage-access.md)
+ [RDS for Db2 資料表空間的預存程序](db2-sp-managing-tablespaces.md)