Re: Logon Trigger Alter Session cmds not doing anything 19.17

From: Chris Taylor <christopherdtaylor1994_at_gmail.com>
Date: Fri, 16 Jun 2023 10:06:50 -0400
Message-ID: <CAP79kiREdc5Dt5hLxS83_pw4tczXxkCTvQxcntXCguiDLkmm8g_at_mail.gmail.com>



Ooops - take out that first line. Should be:

begin

    execute immediate 'alter session set parallel_degree_policy=''ADAPTIVE''';

    execute immediate 'alter session set parallel_degree_limit=4'; end;
/

I was playing around with that first one and forgot to remove it. Works fine in the session but not as a logon trigger.

Thanks

Chris

On Fri, Jun 16, 2023 at 9:41 AM Maxim <mdemenko_at_gmail.com> wrote:

> I get in 19.14 (non cbd) and in 23c (pdb)
>
> SQL> BEGIN
> 2 execute immediate 'alter session set parallel_threads_per_cpu=1';
> 3 execute immediate 'alter session set
> parallel_degree_policy=''ADAPTIVE''';
> 4 execute immediate 'alter session set parallel_degree_limit=4';
> 5 END;
> 6 /
> BEGIN
> *
> ERROR at line 1:
> ORA-02096: specified initialization parameter is not modifiable with this
> option
> ORA-06512: at line 2
>
> Regards
>
> Maxim
>
> On Fri, Jun 16, 2023 at 2:49 PM Chris Taylor <
> christopherdtaylor1994_at_gmail.com> wrote:
>
>> I'm a bit puzzled by this one. I'm trying to limit parallel
>> processes/slaves for one particular user and I've created a logon trigger
>> that does this:
>>
>> CODE:
>> ---------
>> CREATE or replace TRIGGER user_redacted.logon_trigger
>> AFTER logon ON schema
>> enable
>> BEGIN
>> execute immediate 'alter session set parallel_threads_per_cpu=1';
>> execute immediate 'alter session set
>> parallel_degree_policy=''ADAPTIVE''';
>> execute immediate 'alter session set parallel_degree_limit=4';
>> END;
>> /
>>
>> I logon to that schema (in a PDB) after creating the trigger (in the PDB)
>> and none of those params take effect.
>>
>> I can alter those params in a session as that user with no problem, but
>> the trigger isn't doing it. Even tried doing a database-wide trigger and
>> checking if the user is my user of interest. Still nada.
>>
>> I'm clearly missing something and hoping you guys can point me to
>> something obvious?
>>
>> The user does NOT have DBA role but does have a lot of system privileges
>> like "CREATE ANY" , "DROP ANY" privs (for some reason from the past).
>>
>> Thanks,
>>
>> Chris
>>
>>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 16 2023 - 16:06:50 CEST

Original text of this message