2.2.8 THIRD Connection Type
Connect to a third-party database. You need to add the appropriate driver jar
to <sqlcl-root>/lib/drivers/
. For example, for MYSQL you can
download mysql-connector-java-8.0.30.jar
.
The connection spec parameter is specific to the database but generally takes the form:
<username>[/<password>]@jdbc:<dbtype>://<host>:<port>
Options
Option | Description |
---|---|
-third, t | Specifies a THIRD connection type. |
-user, u | Specifies the user name. This is an alternative to providing it in the connection spec parameter. |
-password, pw | Specifies the password. This is an alternative to providing it in the connection spec parameter. |
-url | Specifies the URL. This is an alternative to providing it in the connection spec parameter. |
-role, r | Specifies the database role. This is an alternative to providing it in the connection spec parameter. |
-edition, ed | Specifies the Oracle database edition. This is an alternative to providing it in the connection spec parameter. |
-verbose, v | Requests output of diagnostic information about the connection. |
Parameters
Parameter | Description |
---|---|
<connectionspec> | Provides the connection specification for the target database. |
Example
To connect to MySQL:
SQL> CONNECT myuser/passwd@jdbc:mysql://myhost:9906