For a JDBC application I need to issue a few ALTER SESSION commands. I do not want to put those into the application code itself. Is there a way to specify defaults for the session parameters for the database schema that the application uses (on the database side) ?
most session parameters are defined by the client application. If you want to override the client settings you could create a DATABASE TRIGGER
. For example, this will create a LOGON
trigger on the BAR
schema:
CREATE OR REPLACE TRIGGER bar.foo
AFTER LOGON ON DATABASE WHEN (USER = 'BAR')
BEGIN
dbms_session.set_nls('NLS_NUMERIC_CHARACTERS', '''.,''');
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA=hr';
END foo;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With