473,804 Members | 3,049 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 4769

"LC" <le*******@hotm ail.com> wrote in message
news:d1******** *************** **@posting.goog le.com...
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*******@hotma il.com (LC) wrote in message news:<d1******* *************** ***@posting.goo gle.com>...
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_logi n_user,
sysdate,
ora_sysevent,
ora_dict_obj_ty pe,
ora_dict_obj_ow ner,
ora_dict_obj_na me);
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****@questdia gnostics.com (abhay) wrote in message news:<23******* *************** ****@posting.go ogle.com>...
le*******@hotma il.com (LC) wrote in message news:<d1******* *************** ***@posting.goo gle.com>...
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
2848
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 would like to show users the changes other users have made to a text field using a other font or font color. Thanks
10
2666
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 prefer composition over inheritance. Can anyone provide some reasons why this is the case (based on "real-world" experience)? For example, is structural inheritance more difficult to maintain? More difficult to test? Have a larger impact on...
2
2153
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
4042
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
1809
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 keep what will probably be a production server up-to-date with my development server. I've thought a little about replication, but the current options for that seem like overkill for the relatively small database that I have. I'm particularly
2
2770
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 chronological order of my changes to the database. Could someone share with me their technique for keeping track of database changes? I'm actually thinking a set of tables would be best, because sometimes
2
2139
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 and gets missed by the guys is the generation of SQL Scripts and checking them into sourcecontrol. I know that using SQL Server profiler you directly trace ALTER, DELETE and CREATE statements on all objects in your database. You can also
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, Lee Cho
3
4198
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 which gives them specific views of the data. I'd like to track all the changes made to a record which works find with the following code : basAuditTrail: Option Compare Database Const cDQ As String = """" Sub AuditTrail(frm As Form, recordid As...
0
9572
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,...
1
10303
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
10070
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
9132
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
5508
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
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
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
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.