Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help me with my log
In article <35bdbe65.2036533_at_news.singnet.com.sg>,
dennygoh_at_mbox5.singnet.com.sg (Daniel) wrote:
> I have a client server application (VB5/Oracle8.03) I need to
> maintain a log file (text file) containing data items of part of my
> table's record whenever a new record is created. Each of this record
> should be appended to my log file named as part of the system date.
> Thus the next day... a new log file created named as the system date
> (to keep track of the specific daily transaction ) .. and so on...
>
> Hope some guru out there can please tell me if this is possible on my
> Unix server and how to go about it....
>
>
You could create a database trigger like the following :
drop trigger check_for_delete;
create trigger check_for_delete
before delete on your_table
for each row
begin
insert into your_logtable(userid, deldate, your_data)
values(user, sysdate, :old.your_column1_dtat || ' ' || :old.your_column2_data || ' DELETE');end;
Then you can use a cron and start an sqlplus script which will extract the data in your logfile to an ASCII file.
Hope this gets you started
--
Oliver Willandsen
European Commission
http://europa.eu.int
All remarks are my own and do not necessarily
reflect official European Commission policy
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Jul 28 1998 - 09:43:13 CDT
![]() |
![]() |