473,508 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to track structural changes in db

LC
hi,
i worry about people doing something they shouldn't to my db and I
would like to track any structural changes (who and which)to my db. I
am using oracle 8.0.6.0.0 and 9.2.0.2.0.

regards,
Lee Cho
Jul 19 '05 #1
3 4731

"LC" <le*******@hotmail.com> wrote in message
news:d1*************************@posting.google.co m...
hi,
i worry about people doing something they shouldn't to my db and I
would like to track any structural changes (who and which)to my db. I
am using oracle 8.0.6.0.0 and 9.2.0.2.0.

regards,
Lee Cho

Best way is to not give them the rights to do any. If you have to then
create a trigger on ddl changes and track the user and when in a table. See
SQL Reference documentation.
Jim
Jul 19 '05 #2
le*******@hotmail.com (LC) wrote in message news:<d1*************************@posting.google.c om>...
hi,
i worry about people doing something they shouldn't to my db and I
would like to track any structural changes (who and which)to my db. I
am using oracle 8.0.6.0.0 and 9.2.0.2.0.

regards,
Lee Cho


At least in case of 9.2.0.2.0 database, you can use APPLICATION_DDL trigger.
Jul 19 '05 #3
hi, Lee Cho
try this as provided by norman dunbar in DBAZine.
step 1: create tablespace, user and table using system as below:

conn system/manager@test

/* create tablespace*/
create tablespace logging
datafile'/data2/test/logging.dbf' size 200m
extent management local
uniform size 64k;

tablespace created

/*create user*/
create user logging identified by daft
default tablespace logging
temporary tablespace temp
quota 0 on system
quota 200m on logging

user created

/* create table*/

create table logging.ddl_log(
user_name varchar2(30),
ddl_date date,
ddl_type varchar2(30),
object_type varchar2(100),
owner varchar2(100),
object_name varchar2(150)
) tablespace logging

table created
-------
connect sys@test
enter password: XXX
connected.

/*create trigger*/
create or replace trigger DDLtrigger
after DDL on database
begin
insert into logging.ddl_log
values(ora_login_user,
sysdate,
ora_sysevent,
ora_dict_obj_type,
ora_dict_obj_owner,
ora_dict_obj_name);
exception
when others then
NULL;
end;

trigger created.

then using a userid and login. simply perform some ddl statemnet.

then query the table :
column user_name format a10
column ddl_date format a20
column owner_ format a10
column object_name format a20
column object_type format a20
column ddl_type format a20
set lines 150
set pages 50
select * from logging.ddl_log
/

u will able to see the track.

all the best!

regards,
tracy





ku****@questdiagnostics.com (abhay) wrote in message news:<23**************************@posting.google. com>...
le*******@hotmail.com (LC) wrote in message news:<d1*************************@posting.google.c om>...
hi,
i worry about people doing something they shouldn't to my db and I
would like to track any structural changes (who and which)to my db. I
am using oracle 8.0.6.0.0 and 9.2.0.2.0.

regards,
Lee Cho


At least in case of 9.2.0.2.0 database, you can use APPLICATION_DDL trigger.

Jul 19 '05 #4

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

Similar topics

1
2823
by: JLuppens | last post by:
Does anyone know if there is a way to track changes in a text field like word does? I am using a SQL2000 database and can use either VB.Net or Access. The field is either ntext or Varchar. I...
10
2633
by: davidrubin | last post by:
Structural inheritance (inheriting implementation) is equivalent to composition in that a particular method must either call 'Base::foo' or invoke 'base.foo'. Apparantly, The Literature tells us to...
2
2138
by: adam.spamfree | last post by:
Hi, I was just wondering if anyone could give me an explanation of what the difference between "structural" and "presentational" elements is. thanks a lot.
5
4025
by: Daniel Walzenbach | last post by:
Hi, I need to track all changes made to an object. Consider the following class: Public Class Dog
7
1782
by: Mike McGavin | last post by:
Hi everyone. I'm searching for a quick and dirty way to have psql record the SQL statements that I enter, especially those related to the database structure. My main motivation is to help...
2
2755
by: metaperl | last post by:
I'm actually taking Microsoft's 2779 and just finished a lab where we kept track of our changes to the database. However, I'm not happy with the scripts interface because it does not tell me the...
2
2131
by: Graville | last post by:
All, OK wasn't sure where to post this one but this should hopefully be ok. I am looking for a way to streamline some of the process within our dev team. One of the areas that often takes time...
2
359
by: LC | last post by:
hi, i worry about people doing something they shouldn't to my db and I would like to track any structural changes (who and which)to my db. I am using oracle 8.0.6.0.0 and 9.2.0.2.0. regards,...
3
4165
by: dirksza2009 | last post by:
Hi, I've made a multi user (4 end users) database in Access 2000. I've made data tables, reference tables etc which sits on a shared drive and I've made individual front ends for the end users...
0
7225
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,...
1
7042
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...
0
7495
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...
0
5627
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,...
1
5052
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.