This function allows you to configure a database connection. After you configure a database connection, you need to select it when you configure a DB (database) API. The database connection enables the DB API to connect to the database and perform the following functions:
- Fetching data from the database
- Storing or manipulating data in the database
The DB API contains the SQL query. The DB API executes the SQL query to perform a specific function in the database.
To configure a database connection:
- On the home page of the vConnect module, find the Database Connection tab.
- Click the Database Connection tab, and then click Add, and the Add Details dialog box opens.
- On the Add Details dialog box, enter the details to configure the database connection as follows:
|Database Connection Name||In this box, enter the name of the database connection.|
|Type of Database||Click this list to select the database (for example: – Oracle).|
|Load Balancer||Click this list, and then select Y to use the load balancer for database configuration. Otherwise, select N. (Optional step)|
|IP Address||Click this list to select the IP address of the database.|
|Port Number||Click this list to select a port number to connect to the database.|
|Database Name||Click this list to select the name of the database client. |
Note: – You define the name of the database when you configure a database client on your computer system. Refer the earlier screen capture of Postgres SQL Connection screen.
|Schema Name||Click this list to select the name of the schema. (Optional step)|
|User Name||Click this list to select the user name so that the API can access the database. |
Note: – You also define a user name and a password to create a user account at the database level when you configure a database client on your computer system.
|Password||Click this list to select the password so that the API can access the database.|
|Connection Pool||Click this list, and then select Y to establish a connection pool that maintains the cache of the database connection. (Optional step)|
|Max Active Conn||Click this list to select the value that specifies the maximum number of active connections that the API can establish to the database. (Optional step)|
|Max Ideal Conn||Click this list, and then select the value that specifies the maximum number of connections or queries that can connect to the database concurrently. (Optional step)|
|Max Wait Timeout||Click this list, and then select the maximum time until the query will be active to connect to the database and get the result. If the query’s active session time exceeds the maximum wait timeout, the query will throw an error.|
- After you enter or select the configuration details, click Add to establish a database connection.
Note:- On the Add Details dialog box, you can click the Add Environment Variable to add a new environment variable. On the Vahana platform, the environment variable is used to store the information related to the database client.