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: Insert into remote database give wrong sql%rowcount

Re: Insert into remote database give wrong sql%rowcount

From: Bell <ohnoyoudont_at_servernotfound.com>
Date: Fri, 06 Apr 2001 13:01:00 GMT
Message-ID: <g6jz6.606677$JT5.16667770@news20.bellglobal.com>

What does a tkprof report give for the number of rows processed?

Would there be any reason to believe that Oracle has submitted the inserts as series of batch/bulk inserts and the rowcount was just the last piece of the insert.

I was speaking with Oracle a week or so ago and it seems they have many problems with the way DB links have been implemented in all 8.1.5 and 8.1.6 versions. (eg. don't try to use bind variables across a DB link) If possible you might want to try 8.1.7 as according to Oracle the DB link problems I was having was resolved only in this release.

Scott W.

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:986499535.7301.0.nnrp-08.9e984b29_at_news.demon.co.uk...
>
> Has anyone come across this before.
> Oracle 8.1.6.0 on NT 4 sp5
>
> {select statement} is:
> select /*+ rowid (ss) */
> lg.*
> from
> session_table ss,
> log_table lg
> where
> ss.rowid between r1 and r2
> and lg.s_id = ss.id
>
> The statement conforms to the requirements
> of deleting from a join view - where log_table is
> the child table, and session_table is the parent,
> with a primary key of id.
>
> The problem - extracted from the PL/SQL wrapper
> that it runs under:
>
> select count(*) from (select statement)
> Count = 15,297
>
> insert into log_backup_at_backup_db
> select * from (select statement)
> sql%rowcount = 35 --- oh dear !!
>
> delete from (select statement)
> sql%rowcount = 15,297
>
> select count(*) from log_backup_at_backup_db
> count = 15,297
>
> Nothing relevant seems to show up on metalink.
>
>
> --
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Practical Oracle 8i: Building Efficient Databases
> Publishers: Addison-Wesley
>
> Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>
>
>
>
>
Received on Fri Apr 06 2001 - 08:01:00 CDT

Original text of this message

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