xugy2002 发表于 2011-12-23 01:07

PL/SQL Developer报错Dynamic Performance Tables not accessible

<DIV>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">开发的一位同事反映在用一个新建的用户</SPAN><SPAN lang=EN-US><FONT face=Calibri>user1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">登录到</SPAN><SPAN lang=EN-US><FONT face=Calibri>PL/SQL Developer</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">时报下面的错误:</SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"></SPAN><SPAN lang=EN-US><a href="http://blog.chinaunix.nethttp://blog.chinaunix.net/attachment/201110/12/441818_1318403336E4Fl.gif" target="_blank"><IMG border=0 src="http://blog.chinaunix.nethttp://blog.chinaunix.net/attachment/201110/12/441818_1318403336E4Fl.gif" .load="imgResize(this, 650);" ;></A></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><SPAN style="mso-no-proof: yes" lang=EN-US></SPAN><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">查了一下,解决这个问题有以下两个方法:</SPAN><SPAN lang=EN-US></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN lang=EN-US><FONT face=Calibri>1.</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">在</SPAN><SPAN lang=EN-US><FONT face=Calibri>PL/SQL Developer</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</SPAN><SPAN lang=EN-US><FONT face=Calibri>Tools-&gt;Preferences</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">中禁用此功能:</SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"></SPAN><SPAN lang=EN-US><a href="http://blog.chinaunix.nethttp://blog.chinaunix.net/attachment/201110/12/441818_1318403358z4MM.gif" target="_blank"><IMG border=0 src="http://blog.chinaunix.nethttp://blog.chinaunix.net/attachment/201110/12/441818_1318403358z4MM.gif" .load="imgResize(this, 650);" ;></A></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt 18pt; mso-add-space: auto" class=MsoListParagraph><SPAN style="mso-no-proof: yes" lang=EN-US></SPAN><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN lang=EN-US><FONT face=Calibri>2.</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">从上面的信息中可以发现,错误的原因是用户无法访问动态性能表,只要赋予相应的权限就可以解决问题:</SPAN><SPAN lang=EN-US></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">(</SPAN><SPAN lang=EN-US><FONT face=Calibri>1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">)给用户</SPAN><SPAN lang=EN-US><FONT face=Calibri>user1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">访问上面三个动态性能视图的权限:(注意视图是</SPAN><SPAN lang=EN-US><FONT face=Calibri>v_$session</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">,这才是具体的视图)</SPAN><SPAN lang=EN-US></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt" class=MsoListParagraphCxSpFirst><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$session to user1;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt" class=MsoListParagraphCxSpMiddle><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$sesstat to user1;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt 36pt" class=MsoListParagraphCxSpLast><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$statname to user1;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">(</SPAN><SPAN lang=EN-US><FONT face=Calibri>2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">)给所有用户访问上面三个动态性能视图的权限:</SPAN><SPAN lang=EN-US></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt" class=MsoListParagraphCxSpFirst><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$session to public;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt" class=MsoListParagraphCxSpMiddle><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$sesstat to public;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt 36pt" class=MsoListParagraphCxSpLast><SPAN lang=EN-US><FONT face=Calibri><FONT size=3>SQL&gt;grant select on v_$statname public;</FONT></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">(</SPAN><SPAN lang=EN-US><FONT face=Calibri>3</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">)给用户</SPAN><SPAN lang=EN-US><FONT face=Calibri>user1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">分配</SPAN><SPAN lang=EN-US><FONT face=Calibri>SELECT ANY DICTIONARY</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的权限(不推荐)</SPAN><SPAN lang=EN-US><FONT face=Calibri>:</FONT></SPAN></FONT></P>
<P style="MARGIN: 0cm 0cm 10pt 36pt" class=MsoListParagraph><SPAN lang=EN-US><FONT size=3><FONT face=Calibri>SQL&gt;grant SELECT ANY DICTIONARY to user1;</FONT></FONT></SPAN></P></DIV>
页: [1]
查看完整版本: PL/SQL Developer报错Dynamic Performance Tables not accessible