Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Oracle client name from micronaut.application.name property #1446

Open
mikehearn opened this issue Oct 2, 2024 · 1 comment
Open

Set Oracle client name from micronaut.application.name property #1446

mikehearn opened this issue Oct 2, 2024 · 1 comment
Assignees

Comments

@mikehearn
Copy link

Feature description

Micronaut has a global application name concept. Oracle connections can be given a session name that shows up in various places (e.g. when listing active sessions). It is easy to set:

datasources:
  default:
    url: jdbc:oracle:thin:@//localhost:1521/freepdb1
    driver-class-name: oracle.jdbc.OracleDriver
    username: abc
    password: abc
    dialect: oracle
    data-source-properties:
      v$session.program: "My Great Program"

.... but not intuitive to set. Micronaut SQL should configure this data source property when the dialect is oracle by itself so everything just works.

@graemerocher
Copy link
Contributor

You can associate a ClientID,Module/Action with each JDBC interaction so that SQL queries can be traced from where they came from.

See https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/JDBC-standards-support.html#GUID-1987FAC4-E93A-49A5-9EB4-A78B465E6938

We should make these configurable but with sensible defaults:

  • ClientId = micronaut.application.name
  • Module = Micronaut Data Repository
  • Action = Micronaut Data Method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants