From oracle-l-bounce@freelists.org  Thu Feb 26 20:22:39 2004
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i1R2Mc311505
 for <oracle-l@orafaq.com>; Thu, 26 Feb 2004 20:22:38 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i1R2Mco11500
 for <oracle-l@orafaq.com>; Thu, 26 Feb 2004 20:22:38 -0600
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id C462E3950E5; Thu, 26 Feb 2004 21:17:05 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Thu, 26 Feb 2004 21:15:57 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from irvbhxw02.prod.quest.corp (irvbhxw02.quest.com [12.106.87.69])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B08D339502F
 for <oracle-l@freelists.org>; Thu, 26 Feb 2004 21:15:53 -0500 (EST)
Received: from irvmbxw02.prod.quest.corp ([10.1.2.203]) by irvbhxw02.prod.quest.corp with Microsoft SMTPSVC(5.0.2195.6713);
	 Thu, 26 Feb 2004 18:18:44 -0800
X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3FCD8.06734E48"
Subject: RE: using system event triggers
Date: Thu, 26 Feb 2004 18:18:44 -0800
Message-ID: <B5C5F99D765BB744B54FFDF35F60262119FBDA@irvmbxw02>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: using system event triggers
Thread-Index: AcP8yrXOXoE5d3A9SeSTJ7f5Y6IlpwAC008A
From: "Jacques Kilchoer" <Jacques.Kilchoer@quest.com>
To: <oracle-l@freelists.org>
X-OriginalArrivalTime: 27 Feb 2004 02:18:45.0659 (UTC) FILETIME=[06F87EB0:01C3FCD8]
X-archive-position: 2179
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: Jacques.Kilchoer@quest.com
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l
------_=_NextPart_001_01C3FCD8.06734E48
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Are you getting ready for April Fool's Day?
As far as I know it's not possible. If you raise an error then all you =
will get is the error logged in a trace file. I suppose you could try to =
find a command that, because of an Oracle bug, causes the database to go =
down. One was mentioned on the list today. (NUMTOYMINTERVAL with an =
extra long parameter)
How about doing an "alter system enable restricted session" in the =
trigger? Would that be sufficient?
Are you trying to verify the database name or the global name?

-----Original Message-----
From: oracle-l-bounce@freelists.org =
[mailto:oracle-l-bounce@freelists.org]On Behalf Of Josh Collier
Sent: jeudi, 26. f=E9vrier 2004 16:42
To: 'oracle-l@freelists.org'
Subject: using system event triggers


Is there a way to use a system event trigger to prevent completion of =
database open if a criteria isn't met
=20
some psuedo code to elaborate:
=20
CREATE OR REPLACE TRIGGER sys.post_dup_check

AFTER

STARTUP

ON DATABASE

DECLARE

db_name VARCHAR2 (50);




BEGIN=20



db_name :=3D ora_database_name;

IF db_name  ! =3D ' whatever .WORLD'=20

then don't open




END IF;=20



END;

/


------_=_NextPart_001_01C3FCD8.06734E48
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D134200402-27022004><FONT face=3DGaramond>Are you =
getting ready=20
for April Fool's Day?</FONT></SPAN></DIV>
<DIV><SPAN class=3D134200402-27022004><FONT face=3DGaramond>As far as I =
know it's=20
not possible. If you raise an error then all you will get is the error =
logged in=20
a trace file. I suppose you could try to find a command that, because of =
an=20
Oracle bug, causes the database to go down. One was mentioned on the =
list today.=20
(</FONT><FONT face=3DGaramond>NUMTOYMINTERVAL<SPAN =
class=3D134200402-27022004> with=20
an extra long parameter)</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=3D134200402-27022004><FONT face=3DGaramond><SPAN=20
class=3D134200402-27022004>How about doing an "alter system enable =
restricted=20
session" in the trigger? Would that be =
sufficient?</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=3D134200402-27022004><FONT face=3DGaramond><SPAN=20
class=3D134200402-27022004>Are you trying to verify the database name or =
the=20
global name?</SPAN></FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  oracle-l-bounce@freelists.org =
[mailto:oracle-l-bounce@freelists.org]<B>On=20
  Behalf Of </B>Josh Collier<BR><B>Sent:</B> jeudi, 26. f=E9vrier 2004=20
  16:42<BR><B>To:</B> 'oracle-l@freelists.org'<BR><B>Subject:</B> using =
system=20
  event triggers<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D868463900-27022004><FONT face=3DArial =
color=3D#0000ff size=3D2>Is=20
  there a way to use a system event trigger to prevent completion of =
database=20
  open if a criteria isn't met</FONT></SPAN></DIV>
  <DIV><SPAN class=3D868463900-27022004><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D868463900-27022004><FONT face=3DArial =
color=3D#0000ff size=3D2>some=20
  psuedo code to elaborate:</FONT></SPAN></DIV>
  <DIV><SPAN class=3D868463900-27022004><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D868463900-27022004><B><FONT color=3D#0000ff>
  <P><FONT size=3D2>CREATE OR </FONT></FONT><FONT size=3D2>REPLACE <FONT =

  color=3D#0000ff>TRIGGER </B></FONT>sys<FONT=20
  color=3D#ff0000>.</FONT>post_dup_check</FONT></P>
  <P><B><FONT color=3D#0000ff><FONT size=3D2>AFTER</FONT></P>
  <P></FONT><FONT color=3D#800080><FONT size=3D2>STARTUP</FONT></P>
  <P></FONT><FONT color=3D#0000ff><FONT size=3D2>ON DATABASE</FONT></P>
  <P><FONT size=3D2>DECLARE</FONT></P>
  <P></B></FONT><FONT size=3D2>db_name <B><FONT color=3D#800080>VARCHAR2 =

  </B></FONT></FONT><FONT size=3D2><FONT =
color=3D#ff0000>(</FONT>50</FONT><FONT=20
  color=3D#ff0000><FONT size=3D2>);</FONT></P>
  <P></FONT><STRONG><FONT color=3D#0000ff size=3D2></FONT></STRONG>
  <P><FONT size=3D2><FONT color=3D#ff0000></P></FONT></FONT><B><FONT=20
  color=3D#0000ff><FONT size=3D2>BEGIN</FONT>
  <P></P>
  <P></B></FONT><FONT size=3D2>db_name :<FONT color=3D#ff0000>=3D=20
  </FONT>ora_database_name</FONT><FONT color=3D#ff0000><FONT =
size=3D2>;</FONT></P>
  <P></FONT><B><FONT color=3D#0000ff><FONT size=3D2>IF =
</FONT></B></FONT><FONT=20
  size=3D2>db_name<SPAN class=3D868463900-27022004><FONT face=3DArial=20
  color=3D#0000ff>&nbsp; !</FONT></SPAN> <FONT color=3D#ff0000>=3D =
</FONT></FONT><FONT=20
  color=3D#008080><FONT size=3D2>'<SPAN class=3D868463900-27022004><FONT =
face=3DArial=20
  color=3D#0000ff>&nbsp;whatever&nbsp;</FONT></SPAN>.WORLD'<SPAN=20
  class=3D868463900-27022004><FONT face=3DArial=20
  color=3D#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></P>
  <P><FONT color=3D#008080><FONT size=3D2><SPAN =
class=3D868463900-27022004><FONT=20
  face=3DArial color=3D#0000ff>then don't open</FONT></SPAN></FONT></P>
  <P></FONT><STRONG><FONT color=3D#0000ff></FONT></STRONG>
  <P><FONT color=3D#ff0000 size=3D2></P></FONT><B><FONT color=3D#0000ff =
size=3D2>END=20
  IF</B></FONT><FONT color=3D#ff0000 size=3D2>;
  <P></P></FONT><B><FONT color=3D#0000ff size=3D2>
  <P>END</B></FONT><FONT color=3D#ff0000 size=3D2>;</P>
  <P>/</P></FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C3FCD8.06734E48--
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

