Re: invalid views
Date: Thu, 25 Nov 2010 07:43:55 +0800
Message-ID: <AANLkTimqx1ZCJGZs8V4k9f5=xB8guQhT-O6ckkdcskMg_at_mail.gmail.com>
"older jdbc thin drivers will not perform the automagic compile" ? I thought that compilation was always done by the server process ; the client can only submit parse calls for a SQL statement ?
Hemant K Chitale
http://hemantoracledba.blogspot.com
sent from my smartphone
On Nov 25, 2010 3:55 AM, "Tim Gorman" <tim_at_evdbt.com> wrote:
Invalidated views don't affect the execution plan, because parsing stops at the invalidated object. If you are using one of the Oracle OCI drivers, then your session will automagically attempt to recompile the invalidated object transparently, then proceed with the parse operation. Some of the older, less-capable JDBC "thin" drivers will not perform the automagic recompile and will just return an error message.
Here is a simple test to run in SQL*Plus to illustrate...
create table xxxt (n1 number);
insert into xxxt values (1);
insert into xxxt values (2);
commit;
create view xxxv as select * from xxxt;
select * from xxxt;
select * from xxxv;
alter table xxxt add (n2 number);
select status from user_objects where object_name = 'XXXV';
select * from xxxv;
select status from user_objects where object_name = 'XXXV';
Hope this helps...
Tim Gorman
consultant -> Evergreen Database Technologies, Inc. postal => 13087 West Cedar Drive #225, Lakewood CO 80228 website => http://www.EvDBT.com/ email => Tim_at_EvDBT.com mobile => +1-303-885-4526 fax => +1-303-484-3608 Lost Data? => http://www.ora600.be/ for info about DUDE...
On 11/24/2010 12:42 PM, Zelli, Brian wrote:
>
> So for some reason, one of our applications invali...
-- http://www.freelists.org/webpage/oracle-l
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Nov 24 2010 - 17:43:55 CST