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: Can a Table be Invalidated?

Re: Can a Table be Invalidated?

From: Andreas Sheriff <spamcontrol_at_iion.com>
Date: Mon, 18 Jul 2005 16:17:47 -0700
Message-ID: <wMWCe.37034$8o.28128@fed1read03>


"Jim Smith" <jim_at_jimsmith.demon.co.uk> wrote in message news:W3JxrfExyl2CFwT7_at_jimsmith.demon.co.uk...

> In message <dbaq1j$b10$05$1_at_news.t-online.com>, Maxim Demenko 
> <mdemenko_at_gmail.com> writes

>>DA Morgan wrote:
>>> Jim Smith wrote:
>>>
>>>> Would a table which contained an object type whose code wouldn't
>>>> compile be classed as invalid?
>>> Why are you asking us to tell you the answer to something you could
>>> determine yourself in 15-20 seconds?
>>
>>Well, i was a little bit confused about the documentation
>>
>>http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c19d
>>epnd.htm#CNCPT119
>>
>><quote>
>>To manage dependencies among schema objects, all of the schema objects in
>>a database have a status.
>>
>> * Valid schema objects have been compiled and can be immediately used
>> when referenced.
>> * Invalid schema objects must be compiled before they can be used.
>> o For procedures, functions, and packages, this means compiling
>> the schema object.
>> o For views, this means that the view must be reparsed, using
>> the current definition in the data dictionary.
>>
>> Only dependent objects can be invalid. Tables, sequences, and
>> synonyms are always valid.
>></quote>
>>
>>so, i decided to invest that 15 sec ;-) with the result:
>>
>>SQL> create type test_type as object
>> 2 (test_att char(20));
>> 3 /
>>
>>Typ wurde erstellt.
>>
>>SQL> create table test_tab of test_type;
>>
>>Tabelle wurde angelegt.
>>
>>alter type test_type add attribute(test_att2 char(10)) invalidate
>

>>SQL> ;
>>
>>Typ wurde geändert.
>>
>>SQL> select object_name,object_type,status from obj where status =
>>'INVALID';
>>
>>OBJECT_NAME OBJECT_TYPE STATUS
>>--------------- --------------- ----------
>>TEST_TAB TABLE INVALID
>>
>>SQL> alter table test_tab upgrade;
>>
>>Tabelle wurde geändert.
>>
>>SQL> select count(*),status from obj group by status;
>>
>> COUNT(*) STATUS
>>---------- ----------
>> 1700 VALID
>>
>>SQL>
>>
>
> This is a simpler scenario than I had envisaged, but you seemed to have 
> proved the point.
>
> I've tried this out and you might never notice the table is invalid 
> because it seems to be revalidated on use.
> Thanks.
> -- 
> Jim Smith
> Because of their persistent net abuse, I ignore mail from
> these domains (among others) .yahoo.com .hotmail.com .kr .cn .tw
> For an explanation see <http://www.jimsmith.demon.co.uk/spam>

Wow!

A table *can* be invalidated after-all.

Interesting...

-- 
Andreas
Oracle 9i Certified Professional
Oracle 10g Certified Professional
Oracle 9i Certified PL/SQL Developer


"If you don't eat your meat, you cannot have any pudding.
"How can you have any pudding if you don't eat your meat?!?!"
---

WARNING:
DO NOT REPLY TO THIS EMAIL
Reply to me only on this newsgroup 
Received on Mon Jul 18 2005 - 18:17:47 CDT

Original text of this message

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