473,883 Members | 2,961 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
11 7891
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***********@b redband.net (Folke Larsson) wrote in message news:<37******* *************** ****@posting.go ogle.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_N AME,1,25), OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID';

or something like that.
Regards

Folke Larsson
Jun 27 '08 #11
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 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
2221
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
2948
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
4870
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
5572
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
1569
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
1074
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
2660
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
1614
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
4053
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
9944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9797
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
11154
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...
1
10863
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
10422
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
5807
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
6005
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4622
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
2
4228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.