setting Client Info in JDBC for Oracle

后端 未结 1 820
野趣味
野趣味 2021-01-05 08:37

I have a Java application which needs to be audited (so obviously I need a way in which the app can be identified with the application name). I googled and found that ojdbc1

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-05 09:22

    For AbstractMethodError, please check Why do I get java.lang.AbstractMethodError when trying to load a blob in the db?

    In order to distinguish your connections in Oracle you can use this sample code below:

    Properties jdbcProperties = new Properties();
    
    this.jdbcProperties.put("user", userName);
    this.jdbcProperties.put("password", password);
    this.jdbcProperties.put("v$session.program", "YourApplicationName");
    DriverManager.getConnection(url, jdbcProperties);
    

    then check v$session by grouping against program column for your connections..

    0 讨论(0)
提交回复
热议问题