OceanBase Deployer Center (ODC) allows you to connect to an Oracle tenant in OceanBase Database. This topic describes the prerequisites and procedure for connecting to OceanBase Database by using ODC.
Prerequisites
You have downloaded and installed the ODC client.
Procedure
This topic takes the example of creating a private connection for a user tenant (oracle@tenant) by using the ODC client as an example in web ODC. Follow these steps:
Open the ODC client. On the Private Connections tab of the homepage of ODC, click Create Connection in the upper-right corner to create a private connection.
Note
When you run ODC for the first time, the loading time may take a bit longer than usual.
Specify the following parameters on the Create Connection tab. If you have an OceanBase connection string, which is in the format of mysql
-h <host name> -P <port number> -u <database username@tenant name>#<cluster name> -D <default database> -p <database password>, you can obtain the information from the string or you can use the Intelligent DNS Resolution tool on the tab to automatically specify these parameters.Parameter Description Database Type Select Physical Database. Notes: - Physical Database: regular databases.
- Logical Database: ODP (Sharding).
Region Select BareMetal or Private Cloud. Connection Name Specify the name of the connection. Set Tag You can add some descriptive information for the connection.
Click the Set Tag button after Connection Name to set a tag for the current connection. You can set and manage tags in the drop-down list that appears.- Tag setting: Select a tag from the drop-down list. Create tags first if the list is empty.
- Tag management: Click Create Tag at the bottom of the list or the settings icon above the list to go to the Tags page, where you can edit or delete created tags. You can also click Create Tag to set a name or color for the new tag.
Intelligent Parsing You can paste a connection string to the field. ODC automatically identifies the string and fills in the corresponding fields on the page. Connection Mode Select Oracle. Logical databases support only the MySQL mode. Endpoint - Host IP: the IP address of the server where the connected database is located.
- Port: the port number of the server where the connected database is located.
- Cluster Name: the name of the cluster where the connected database is located. This parameter is not required for logical databases.
- Tenant Name: the name of the tenant in which the connected database is located. This parameter is not required for logical databases.
Note
You can obtain the host name and port number from the details page of the tenant in which the connected database is located, such as a tenant created on Alibaba Cloud or in OceanBase Cloud Platform (OCP).Database Account - Database Username: the username of the account under the tenant.
- Database Password: the password of the account under the tenant. You can click Test Connection after the password box to test whether you can connect to the target database.
- Save Database Password: If you do not select this option, the database password will not be saved in the connection information. You need to enter the database password in the pop-up password window each time when you access the connection or test the connection. If you select this option, the database password will be saved in the connection information. You do not need to enter the database password when you access the connection again.
Note
- An error will be returned if the configurations such as the username, password, or network setting is invalid.
- You can connect only to a database in the current tenant. Otherwise, a test failure error will be returned.
- In ODC V4.0.0 and later, you can save the connection without entering the account and password.
SQL Query Timeout Value You can specify a timeout value for SQL queries. A query whose execution time exceeds the timeout value is automatically terminated. The default timeout value is 60 seconds. Sys Tenant Account Settings Specify whether to use the systenant account to query tenant views. If you select this option, specify Account and Password.
When Database Type is set to Physical Database, you can specify an account that has the privilege to query sys tenant views, and the password. This field is automatically populated whensysis specified as the tenant in Endpoint.- Account: an account having the privilege to check the views under the
systenant. - Password: the password of the account.
Note
- In ODC V2.3.0 and later versions, to use the import and export features, you need to configure the
root@sysaccount in the Advanced Configuration section during connection creation. - Since ODC V2.4.1, the strong dependency on the
root@sysaccount is canceled when you use the import/export feature to query view information. If theroot@sysaccount is not configured, some objects in ODC such as stored procedures and functions cannot be exported. If theroot@sysaccount is configured, you can query views of thesystenant to obtain the optimal data routing strategy, thereby increasing the export speed. - The account and password of the sys tenant are the account and password of a user in a tenant of the cluster. Do not enter
@sys#clusterin the Account field. For example, the account isroot.
Click Save to save the current configuration in the ODC connection list. Next time you log on to ODC, you can directly select the connection from the list. The connection configuration does not necessarily need to pass the connection test when you save the configuration.
Note
Before you save the configuration, you can click Test Connection to test the database connection. If the database username and password are correct, the system returns a message indicating that the connection succeeded.
More information
For more information about other features of ODC, see the ODC documentation in the OceanBase Database documentation center.