Xref: alice comp.databases.oracle.server:45526
Path: alice!news-feed.fnsi.net!netnews.com!cyclone.news.idirect.com!island.idirect.com!news-peer.gip.net!news-raspail.gip.net!news.gsl.net!gip.net!grolier!club-internet!not-for-mail
From: Stephane Faroult <sfaroult@oriolecorp.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: One object privilege quesiton.
Date: Fri, 09 Apr 1999 19:10:14 -0700
Organization: Oriole Corporation
Lines: 31
Message-ID: <370EB306.7CFF@oriolecorp.com>
References: <37147a35.2841215@news.twsc.pouchen.com.tw>
Reply-To: sfaroult@oriolecorp.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: front5.grolier.fr 923685171 14159 194.158.113.251 (9 Apr 1999 19:12:51 GMT)
NNTP-Posting-Date: 9 Apr 1999 19:12:51 GMT
X-Mailer: Mozilla 3.04 (Win16; I)
To: Violin <violin.hsiao@mail.pouchen.com.tw>

Violin,

Your idea is intellectually quite interesting but never implement this
in this way! Never ever create triggers on SYS table, especially on OBJ$
which is at the core of everything. Even if it works right know, you
never know what the next release has in store. Moreover, your
hard-coding the user id (user#) is especially dangerous; quite possibly
some users where created BEFORE the user you are interested in which
have been since dropped. If you ever do a dull exp/imp, your user# will
probably change.
Do you absolutely need 'real time' grants? I doubt it. Instead of
playing around with SYS tables, I rather suggest you create an Oracle
job (using the dbms_job package), started by AP_DBA, which runs at the
frequency which suits you a procedure (owned by AP_DBA) which looks for
objects which were created since the last time it ran (by the way, type
for tables is 2, not 1. 1 are indexes). Since you are using Oracle7
syntax (you would have written type# with Oracle8) beware however that
Oracle jobs behave well; I have had problems with 7.2, although it was
OK with prior versions and with 7.3 

And try to calm down developers if they are creating tables at a rate
which justifies this kind of processing ...

-- 
Regards,

  Stéphane Faroult
  Oriole Corporation
------------------------------------------------------------------
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
------------------------------------------------------------------
