Connecting to your Amazon RDS for Db2 DB instance with IBM Db2 Data Management Console
You can connect to your Amazon RDS for Db2 DB instance with IBM Db2 Data Management Console. IBM Db2 Data Management Console can administer and monitor
several RDS for Db2 DB instances. To download this utility, see IBM Db2 Data Management Console Version 3.1x releases
IBM Db2 Data Management Console requires a repository Db2 database to store metadata and performance metrics but can't automatically create a repository for RDS for Db2.
You must first create a repository database to monitor one or more RDS for Db2 DB instances. Then connect to your RDS for Db2 DB instance with IBM Db2 Data Management Console.
Topics
Creating a repository database to monitor DB instances
You can use an existing properly sized RDS for Db2 DB instance as a repository for IBM Db2 Data Management Console
to monitor other RDS for Db2 DB instances. However, because the admin user doesn't have
SYSCTRL
authority to create buffer pools and tablespaces, using IBM Db2 Data Management Console
repository creation to create a repository database fails. Instead, you must create a
repository database to monitor your RDS for Db2 DB instances. You can create a repository
database two different ways. You can manually create a buffer pool, a tablespace, and
objects for an IBM Db2 Data Management Console repository. Or you can create a separate Amazon EC2 instance to host an
IBM Db2 Data Management Console repository.
Topics
Manually creating a buffer pool, a tablespace, and objects
To create a buffer pool, a tablespace, and objects for IBM Db2 Data Management Console to use
-
Allow privileges for buffer pool and tablespaces.
-
Make changes to scripts, particularly for buffer pools and tablespaces. For more information, see Configuring a repository database
in the IBM Db2 Data Management Console documentation. -
Connect to the
rdsadmin
database. In the following example, replacemaster_username
andmaster_password
with your own information.db2 connect to rdsadmin user
master_username
usingmaster_password
-
Create a buffer pool for IBM Db2 Data Management Console. In the following example, replace
database_name
with the name of the repository you created for IBM Db2 Data Management Console to monitor your RDS for Db2 DB instances.db2 "call rdsadmin.create_bufferpool('
database_name
', 'BP4CONSOLE', 1000, 'Y', 'Y', 16384)" -
Create a tablespace for IBM Db2 Data Management Console. In the following example, replace
database_name
with the name of the repository you created for IBM Db2 Data Management Console to monitor your RDS for Db2 DB instances.db2 "call rdsadmin.create_tablespace('
database_name
', 'TS4CONSOLE', 'BP4CONSOLE', 16384)" -
Create a temporary tablespace for IBM Db2 Data Management Console. In the following example, replace
database_name
with the name of the repository you created for IBM Db2 Data Management Console to monitor your RDS for Db2 DB instances.db2 "call rdsadmin.create_tablespace('
database_name
', 'TS4CONSOLE_TEMP', 'BP4CONSOLE', 16384, 0, 0, 'T')"
-
-
Manually create IBM Db2 Data Management Console objects. For more information, see Configuring a repository database
in the IBM Db2 Data Management Console documentation.
Creating an Amazon EC2 instance to host an IBM Db2 Data Management Console repository
You can create a separate Amazon Elastic Compute Cloud (Amazon EC2) instance to host an IBM Db2 Data Management Console repository.
For information about creating an Amazon EC2 instance, see Tutorial: Get started with Amazon EC2 Linux instances
Connecting to RDS for Db2 DB instances with IBM Db2 Data Management Console
To connect to your RDS for Db2 DB instance, you need its DNS name and port number. For information about finding them, see Finding the endpoint. You also need to know the database name, master username, and master password that you defined when you created your RDS for Db2 DB instance. For more information about finding them, see Creating a DB instance. If you are connecting over the internet, allow traffic to the database port. For more information, see Creating a DB instance.
To connect to RDS for Db2 DB instances with IBM Db2 Data Management Console
-
Start IBM Db2 Data Management Console.
-
Configure the repository.
-
In the Connection and database section, enter the following information for your RDS for Db2 DB instance:
-
For Host, enter the DNS name of the DB instance.
-
For Port, enter the port number for the DB instance.
-
For Database, enter the name of the database.
-
-
In the Security and credential section, enter the following information for your RDS for Db2 DB instance:
-
For Security type, choose Encrypted user and password.
-
For Username, enter the name of the database administrator for the DB instance.
-
For Password, enter the password of the database administrator for the DB instance.
-
-
Choose Test connection.
Note
If the connection is unsuccessful, confirm that the database port is open through the security group's inbound rules. For more information, see Considerations for security groups with Amazon RDS for Db2.
The following error message indicates that the admin user connecting to the RDS for Db2 DB instance doesn't have privileges to create buffer pools or tablespaces. It also indicates that for Db2 repository databases, the user must have
DBADM
andDATACCESS
on the database. The user must also haveSYSCTRL
on the database-instance privilege.Make sure that you created a buffer table, a tablespace, and objects for an IBM Db2 Data Management Console repository to monitor your RDS for Db2 DB instance. Or you can use an Amazon EC2 Db2 DB instance to host an IBM Db2 Data Management Console repository to monitor your RDS for Db2 DB instance. For more information, see Creating a repository database to monitor DB instances.
-
After you successfully test your connection, choose Next.
-
-
In the Set statistics event monitor opt-in window, choose Next.
-
(Optional) Add new connection. If you want to use a different RDS for Db2 DB instance for administration and monitoring, then add a connection to a non-repository RDS for Db2 DB instance.
-
In the Connection and database section, enter the following information for the RDS for Db2 DB instance to use for administration and monitoring:
-
For Connection name, enter the Db2 database identifier.
-
For Host, enter the DNS name of the DB instance.
-
For Port, enter the port number for the DB instance.
-
For Database, enter the name of the database.
-
-
In the Security and credential section, select Enable monitoring data collection.
-
Enter the following information for your RDS for Db2 DB instance:
-
For Username, enter the name of the database administrator for the DB instance.
-
For Password, enter the password of the database administrator for the DB instance.
-
-
Choose Test connection.
-
After you successfully test your connection, choose Save.
After the connection is added, a window similar to the following appears. This window indicates that your database was successfully configured.
-
-
Choose Go to Databases. A Databases window similar to the following appears. This window is a dashboard that shows metrics, statuses, and connections.
You can now start using IBM Db2 Data Management Console to do the following types of tasks:
-
Manage multiple RDS for Db2 DB instances.
-
Run SQL commands.
-
Explore, create, or change data and database objects.
-
Create
EXPLAIN PLAN
statements in SQL. -
Tune queries.
To run SQL commands and view the results
-
In the left navigation bar, choose SQL.
-
Enter a SQL command.
-
Choose Run all.
-
To view the results, choose the Results tab.
![Database window showing how to run a SQL command and view the results in IBM Db2 Data Management Console.](images/ibm-dmc-sql-run-example.png)