ORA-01422 and ORA-01403 error fix AFTER adding a 'after LOGON database' trigger, the following error snippets are found in the log: 1ORA-00604: recursive SQL Level 1 error 2ORA-01422: the actual number of returned rows exceeds the number of requested rows 3ORA-06512: In line 5
After checking the query statement in the trigger, it is found that the following query indeed returns multiple rows of data: www.2cto.com 1 select username, SYS_CONTEXT ('userenv', 'IP _ address') 2 into v_username, v_ip3from sys. v _ $ session where AUDSID = SYS_CONTEXT ('userenv', 'sessionid ');
The filter conditions are added. The complete statement is as follows: 1 select username, SYS_CONTEXT ('userenv', 'IP _ address') 2 into v_username, v_ip3from sys. v _ $ session where AUDSID = SYS_CONTEXT ('userenv', 'sessionid') 4 and upper (username) not in ('sys ') and type <> 'background ';
After resolving this problem, another error was reported: 1ORA-04088: error during execution of trigger '... '2 www.2cto.com ORA-01403: no data found3ORA-06512: at line 5 is resolved after the following Exception Processing statement is added: 1 EXCEPTION2 WHEN NO_DATA_FOUND3 THEN4... author Wang Zi's key