IDEMPIERE-4991 Identify iDempiere JDBC connections in DBeaver or other session administration software (#913)

This commit is contained in:
Carlos Ruiz 2021-10-08 10:12:52 +02:00 committed by GitHub
parent 0509df7912
commit cf5c04427b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -204,6 +204,7 @@ public class DB_Oracle implements AdempiereDatabase
*/ */
public String getConnectionURL (CConnection connection) public String getConnectionURL (CConnection connection)
{ {
System.setProperty("oracle.jdbc.v$session.program", "iDempiere");
StringBuilder sb = null; StringBuilder sb = null;
// Server Connections (bequeath) // Server Connections (bequeath)
if (connection.isBequeath()) if (connection.isBequeath())

View File

@ -209,7 +209,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
.append(connection.getDbHost()) .append(connection.getDbHost())
.append(":").append(connection.getDbPort()) .append(":").append(connection.getDbPort())
.append("/").append(connection.getDbName()) .append("/").append(connection.getDbName())
.append("?encoding=UNICODE"); .append("?encoding=UNICODE&ApplicationName=iDempiere");
String urlParameters = System.getProperty("org.idempiere.postgresql.URLParameters"); String urlParameters = System.getProperty("org.idempiere.postgresql.URLParameters");
if (!Util.isEmpty(urlParameters)) { if (!Util.isEmpty(urlParameters)) {