Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Need help with simple Oracle-SQL-script (Trigger and User)

Re: Need help with simple Oracle-SQL-script (Trigger and User)

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Fri, 18 Oct 2002 09:49:07 +0100
Message-ID: <3dafcb03$0$1289$ed9e5944@reading.news.pipex.net>


"Volker Schmid" <Info_NoSpam_at_Inspirant.de> wrote in message news:aooher$jqv$1_at_news.online.de...
> Hello,

Hi
<snip>
> And this:
>
> CREATE TRIGGER TYPES_TRIGID
> BEFORE INSERT ON DMS.Types
> FOR EACH ROW
> BEGIN
> NEW.ID = TYPES_SEQ.NEXTVAL
> END
alter this to use a select from the sequence.

CREATE TRIGGER TYPES_TRIGID
BEFORE INSERT ON DMS.Types
FOR EACH ROW
BEGIN
SELECT TYPES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; END
>
>
> When I try to insert a new row into types then i get an error ORA-04098:
> Trigger DMS.TYPES_TRIGID ist ungültig oder konnte nicht bestätigt werden.
> (Sorry, in german).
>
> What is wrong? And how is the statement to set one scheme as default for
one
> user? I don't want to use DMS. in front of every statement. Wehn im logged
> in with a special user I think that everything shoul affect a specified
> scheme and tablespace.

In Oracle you can think of a user being equivalent to a schema, thus the only schema objects you don't need to qualify are your own. You can however create public synonyms for objects to avoid having to qualify object names if you want..

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Fri Oct 18 2002 - 03:49:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US