From oracle-l-bounce@freelists.org  Wed Feb  2 08:33:07 2005
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air891.startdedicated.com (root@localhost)
 by orafaq.com (8.12.10/8.12.10) with ESMTP id j12EX7og025819
 for <oracle-l@orafaq.com>; Wed, 2 Feb 2005 08:33:07 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j12EX5em025812
 for <oracle-l@orafaq.com>; Wed, 2 Feb 2005 08:33:05 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 138026C5EF;
 Wed,  2 Feb 2005 08:32:10 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 07595-02; Wed, 2 Feb 2005 08:32:10 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8E2C26C5DA;
 Wed,  2 Feb 2005 08:32:09 -0500 (EST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
        b=bkTU/Ddae0kEEGDQlHJimj6UvDDPJKrEFP/YyBFONaipzbfq/0gnqlcWUzt39GZMiqKEirPPFb4QeoN+9LOE/HuZ2u+4zIIgzcywPTQcCcFkITJgcT/PIaG59KmjV+qX3HWFzwiV1GCMCm2+7Vc2rcbCKV+AkLG8wvq/oiiZikU=
Message-ID: <cd4305c1050202053067328cf0@mail.gmail.com>
Date: Wed, 2 Feb 2005 09:30:29 -0400
From: Juan Carlos Reyes Pacheco <juancarlosreyesp@gmail.com>
To: rjamya <rjamya@gmail.com>
Subject: Re: how to monitor the progress of inserts
Cc: Oracle Discussion List <oracle-l@freelists.org>
In-Reply-To: <9177895d050202042720bfadb8@mail.gmail.com>
Mime-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
References: <D42C14B2E3F2B74DB41D5B6B2E2B992F01931FEF@pegasus.lawaudit.com>
	 <41FFFA47.50407@centrexcc.com> <1107298218l.9692l.0l@medo.noip.com>
	 <cd4305c1050201150354e0d1fc@mail.gmail.com>
	 <9177895d050202042720bfadb8@mail.gmail.com>
X-archive-position: 15660
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: juancarlosreyesp@gmail.com
Precedence: normal
Reply-To: juancarlosreyesp@gmail.com
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on 
 air891.startdedicated.com
X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=ham version=2.60
X-Spam-Level: 

Hi,
The point rjamya is you don't specified what you want exactly, but
what I understand
 is someone is doing a SPECIFIC process, and you want to know how much
inserts that SPECIFIC PROCESS had done before he commit, FROM ANOTHER
SESSION.

In that case you can call an autonomous transaction instead of the
dbms_outoup in that session, this is

CREATE OR REPLACE PROCEDURE SAVE_CONTROL_OF_INSERTS
  ( nNumber )
  IS 
 PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
 UPDATE TABLE TEST SET INSERTS=INSERTS+nNumber ;
COMMIT;
END;
/

Then you could see the inserts he had done doing a query to
test.inserts, before he commits.
Is that what you want?





On Wed, 2 Feb 2005 07:27:35 -0500, rjamya <rjamya@gmail.com> wrote:
> ... EXCEPT that when you use dbms_output,  it is visible to you ONLY
> AFTER the whole process is finished. Which doesn't help the OP at all.
> 
> Raj
> 
> 
> On Tue, 1 Feb 2005 19:03:31 -0400, Juan Carlos Reyes Pacheco
> <juancarlosreyesp@gmail.com> wrote:
> > I think this solves the problem if the code can be modified, without
> > harming performance.
> >
> > SQL> CREATE or replace PACKAGE TEST
> >   2    IS
> >   3   nCount NUMBER :=0;
> >   4  END;
> >   5  /
> >
> > SQL> create table test2 as select * from dba_objects where 1=0;
> > SQL> select count(*) from dba_objects;
> >
> >  COUNT(*)
> > ---------
> >     29541
> >
> > SQL> begin
> >   2  INSERT INTO test2 select * from dba_objects ;
> >   3  test.ncount := test.ncount + sql%rowcount;
> >   4  dbms_output.put_line('total inserted:'||test.nCount);
> >   5  rollback;
> >   6  end;
> >   7  /
> > total inserted:29541
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> 
> --
> ------------------------------
> select standard_disclaimer from company_requirements where category =
> 'MANDATORY';
> 


-- 
Oracle 9i,10g Certified Professional (Experience on Orace 7,8i)
Developer 6i Certified Professional

8 years of experience in Administration, developing and design
--
http://www.freelists.org/webpage/oracle-l

