

# Amazon RDS for Db2 stored procedure reference
<a name="db2-stored-procedures"></a>

You can manage your Amazon RDS for Db2 DB instances running the Db2 engine by calling built-in stored procedures.


| Stored procedure | Category | Description | 
| --- | --- | --- | 
|  [rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database)  |  Databases  |  Use the `rdsadmin.activate_database` stored procedure to activate a database on a standalone RDS for Db2 DB instance.   | 
|  [rdsadmin.add\$1groups](db2-sp-granting-revoking-privileges.md#db2-sp-add-groups)  |  Granting and revoking privileges  |  Use the `rdsadmin.add_groups` stored procedure to add one or more groups to a user for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.add\$1user](db2-sp-granting-revoking-privileges.md#db2-sp-add-user)  |  Granting and revoking privileges  |  Use the `rdsadmin.add_user` stored procedure to add a user to an authorization list for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.alter\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-alter-buffer-pool)  |  Buffer pools  |  Use the `rdsadmin.alter_bufferpool` stored procedure to modify a buffer pool for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.alter\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-alter-tablespace)  |  Tablespaces  |  Use the `rdsadmin.alter_tablespace` stored procedure to modify a tablespace for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.backup\$1database](db2-sp-managing-databases.md#db2-sp-backup-database)  |  Database  |  Use the `rdsadmin.backup_database` stored procedure to back up a database on an RDS for Db2 DB instance to an Amazon S3 bucket. Then you can restore the backup from Amazon S3 to an RDS for Db2 DB instance or to another location such as a local server.  | 
|  [rdsadmin.catalog\$1storage\$1access](db2-sp-managing-storage-access.md#db2-sp-catalog-storage-access)  |  Storage access  |  Use the `rdsadmin.catalog_storage_access` stored procedure to catalog a storage alias for accessing an Amazon S3 bucket with Db2 data files for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.change\$1password](db2-sp-granting-revoking-privileges.md#db2-sp-change-password)  |  Granting and revoking privileges  |  Use the `rdsadmin.change_password` stored procedure to change a user's password for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.complete\$1rollforward](db2-sp-managing-databases.md#db2-sp-complete-rollforward)  |  Databases  |  Use the `rdsadmin.complete_rollforward` stored procedure to bring a database on an RDS for Db2 DB instance online from a `ROLL-FORWARD PENDING` state. A `ROLL-FORWARD PENDING` state occurs when you called [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database) but set the `complete_rollforward` parameter to `FALSE`.  | 
|  [rdsadmin.configure\$1db\$1audit](db2-sp-managing-audit-policies.md#db2-sp-configure-db-audit)  |  Audit policies  |  Use the `rdsadmin.configure_db_audit` stored procedure to modify an audit policy for a database on an RDS for Db2 DB instance. If no audit policy exists, running this stored procedure creates an audit policy.  | 
|  [rdsadmin.create\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-create-buffer-pool)  |  Buffer pools  |  Use the `rdsadmin.create_bufferpool` stored procedure to create a buffer pool for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.create\$1database](db2-sp-managing-databases.md#db2-sp-create-database)  |  Databases  |  Use the `rdsadmin.create_database` stored procedure to create a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.create\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-create-role)  |  Granting and revoking privileges  |  Use the `rdsadmin.create_role` stored procedure to create a role to attach to a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.create\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-create-tablespace)  |  Tablespaces  |  Use the `rdsadmin.create_tablespace` stored procedure to create a tablespace for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.db2pd\$1command](db2-sp-managing-databases.md#db2-sp-db2pd-command)  |  Databases  |  Use the `rdsadmin.db2pd_command` stored procedure collect information about a database on an RDS for Db2 DB instance. This information can help with monitoring and troubleshooting databases in RDS for Db2.  | 
|  [rdsadmin.db2support\$1command](db2-sp-managing-databases.md#db2-sp-db2support-command)  |  Databases  |  Use the `rdsadmin.db2support_command` stored procedure to collect diagnostic information about a database on an RDS for Db2 DB instance and upload it to an Amazon S3 bucket.  | 
|  [rdsadmin.dbadm\$1grant](db2-sp-granting-revoking-privileges.md#db2-sp-dbadm-grant)  |  Granting and revoking privileges  |  Use the `rdsadmin.dbadm_grant` stored procedure to grant one or more authorization types ( `DBADM`, `ACCESSCTRL`, or `DATAACCESS`) to one or more roles, users, or groups for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.dbadm\$1revoke](db2-sp-granting-revoking-privileges.md#db2-sp-dbadm-revoke)  |  Granting and revoking privileges  |  Use the `rdsadmin.dbadm_revoke` stored procedure to revoke one or more authorization types ( `DBADM`, `ACCESSCTRL`, or `DATAACCESS`) from one or more roles, users, or groups for a database on an RDS for Db2 DB instance.  | 
|   [rdsadmin.deactivate\$1database](db2-sp-managing-databases.md#db2-sp-deactivate-database)  |  Databases  |  Use the `rdsadmin.deactivate_database` stored procedure to deactivate a database on an RDS for Db2 DB instance. You can deactivate databases to conserve memory resources.  | 
|  [rdsadmin.disable\$1db\$1audit](db2-sp-managing-audit-policies.md#db2-sp-disable-db-audit)  |  Audit policies  |  Use the `rdsadmin.disable_db_audit` stored procedure to stop audit logging and remove an audit policy from a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.drop\$1bufferpool](db2-sp-managing-buffer-pools.md#db2-sp-drop-buffer-pool)  |  Buffer pools  |  Use the `rdsadmin.drop_bufferpool` stored procedure to drop a buffer pool from a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.drop\$1database](db2-sp-managing-databases.md#db2-sp-drop-database)  |  Databases  |  Use the `rdsadmin.drop_database` stored procedure to drop a database from an RDS for Db2 DB instance.  | 
|  [rdsadmin.drop\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-drop-role)  |  Granting and revoking privileges  |  Use the `rdsadmin.drop_role` stored procedure to delete a role from a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.drop\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-drop-tablespace)  |  Tablespaces  |  Use the `rdsadmin.drop_tablespace` stored procedure to drop a tablespace from a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.fgac\$1command](db2-sp-managing-databases.md#db2-sp-fgac-command)  |  Databases  |  Use the `rdsadmin.fgac_command` stored procedure to control access at the row or column level to table data in your database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.force\$1application](db2-sp-managing-databases.md#db2-sp-force-application)  |  Databases  |  Use the `rdsadmin.force_application` stored procedure to force applications off of a database on an RDS for Db2 DB instance to perform maintenance.   | 
|  [rdsadmin.grant\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-grant-role)  |  Granting and revoking privileges  |  Use the `rdsadmin.grant_role` stored procedure to assign a role to a grantee role, user, or group in a database on an RDS for Db2 DB instance. You can also use this stored procedure to give the grantee role `DBADM` authorization to assign roles.  | 
|  [rdsadmin.list\$1archive\$1log\$1information](db2-sp-managing-databases.md#db2-sp-list-archive-log-information)  |  Databases  |  Use the `rdsadmin.list_archive_log_information` stored procedure to return information about archive logs for a database on an RDS for Db2 DB instance. This information includes details such as size and creation date of individual log files, and the total storage used by the archive log files.  | 
|  [rdsadmin.list\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-list-sid-group-mapping)  |  Granting and revoking privileges  |  Use the `rdsadmin.list_sid_group_mapping` stored procedure to return a list of all security ID (SID) and Active Directory group mappings configured on an RDS for Db2 DB instance.  | 
|  [rdsadmin.list\$1users](db2-sp-granting-revoking-privileges.md#db2-sp-list-users)  |  Granting and revoking privileges  |  Use the `rdsadmin.list_users` stored procedure to return a list of users on an authorization list for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.reactivate\$1database](db2-sp-managing-databases.md#db2-sp-reactivate-database)  |  Databases  |  Use the `rdsadmin.reactivate_database` stored procedure to reactivate a database on an RDS for Db2 DB instance after you make database configuration changes. For a database on a standalone DB instance, you can use either this stored procedure or the [rdsadmin.activate\$1database](db2-sp-managing-databases.md#db2-sp-activate-database) stored procedure. For a database on a replica source DB instance, you must use the `rdsadmin.reactivate_database` stored procedure.  | 
|  [rdsadmin.remove\$1groups](db2-sp-granting-revoking-privileges.md#db2-sp-remove-groups)  |  Granting and revoking privileges  |  Use the `rdsadmin.remove_groups` stored procedure to remove one or more groups from a user for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.remove\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-remove-sid-group-mapping)  |  Granting and revoking privileges  |  Use the `rdsadmin.remove_sid_group_mapping` stored procedure to remove a security ID (SID) and its corresponding Active Directory group mapping from an RDS for Db2 DB instance.  | 
|  [rdsadmin.remove\$1user](db2-sp-granting-revoking-privileges.md#db2-sp-remove-user)  |  Granting and revoking privileges  |  Use the `rdsadmin.remove_user` stored procedure to remove a user from an authorization list for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.rename\$1tablespace](db2-sp-managing-tablespaces.md#db2-sp-rename-tablespace)  |  Tablespaces  |  Use the `rdsadmin.rename_tablespace` stored procedure to rename a tablespace for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database)  |  Databases  |  Use the `rdsadmin.restore_database` stored procedure to restore a database on an RDS for Db2 DB instance from an Amazon S3 bucket.  | 
|  [rdsadmin.revoke\$1role](db2-sp-granting-revoking-privileges.md#db2-sp-revoke-role)  |  Granting and revoking privileges  |  Use the `rdsadmin.revoke_role` stored procedure to revoke a role from a grantee role, user, or group in a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database)  |  Databases  |  Use the `rdsadmin.rollforward_database` stored procedure to bring a database on an RDS for Db2 DB instance online, and to apply transaction logs after you restored a database on an RDS for Db2 DB instance by calling [rdsadmin.restore\$1database](db2-sp-managing-databases.md#db2-sp-restore-database).  | 
|  [rdsadmin.rollforward\$1status](db2-sp-managing-databases.md#db2-sp-rollforward-status)  |  Databases  |  Use the `rdsadmin.rollforward_status` stored procedure to query the rollforward status of calling the [rdsadmin.rollforward\$1database](db2-sp-managing-databases.md#db2-sp-rollforward-database) or [rdsadmin.complete\$1rollforward](db2-sp-managing-databases.md#db2-sp-complete-rollforward) stored procedure on an RDS for Db2 DB instance.  | 
|  [rdsadmin.set\$1archive\$1log\$1retention](db2-sp-managing-databases.md#db2-sp-set-archive-log-retention)  |  Databases  |  Use the `rdsadmin.set_archive_log_retention` stored procedure to configure how long to retain archive log files for a database on an RDS for Db2 DB instance. You can also use this stored procedure to disable archive log retention.  | 
|  [rdsadmin.set\$1configuration](db2-sp-managing-databases.md#db2-sp-set-configuration)  |  Databases  |  Use the `rdsadmin.set_configuration` stored procedure to configure certain settings for a database on an RDS for Db2 DB instance.  | 
|  [rdsadmin.set\$1sid\$1group\$1mapping](db2-sp-granting-revoking-privileges.md#db2-sp-set-sid-group-mapping)  |  Granting and revoking privileges  |  Use the `rdsadmin.set_sid_group_mapping` stored procedure to create a mapping between a security ID (SID) and the corresponding Active Directory group on an RDS for Db2 DB instance.  | 
|  [rdsadmin.show\$1archive\$1log\$1retention](db2-sp-managing-databases.md#db2-sp-show-archive-log-retention)  |  Databases  | Use the rdsadmin.show\$1archive\$1log\$1retention stored procedure to return the current archive log retention setting for a database on an RDS for Db2 DB instance. | 
|  [rdsadmin.show\$1configuration](db2-sp-managing-databases.md#db2-sp-show-configuration)  |  Databases  | Use the rdsadmin.show\$1configuration stored procedure to return one or more settings that are modifiable for a database on an RDS for Db2 DB instance. | 
|  [rdsadmin.uncatalog\$1storage\$1access](db2-sp-managing-storage-access.md#db2-sp-uncatalog-storage-access)  |  Storage access  |  Use the `rdsadmin.uncatalog_storage_access` stored procedure to remove a storage alias for accessing an Amazon S3 bucket with Db2 data files.  | 
|  [rdsadmin.update\$1db\$1param](db2-sp-managing-databases.md#db2-sp-update-db-param)  |  Databases  | Use the rdsadmin.update\$1db\$1param stored procedure to update database parameters for a database on an RDS for Db2 DB instance. | 
|  [rdsadmin.enable\$1archive\$1log\$1copy](db2-sp-managing-databases.md#db2-sp-enable_archive_log_copy)  |  Databases  | Use the rdsadmin.enable\$1archive\$1log\$1copy stored procedure to enables RDS Db2 database archive log copy to Amazon S3. | 
|  [rdsadmin.disable\$1archive\$1log\$1copy](db2-sp-managing-databases.md#db2-sp-disable_archive_log_copy)  |  Databases  | Use the rdsadmin.disable\$1archive\$1log\$1copy stored procedure to disable RDS Db2 database archive log copy to Amazon S3. | 

**Topics**
+ [Considerations for Amazon RDS for Db2 stored procedures](db2-stored-procedures-considerations.md)
+ [Stored procedures for granting and revoking privileges for RDS for Db2](db2-sp-granting-revoking-privileges.md)
+ [Stored procedures for audit policies for RDS for Db2](db2-sp-managing-audit-policies.md)
+ [Stored procedures for buffer pools for RDS for Db2](db2-sp-managing-buffer-pools.md)
+ [Stored procedures for databases for RDS for Db2](db2-sp-managing-databases.md)
+ [Stored procedures for storage access for RDS for Db2](db2-sp-managing-storage-access.md)
+ [Stored procedures for tablespaces for RDS for Db2](db2-sp-managing-tablespaces.md)