开发者

JDBC connections: How to specify the port for data-transfer?

开发者 https://www.devze.com 2022-12-27 23:34 出处:网络
I wanto to run my JDBC-connection (either Oracle or MSSQL) through a proxy-server. Reason for this is to have additional controls of the traffic, especially for developing.

I wanto to run my JDBC-connection (either Oracle or MSSQL) through a proxy-server. Reason for this is to have additional controls of the traffic, especially for developing.

I know, I could specify the proxy, which runs on my machine, and the port in the connection-string. But the specified connection-settings are only taken as some kind of handshake to agree on which port the data is finally transferred. And this is defenitly no开发者_开发问答t the port which I have under proxy-control.

So, does anybody have an idea, how to specify the port for the data-transfer? I would prefer if this could be done in the connection-string. The same issue applies for Oracle and MSSQL.

Thx

LeO


For Oracle:

jdbc:oracle:<drivertype>:<username/password>@<database>

The <drivertype> is one of

  • thin
  • oci
  • kprb

The <database> description somewhat depends on the driver type. If the driver type is kprb, then the <database> description is empty. If the driver type is oci and you wish to use a bequeath connection, then the <database> is empty. Otherwise (thin or oci driver and not bequeath) the database description is one of the following:

//<host>:<port>/<service>
<host>:<port>:<SID>
<TNSName>

Example:

jdbc:oracle:oci:@myhost:1521:inst1

See Oracle JDBC FAQ for more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消