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

Home -> Community -> Usenet -> c.d.o.server -> Re: selecting from an Object View starts a transaction???

Re: selecting from an Object View starts a transaction???

From: Carlo Sirna <carlo.sirna_at_digisoft.it>
Date: Tue, 1 Apr 2003 10:53:33 +0200
Message-ID: <b6bk2e$3iotg$1@ID-135096.news.dfncis.de>


There really isn't for what I can see a good reason to start a transaction. The view does simply rename the columns of a table... and does not contain any ref column:

these are the definitions of the table, of the type and of the view involved:

create table BANCHE
(

    BAN_COD VARCHAR2(11) not null,
    BAN_DESC VARCHAR2(64),
    BAN_SPOR VARCHAR2(50),
    BAN_ABI VARCHAR2(5),
    BAN_CAB VARCHAR2(5)

)
/
CREATE OR REPLACE TYPE TBanca AS
OBJECT (
    CodiceABI VARCHAR2(5),
    CodiceCAB VARCHAR2(5),
    Codice VARCHAR2(11),
    Descrizione VARCHAR2(64),
    Sportello VARCHAR2(50),
    STATIC FUNCTION InitNew RETURN TBanca,    MEMBER PROCEDURE InsertNew (self in TBanca) )
/

CREATE OR REPLACE force VIEW V_BANCA

   OF TBanca
   WITH OBJECT OID (Codice)
AS

   SELECT

       BAN_ABI,
       BAN_CAB,
       BAN_COD,
       BAN_DESC,
       BAN_SPOR

FROM BANCHE
/

CREATE OR REPLACE TYPE BODY TBanca AS
STATIC FUNCTION InitNew RETURN TBanca is begin

      return TBanca(NULL,NULL,NULL,NULL,NULL); end;

member procedure InsertNew (self in TBanca) is begin

     insert into v_Banca
(CodiceABI,CodiceCAB,Codice,Descrizione,Sportello)

     values (CodiceABI,CodiceCAB,Codice,Descrizione,Sportello); end;

END;
/

Any Ideas,
  thanks

Carlo Sirna
  Digisoft s.r.l.

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> ha scritto nel messaggio news:b69srh$7qp$1$830fa79f_at_news.demon.co.uk...
>
> This type of behaviour is not reproducing
> on my version of Oracle (alas, I don't have
> an 8.1.6). Is there something about the
> object view which might be causing a real
> transaction to start ?
>
> What does the definition of the object view
> look like ?
>
>
> --
> Regards
>
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
> The educated person is not the person
> who can answer the questions, but the
> person who can question the answers -- T. Schick Jr
>
>
> One-day tutorials:
> http://www.jlcomp.demon.co.uk/tutorial.html
>
> ____UK_______April 8th
> ____UK_______April 22nd
> ____Denmark__May 21-23rd
> ____USA_(FL)_May 2nd
>
> Three-day seminar:
> see http://www.jlcomp.demon.co.uk/seminar.html
> ____UK_(Manchester)_May
> ____Estonia___June (provisional)
> ____USA_(CA, TX)_August
>
> The Co-operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
>
> "Carlo Sirna" <carlo.sirna_at_digisoft.it> wrote in message
> news:b69nbt$1uus3$1_at_ID-135096.news.dfncis.de...
> > Hi!
> >
> > I have an object view called v_banca.
> >
> > I have noticed that every time I access this object view oracle
> > (8.1.6) does start a transaction.
> >
> > take a look at this example:
> >
> > SQL> select sys.dbms_transaction.local_transaction_id from dual;
> > LOCAL_TRANSACTION_ID
> > --------------------
> >
> > (there is no active transaction id, but if I try to access this
> object
> > view...)
> >
> > SQL> select count(*) from v_banca;
> > COUNT(*)
> > ----------
> > 3
> >
> > SQL> select sys.dbms_transaction.local_transaction_id from dual;
> > LOCAL_TRANSACTION_ID
> > --------------------
> > 16.1.7453
> >
> > A new transaction has started... I understand that there could be
a
> > good reason for this... but I can't really focus it...
> > Does anybody have an explaination for this?
> >
> > Thanks,
> > Carlo Sirna
> >
> >
>
>
Received on Tue Apr 01 2003 - 02:53:33 CST

Original text of this message

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