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: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: Sun, 17 Jul 2005 14:27:13 +0100
Message-ID: <W3JxrfExyl2CFwT7@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>
Received on Sun Jul 17 2005 - 08:27:13 CDT

Original text of this message

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