473,686 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
11 7870

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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
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_ERR ORS_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*****@dbainf opower.comwrote in message news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
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*****@dbainf opower.comwrote in message news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
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*****@dbainf opower.comwrote in message news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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

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_EVEN T from
dba_triggers where TRIGGERING_EVEN T 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_que stion>

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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.com...
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*****@dbainf opower.comwrote in message
news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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
>
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('sessio nid');
>
insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
hi,
I had only one servererror trigger as the result of sql:
SQLselect trigger_name , owner, trigger_type, TRIGGERING_EVEN T from
2 dba_triggers where TRIGGERING_EVEN T like '%ERROR%';

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVEN T
----------------------------------------------------------------------------------------------------
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*****@dbainf opower.comwrote in message news:<QZ******* *************@c omcast.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_EVEN T from
dba_triggers where TRIGGERING_EVEN T 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_que stion>

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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.com...
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*****@dbainf opower.comwrote in message
news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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

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('sessio nid');

insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
alter trigger log_errors_trig disable;

correct the errors
and
alter trigger log_errors_trig enable;

Sybrand Bakker
Senior Oracle DBA

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

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVEN T
----------------------------------------------------------------------------------------------------
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*****@dbainf opower.comwrote in message news:<QZ******* *************@c omcast.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_EVEN T from
dba_triggers where TRIGGERING_EVEN T 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_que stion>

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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.com...
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*****@dbainf opower.comwrote in message
news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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
>
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('sessio nid');
>
insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.com...
hi,
I had only one servererror trigger as the result of sql:
SQLselect trigger_name , owner, trigger_type, TRIGGERING_EVEN T from
2 dba_triggers where TRIGGERING_EVEN T like '%ERROR%';

TRIGGER_NAME OWNER
TRIGGER_TYPE
------------------------------ ------------------------------
----------------
TRIGGERING_EVEN T
--------------------------------------------------------------------------
--------------------------
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*****@dbainf opower.comwrote in message
news:<QZ******* *************@c omcast.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_EVEN T from
dba_triggers where TRIGGERING_EVEN T 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_que stion>

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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.com...
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*****@dbainf opower.comwrote in message
news:<J7******* *************@c omcast.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********@yah oo.com.hkwrote in message
news:5c******** *************** ***@posting.goo gle.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
>
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('sessio nid');
>
insert into log_errors_tab
values(dbms_sta ndard.server_er ror(1),sysdate, var_user,
var_osuser,var_ machine,var_pro cess,var_progra m);
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_ERR ORS_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
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_N AME,1,25), OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID';

or something like that.
Regards

Folke Larsson
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
935
by: Thierry Marneffe | last post by:
Hello I would like to get the content of a field based in the field Name. Suppose a table with a field Named 'LastName' for wich there is a trigger after update I store the field name in a local variable Set @ColName = 'LastName' How can I retrieve the value of the @ColName from the inserted table using
1
2215
by: MM | last post by:
I currently have a trigger on a table which works fine. It performs some audit trail functions. ****************************************************** CREATE TRIGGER trg_1 ON .&nbsp; FOR INSERT, UPDATE, DELETE AS BEGIN &nbsp;SET NOCOUNT ON
8
2936
by: Remove the obvious for replies | last post by:
I am using DB2 8.1.4 with SDE and Info Integrator. I am trying to create a trigger to populate a spatial table based on values from an attribute table. However, it appears to not recognize the CASE condition. Here's the trigger : create trigger MDA.TUA_AMNGROWNDIR after update of UTM8315N, UTM8315E on MDA.MNGROWNDIR referencing new as new_upd for each row mode db2sql
3
4853
by: gimme_this_gimme_that | last post by:
Hi, Start up db2 8.2 as "db2 -td@" and execute the following command : CREATE OR REPLACE TRIGGER "BZ".ALERT_CREATED_DATE BEFORE INSERT ON TS_ALERTS REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN ATOMIC
11
5554
by: ricolee99 | last post by:
Hi everyone, I'm trying to invoke my .exe application from a remote server. Here is the code: ManagementClass processClass = new ManagementClass ("\\\\" +"RemoteServerName" + "\\root\\CIMV2:Win32_Process");
0
1559
by: Antanas | last post by:
I want to insert in federated db TABLE1, when records get inserted into DSY.TABLEA table. CREATE TRIGGER DSY.TRIGA AFTER INSERT ON DSY.TABLEA REFERENCING NEW AS TriggeredRow FOR EACH ROW MODE DB2SQL INSERT INTO FEDSERV.TABLE1 (LOG_TIMESTAMP, USER_NAME) VALUES (CURRENT TIMESTAMP, TriggeredRow.NAME);
0
1063
by: Dino Vliet | last post by:
Hi folks, I'm new to PostgreSQL and am busy tring to work with it. Of pl/pgsql I know even less and that's the part I have a question on right now. I have this nice example to get me started with pl/pgsql....... I have a table with the schedule of a service my sport team wants to offer:
9
2651
by: comp.lang.php | last post by:
I am having problems tracing errors in my code using PHP 4.3.9 on Linux RHEL 4 with Apache 2.0.54 On occasions I see no errors, no parse, no fatal, no warnings, no notices.. and no code either! No HTML, nothing! I get a completely blank page with no content whatsoever. I have at the very top of my page error_reporting(E_ALL);
3
1608
by: PaulvanZyl | last post by:
Good afternoon i have created a trigger to update the sum of a field to another table. this works for updates but not for inserted. please help here is the script create trigger edp1 on opportunities_contacts for insert, update, delete as declare @x money
3
4046
by: chrisindfw | last post by:
Hello all! I have seen very wide discussions on this before on the web but I was wondering what your thoughts were. I have a table where when a record is added, I want to update that row. Sounds simple. But I am getting the nasty error about mutating tables. Here is a very generic summary. TABLE_A Field1 Number
0
8523
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9057
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8942
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8778
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8781
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4317
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.