Class DB2LUWUtils
java.lang.Object
org.odpi.openmetadata.adapters.connectors.db2luw.utilities.DB2LUWUtils
DB2LUWUtils provides simple functions to work with Db2 for Linux, UNIX and Windows database names and
connection strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDatabaseURL(String serverURL, String databaseName) Convert the connection string for one database on a Db2 for Linux, UNIX and Windows server into a connection string for a different database on the same server.
-
Constructor Details
-
DB2LUWUtils
public DB2LUWUtils()
-
-
Method Details
-
getDatabaseURL
Convert the connection string for one database on a Db2 for Linux, UNIX and Windows server into a connection string for a different database on the same server. Db2's JDBC URLs identify the target database through the final path segment (eg "jdbc:db2://host:port/databaseName"), so the existing database name on the URL is replaced with the requested database's name rather than appended as a connection property.- Parameters:
serverURL- connection string used to connect to one database on the Db2 for Linux, UNIX and Windows ServerdatabaseName- name of the target database- Returns:
- connection string
-