Search code examples
oracle-databaseconnectionoracle-sqldeveloper

Why i can not create new connection by my new user in SQL Developer?


when I create new Connection by my new user this error occurs : enter image description here

Status: Failure -Test failed: ORA-00604: error occurred at recursive SQL level 1 ORA-02003: invalid USERENV parameter ORA-06512: at line 2

thanks for help


Solution

  • Are you there is not a logon trigger there? You may not have created one, but someone else may have. For example:

    SQL> create user demo identified by demo;
    
    User created.
    
    SQL> grant create session to demo;
    
    Grant succeeded.
    
    SQL> conn demo/demo
    Connected.
    
    --
    -- so far, so good, now lets create a bad trigger
    --
    
    SQL> conn system/admin
    Connected.
    
    SQL> create or replace
      2  trigger BAD_TRIGGER
      3  after logon on database
      4  begin
      5    if sys_context('USERENV','JUNK') = 'x' then
      6       null;
      7    end if;
      8  end;
      9  /
    
    SQL> conn demo/demo
    ERROR:
    ORA-04088: error during execution of trigger 'SYSTEM.BAD_TRIGGER'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02003: invalid USERENV parameter
    ORA-06512: at "SYS.STANDARD", line 530
    ORA-06512: at line 2
    

    So its possible that an administrator has done this without your knowledge perhaps ?