From oracle-l-bounce@freelists.org  Thu Jul  7 14:54:09 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 j67Js91B015445
 for <oracle-l@orafaq.com>; Thu, 7 Jul 2005 14:54:09 -0500
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 j67JrpIP015397
 for <oracle-l@orafaq.com>; Thu, 7 Jul 2005 14:53:55 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4592D1CA630;
 Thu,  7 Jul 2005 14:53:42 -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 19095-03; Thu, 7 Jul 2005 14:53:42 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A76201CAC81;
 Thu,  7 Jul 2005 14:53:41 -0500 (EST)
Message-ID: <20050707195146.32299.qmail@webmail09.mesa1.secureserver.net>
Date: Thu,  7 Jul 2005 12:51:46 -0700
From: shirish@microexcel.com
Subject: RE: compile dba_data_files
To: jkstill@gmail.com
Cc: premjhere@gmail.com, oracle-l <oracle-l@freelists.org>
MIME-Version: 1.0
Content-Type: TEXT/html; CHARSET=US-ASCII
X-archive-position: 22210
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: shirish@microexcel.com
Precedence: normal
Reply-To: shirish@microexcel.com
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-mailscan-MailScanner-Information: Please contact the ISP for more information
X-mailscan-MailScanner: Found to be clean
X-MailScanner-From: oracle-l-bounce@freelists.org
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on 
 air891.startdedicated.com
X-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,
 HTML_MIME_NO_HTML_TAG,MIME_HTML_ONLY,NORMAL_HTTP_TO_IP,NO_REAL_NAME 
 autolearn=no version=2.63

<div>I just took a 10046 for </div>
<div>&nbsp;</div>
<div>alter view dba_data_files compile</div>
<div>&nbsp;</div>
<div>The sql executed in this case are</div>
<div>&nbsp;</div>
<div>select obj# from obj$ o,user$ u&nbsp;&nbsp; where o.name=:1 and
o.owner#=u.user# and u.name=:2 and o.type#=4/*VIEW*/&nbsp;&nbsp; and
LINKNAME is NULL</div>
<div>select property,v.textlength,&nbsp;&nbsp;
decode(bitand(property,1),0,0,t.oidtextlength),&nbsp;&nbsp;
decode(bitand(property,1),0,0,t.typetextlength),&nbsp;&nbsp;
decode(bitand(property,134217728),0,0,t.undertextlength)&nbsp;&nbsp;
from view$ v, typed_view$ t where v.obj#=:1 and v.obj#=t.obj#(+)</div>
<div>select lengthb(name) from col$ where obj#=:1</div>
<div>select name,lengthb(name) from col$ where obj#=:1 order by
intcol#</div>
<div>select text from view$ where obj#=:1</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>so it does reference obj$ while doing a recompile</div>
<div>&nbsp;</div>
<div>In Prem's case obj$ has a issue so he should FIRST CHECK
dba_objects</div>
<div>&nbsp;</div>
<div>Inbetween ,&nbsp;in my view, only analyze of data dict is supported
from 9i onwards&nbsp;but further i have seen no documents
which&nbsp;say OR does not say a way&nbsp;in which dict views can be
recompiled.</div>
<div>&nbsp;</div>
<div>obviously, running catalog/catproc or utlrp&nbsp;( if it shows as
invalid) is the&nbsp;more obvious way.</div>
<div>&nbsp;</div>
<div>Coming to Prem's case</div>
<div>&nbsp;</div>
<div>he should check the dba_objects to start with the analysis</div>
<div>as in case his obj$ has some issues , he should definitely get
alerted </div>
<div>--</div>
<div>Shirish</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><BR><BR>&nbsp;</div>
<BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT:
blue 2px solid"><BR>-------- Original Message --------<BR>Subject: Re:
compile dba_data_files<BR>From: Jared Still
&lt;jkstill@gmail.com&gt;<BR>Date: Thu, July 07, 2005 2:02 pm<BR>To:
shirish@microexcel.com<BR>Cc: premjhere@gmail.com, oracle-l
&lt;oracle-l@freelists.org&gt;<BR><BR>Perhaps I am missing something
obvious here, but what do stats<BR>on dictionary objects have to do
with recompiling DBA_DATA_FILES?<BR><BR>Also, the error that Prem is
seeing is rather strange, as the view DBA_DATA_FILES<BR>does not
include any reference to obj$, or any other views that do.<BR><BR>FROM
clauses for
dba_data_files:<BR><BR>8i:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from
sys.file$ f, sys.ts$ ts, sys.v$dbfile
v<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from sys.v$dbfile v, sys.file$ f,
sys.x$ktfbhc hc, sys.ts$
ts<BR><BR>10gR1:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from sys.file$ f,
sys.ts$ ts, sys.v$dbfile v<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from
sys.v$dbfile v, sys.file$ f, sys.x$ktfbhc hc, sys.ts$
ts<BR><BR><BR>Jared<BR><BR>
<DIV><SPAN class=gmail_quote>On 7/7/05, <B class=gmail_sendername><A
href="mailto:shirish@microexcel.com">shirish@microexcel.com</A></B>
&lt;<A
href="mailto:shirish@microexcel.com">shirish@microexcel.com</A>&gt;
wrote: </SPAN>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt
0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>Oracle does supports collecting stats on dict objects</DIV>
<DIV>&nbsp;</DIV>
<DIV>but in your case it looks like that you have some issues with
obj$</DIV>
<DIV>&nbsp;</DIV>
<DIV>does you dba_objects works fine ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>better is to do</DIV>
<DIV>&nbsp;</DIV>
<DIV>1)analyze the obj$</DIV>
<DIV>2) if it fails then take a 10046 or </DIV>
<DIV>3)set a errorstack for 4043 </DIV>
<DIV>&nbsp;</DIV>
<DIV>in case obj$ is corrupted then it you need to patch the dict or
restore recover from a good known backup&nbsp;.....</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards</DIV>
<DIV>Shirish</DIV>
<DIV><SPAN class=q id=q_104f25a4383cb96d_1>
<DIV><BR><BR>&nbsp;</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT:
blue 2px solid"><BR>-------- Original Message --------<BR>Subject:
compile dba_data_files<BR>From: Prem &lt;<A onclick="return
top.js.OpenExtLink(window,event,this)"
href="mailto:premjhere@gmail.com"
target=_blank>premjhere@gmail.com</A>&gt;<BR>Date: Thu, July 07, 2005
7:38 am<BR>To: oracle-l &lt;<A onclick="return
top.js.OpenExtLink(window,event,this)"
href="mailto:oracle-l@freelists.org"
target=_blank>oracle-l@freelists.org</A>&gt;<BR><BR>Hi all
,<BR><BR>it's on <A onclick="return
top.js.OpenExtLink(window,event,this)" href="http://9.2.0.6/"
target=_blank>9.2.0.6</A>. <BR><BR>SQL &gt; desc
dba_data_files<BR>ERROR:<BR>ORA-04043: object dba_data_files does not
exist<BR><BR>so one of my friend did a <BR><BR>SQL&gt; alter view
dba_data_files compile ;<BR><BR>though it erred out saying "unique key
violation in OBJ$" , the next time <BR><BR>SQL &gt; desc
dba_data_files<BR><BR>worked .<BR><BR>my question is , can we compile
data dictionary views like this ?<BR>OR it is to be avoided strictly ?
does oracle support this ?<BR><BR>Please
advice.<BR><BR>TIA.<BR>Prem<BR>--<BR><A onclick="return
top.js.OpenExtLink(window,event,this)"
href="http://www.freelists.org/webpage/oracle-l"
target=_blank>http://www.freelists.org/webpage/oracle-l</A>
</BLOCKQUOTE></SPAN></DIV>-- <A onclick="return
top.js.OpenExtLink(window,event,this)"
href="http://www.freelists.org/webpage/oracle-l"
target=_blank>http://www.freelists.org/webpage/oracle-l</A>
</BLOCKQUOTE></DIV><BR><BR><BR>-- <BR>Jared Still<BR>Certifiable Oracle
DBA and Part Time Perl Evangelist<BR><BR></BLOCKQUOTE>

--
http://www.freelists.org/webpage/oracle-l

