By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,180 Members | 1,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,180 IT Pros & Developers. It's quick & easy.

HELP HELP : ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

P: n/a
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
----------------------------------------------------------------------------------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
----------------------------------------------------------------------------------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
Regards.
tracy kim
Jun 27 '08 #1
Share this Question
Share on Google+
11 Replies


P: n/a

Hello Tracy,

Any DDL (like "create") would perform commit internally before and after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
Regards.
tracy kim

Jun 27 '08 #2

P: n/a
Hi,
i got this error messsage:
[oracle@icems oracle]$ sqlplus /'as sysdba'

SQL*Plus: Release 9.2.0.2.0 - Production on Sat Feb 7 09:45:33 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.2.0 - Production

SQLgrant select on v$session to system;
grant select on v$session to system
*
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed re-validation
ORA-02030: can only select from fixed tables/views
Now, my user unable to do any DDL or DML.
Pls advice! TQ!

regards,
tracy kim

"DBA Infopower Support" <su*****@dbainfopower.comwrote in message news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
Regards.
tracy kim
Jun 27 '08 #3

P: n/a
hi,
pls ignore the previous message which is i can't run the 'grant select
on v_$session to system;'.

Now, i able to run this sql but my users still cannot perform any DDL
or DML, with error message 04045, 01031 and 00932. Please help me!

"DBA Infopower Support" <su*****@dbainfopower.comwrote in message news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
Regards.
tracy kim
Jun 27 '08 #4

P: n/a
Hi,
I forgot to desc the error message:
04045:erros during recompilation/revalidation of log_errors_trig
01031 insufficient priv
00932: inconsistent datatypes

regards,
tracy

"DBA Infopower Support" <su*****@dbainfopower.comwrote in message news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
Regards.
tracy kim
Jun 27 '08 #5

P: n/a

Hello Tracy,

Please check if you have only one servererror trigger. I have got similar
errors when duplicate similar "after servererror" trigger were in place.

use below query to check:

select trigger_name , owner, trigger_type, TRIGGERING_EVENT from
dba_triggers where TRIGGERING_EVENT like '%ERROR%';

If more then one trigger exists, check what it is doing and drop ones with
duplicate functions.

set long 32000
select TRIGGER_BODY from dba_triggers where trigger_name =
<trigger_in_question>

Let us know if any additional help is needed.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi,
I forgot to desc the error message:
04045:erros during recompilation/revalidation of log_errors_trig
01031 insufficient priv
00932: inconsistent datatypes

regards,
tracy

"DBA Infopower Support" <su*****@dbainfopower.comwrote in message
news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and
after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no
warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular
purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from
bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice
the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.
>
I run this script and error message appeal as below:
>
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
>
drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
>
>
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));
>
create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');
>
insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.
>
SQL>roll back;
Rollback complete.
>
After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
>
>
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/
>
OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
>
>
SQLselect * from user_errors;
>
NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist
>
LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
>
>
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
>
>
Regards.
tracy kim

Jun 27 '08 #6

P: n/a
hi,
I had only one servererror trigger as the result of sql:
SQLselect trigger_name , owner, trigger_type, TRIGGERING_EVENT from
2 dba_triggers where TRIGGERING_EVENT like '%ERROR%';

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVENT
----------------------------------------------------------------------------------------------------
LOG_ERRORS_TRIG SYSTEM AFTER
EVENT
ERROR

Now, users can log-in the forms , but cannot do any select, insert,
delete or update. Pls advise!

regrads,
tracy
"DBA Infopower Support" <su*****@dbainfopower.comwrote in message news:<QZ********************@comcast.com>...
Hello Tracy,

Please check if you have only one servererror trigger. I have got similar
errors when duplicate similar "after servererror" trigger were in place.

use below query to check:

select trigger_name , owner, trigger_type, TRIGGERING_EVENT from
dba_triggers where TRIGGERING_EVENT like '%ERROR%';

If more then one trigger exists, check what it is doing and drop ones with
duplicate functions.

set long 32000
select TRIGGER_BODY from dba_triggers where trigger_name =
<trigger_in_question>

Let us know if any additional help is needed.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi,
I forgot to desc the error message:
04045:erros during recompilation/revalidation of log_errors_trig
01031 insufficient priv
00932: inconsistent datatypes

regards,
tracy

"DBA Infopower Support" <su*****@dbainfopower.comwrote in message
news:<J7********************@comcast.com>...
Hello Tracy,
>
Any DDL (like "create") would perform commit internally before and
after
DDL ix executed - I.e. you can not rollback DDL.
>
Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".
>
Please, let us know if this helps.
>
Regards,
>
Support
>
DBA Infopower
>
https://www.dbainfopower.com
>
>
>
The advice provided by DBA Infopower are provided "as is" with no
warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular
purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from
bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice
the
user of the advice accepts the terms and conditions of this statement.
>
>
>
>
"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist

drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist


create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));

create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');

insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.

SQL>roll back;
Rollback complete.

After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation


I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/

OBJECT_NAME
>
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N


SQLselect * from user_errors;

NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
>
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist

LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored


How can i fix this problem? I roll back after I run the trigger, why
this still happened?


Regards.
tracy kim
Jun 27 '08 #7

P: n/a
alter trigger log_errors_trig disable;

correct the errors
and
alter trigger log_errors_trig enable;

Sybrand Bakker
Senior Oracle DBA

tr********@yahoo.com.hk (tracy) wrote in message news:<5c**************************@posting.google. com>...
hi,
I had only one servererror trigger as the result of sql:
SQLselect trigger_name , owner, trigger_type, TRIGGERING_EVENT from
2 dba_triggers where TRIGGERING_EVENT like '%ERROR%';

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVENT
----------------------------------------------------------------------------------------------------
LOG_ERRORS_TRIG SYSTEM AFTER
EVENT
ERROR

Now, users can log-in the forms , but cannot do any select, insert,
delete or update. Pls advise!

regrads,
tracy
"DBA Infopower Support" <su*****@dbainfopower.comwrote in message news:<QZ********************@comcast.com>...
Hello Tracy,

Please check if you have only one servererror trigger. I have got similar
errors when duplicate similar "after servererror" trigger were in place.

use below query to check:

select trigger_name , owner, trigger_type, TRIGGERING_EVENT from
dba_triggers where TRIGGERING_EVENT like '%ERROR%';

If more then one trigger exists, check what it is doing and drop ones with
duplicate functions.

set long 32000
select TRIGGER_BODY from dba_triggers where trigger_name =
<trigger_in_question>

Let us know if any additional help is needed.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi,
I forgot to desc the error message:
04045:erros during recompilation/revalidation of log_errors_trig
01031 insufficient priv
00932: inconsistent datatypes
>
regards,
tracy
>
"DBA Infopower Support" <su*****@dbainfopower.comwrote in message
news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and
after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com



The advice provided by DBA Infopower are provided "as is" with no
warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular
purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from
bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice
the
user of the advice accepts the terms and conditions of this statement.




"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.
>
I run this script and error message appeal as below:
>
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
>
drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
>
>
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));
>
create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');
>
insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.
>
SQL>roll back;
Rollback complete.
>
After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
>
>
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/
>
OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
>
>
SQLselect * from user_errors;
>
NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist
>
LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
>
>
How can i fix this problem? I roll back after I run the trigger, why
this still happened?
>
>
Regards.
tracy kim
Jun 27 '08 #8

P: n/a
Ron

Hello Tracy,

Weird - I created table and trigger similar to yours and they work fine
and capturing DDL errors.

Try to issue "grant insert on log_errors_tab to public" and see if this
would help.

Regards,

Ron
DBA Infopower
http://www.dbainfopower.com
Standard disclaimer:
http://www.dbainfopower.com/dbaip_ad...isclaimer.html



"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
hi,
I had only one servererror trigger as the result of sql:
SQLselect trigger_name , owner, trigger_type, TRIGGERING_EVENT from
2 dba_triggers where TRIGGERING_EVENT like '%ERROR%';

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVENT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG SYSTEM AFTER
EVENT
ERROR

Now, users can log-in the forms , but cannot do any select, insert,
delete or update. Pls advise!

regrads,
tracy
"DBA Infopower Support" <su*****@dbainfopower.comwrote in message
news:<QZ********************@comcast.com>...
Hello Tracy,

Please check if you have only one servererror trigger. I have got
similar
errors when duplicate similar "after servererror" trigger were in place.

use below query to check:

select trigger_name , owner, trigger_type, TRIGGERING_EVENT from
dba_triggers where TRIGGERING_EVENT like '%ERROR%';

If more then one trigger exists, check what it is doing and drop ones
with
duplicate functions.

set long 32000
select TRIGGER_BODY from dba_triggers where trigger_name =
<trigger_in_question>

Let us know if any additional help is needed.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com

The advice provided by DBA Infopower are provided "as is" with no
warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular
purpose
aviating course of dealing and/or performance. DBA Infopower does not
warrant that the advices provided by DBA Infopower will be free from
bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not be
responsible for the quality of information or the authentication of the
services or details given by experts on the advice. By using this advice
the
user of the advice accepts the terms and conditions of this statement.


"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi,
I forgot to desc the error message:
04045:erros during recompilation/revalidation of log_errors_trig
01031 insufficient priv
00932: inconsistent datatypes
>
regards,
tracy
>
"DBA Infopower Support" <su*****@dbainfopower.comwrote in message
news:<J7********************@comcast.com>...
Hello Tracy,

Any DDL (like "create") would perform commit internally before and
after
DDL ix executed - I.e. you can not rollback DDL.

Looks like you run the script as user 'SYSTEM'. As a "sys" user
issue
"grant select on v_$session to system;" This would resolve issue of
"ORA-00942: table or view does not exist".

Please, let us know if this helps.

Regards,

Support

DBA Infopower

https://www.dbainfopower.com



The advice provided by DBA Infopower are provided "as is" with no
warranty.
DBA Infopower expressly disclaims any warranty, regarding the advice
including any implied warranty of merchant fitness for a particular
purpose
aviating course of dealing and/or performance. DBA Infopower does
not
warrant that the advices provided by DBA Infopower will be free from
bias,
detests, errors, eavesdropping or listening. DBA Infopower shall not
be
responsible for the quality of information or the authentication of
the
services or details given by experts on the advice. By using this
advice
the
user of the advice accepts the terms and conditions of this
statement.




"tracy" <tr********@yahoo.com.hkwrote in message
news:5c**************************@posting.google.c om...
Hi, I really need help.
>
I run this script and error message appeal as below:
>
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
>
drop table log_errors_tab;
drop table log_errors_tab
ERROR at line 1:
ORA00942: table or view does not exist
>
>
create table log_errors_tab (
error varchar2(30),
timestamp date,
username varchar2(30),
osuser varchar2(30),
machine varchar2(64),
process varchar2(8),
program varchar2(48));
>
create or replace trigger log_errors_trig
after servererror on database
declare
var_user varchar2(30);
var_osuser varchar2(30);
var_machine varchar2(64);
var_process varchar2(8);
var_program varchar2(48);
begin
select username, osuser, machine, process, program
into var_user, var_osuser, var_machine, var_process, var_program
from sys.v_$session
where audsid = userenv('sessionid');
>
insert into log_errors_tab
values(dbms_standard.server_error(1),sysdate,var_u ser,
var_osuser,var_machine,var_process,var_program);
end;
/
WARINING: trigger created with compilation errors.
>
SQL>roll back;
Rollback complete.
>
After that i got error message in my SQL:
ERROR at line 1:
ORA-04098: trigger 'SYSTEM.LOG_ERRORS_TRIG' is invalid and failed
re-validation
>
>
I check under user_objects & user_errors, result as below:
1 select * from user_objects
2* WHERE STATUS <>'VALID'
SQL/
>
OBJECT_NAME
--------------------------------------------------------------------------
--------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID
OBJECT_TYPE
CREATED LAST_DDL_
------------------------------ --------- --------------
------------------ --------- ---------
TIMESTAMP STATUS T G S
------------------- ------- - - -
LOG_ERRORS_TRIG
47321 TRIGGER
06-FEB-04 06-FEB-04
2004-02-06:14:56:15 INVALID N N N
>
>
SQLselect * from user_errors;
>
NAME TYPE SEQUENCE LINE
POSITION
------------------------------ ------------ --------- ---------
---------
TEXT
--------------------------------------------------------------------------
--------------------------
LOG_ERRORS_TRIG TRIGGER 1 10
13
PL/SQL: ORA-00942: table or view does not exist
>
LOG_ERRORS_TRIG TRIGGER 2 8
2
PL/SQL: SQL Statement ignored
>
>
How can i fix this problem? I roll back after I run the trigger,
why
this still happened?
>
>
Regards.
tracy kim

Jun 27 '08 #9

P: n/a
Hi, I really need help.
>
I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
/

Hello Tracy Kim

Are you giving the commamd SHOW ERRORS after every compile
or invalidation?

Have you checked if there are any invalid objects by:

SELECT SUBSTR(OWNER,1,15), SUBSTR(OBJECT_NAME,1,25), OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID';

or something like that.
Regards

Folke Larsson
Jun 27 '08 #10

P: n/a
Hi, guys,
thanz alot for the idea and suggestions. Anyway, I dropped the
trigger and the table created. After that, db back to normal. B'cos i
am not afford the db down time for more than 2 days. All users start
complaints around the world.

I really appreciate ur guys help! thanz again!

Anyway, i start worried about my db now. The last messages appeals
before I dropped the trigger and the table created is 0604: error
occured at recursive level 1 and 6502: PL/SQL; numeric or value error
: character string too small.

After i dropped the trigger and the table created which cos the error,
some of my users unable to performs certain insert, delete or
updating. But others user who having a same priviledge and role as the
group before, have no problem before.
pls advice me, how to diagnose or check if my db got error. Pls.
Thanz.

regards,
tracy
fo***********@bredband.net (Folke Larsson) wrote in message news:<37**************************@posting.google. com>...
Hi, I really need help.

I run this script and error message appeal as below:

drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
/


Hello Tracy Kim

Are you giving the commamd SHOW ERRORS after every compile
or invalidation?

Have you checked if there are any invalid objects by:

SELECT SUBSTR(OWNER,1,15), SUBSTR(OBJECT_NAME,1,25), OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID';

or something like that.
Regards

Folke Larsson
Jun 27 '08 #11

P: n/a
Hi, guys,
thanz alot for the idea and suggestions. Anyway, I dropped the
trigger and the table created. After that, db back to normal. B'cos i
am not afford the db down time for more than 2 days. All users start
complaints around the world.

I really appreciate ur guys help! thanz again!

Anyway, i start worried about my db now. The last messages appeals
before I dropped the trigger and the table created is 0604: error
occured at recursive level 1 and 6502: PL/SQL; numeric or value error
: character string too small.

Hello again Tracy

You seems to get runtime errors because the size of your
variables are to small.

var_user varchar2(30);
var_osuser varchar2(30);
....
....
from sys.v_$session

They have to fit the sizes from V$SESSION or the table it depends on.
I think they are bigger in their base tables like varchar2(60)or more.
Check it with DESCRIBE V$SESSION or try to use %TYPE. If then the
sizes in table-variables changes, the variable in the trigger don't
have to be changed.
Regards

Folke Larsson
Jun 27 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.