chap9_7.html
来自「Oracle资料大集合」· HTML 代码 · 共 397 行 · 第 1/2 页
HTML
397 行
</tr><tr><td colspan="2"><img src="../../../images/dotclear.gif" width=6 height=12 alt="" border="0"></td></tr><tr><td><img src="../../../images/arrow.gif" width=10 height=17 alt="" border="0"></td><td><a href="http://www.itlibrary.com/reference/dir.groupwareandcollaboration1.html"><font face="verdana,helvetica" size="1" color="000000"><b>Groupware & Collaboration</b></font></td></tr><tr><td colspan="2"><img src="../../../images/dotclear.gif" width=6 height=12 alt="" border="0"></td></tr><tr><td><img src="../../../images/arrow.gif" width=10 height=17 alt="" border="0"></td><td><a href="http://www.itlibrary.com/reference/dir.contentmanagement.html"><font face="verdana,helvetica" size="1" color="000000"><b>Content Management</b></font></td></tr><tr><td colspan="2"><img src="../../../images/dotclear.gif" width=6 height=12 alt="" border="0"></td></tr><tr><td><img src="../../../images/arrow.gif" width=10 height=17 alt="" border="0"></td><td><a href="http://www.itlibrary.com/reference/dir.productivityapplications1.html"><font face="verdana,helvetica" size="1" color="000000"><b>Productivity Applications</b></font></td></tr><tr><td colspan="2"><img src="../../../images/dotclear.gif" width=6 height=12 alt="" border="0"></td></tr><tr><td><img src="../../../images/arrow.gif" width=10 height=17 alt="" border="0"></td><td><a href="http://www.itlibrary.com/reference/dir.hardware1.html"><font face="verdana,helvetica" size="1" color="000000"><b>Hardware</b></font></td></tr><tr><td colspan="2"><img src="../../../images/dotclear.gif" width=6 height=12 alt="" border="0"></td></tr><tr><td><img src="../../../images/arrow.gif" width=10 height=17 alt="" border="0"></td><td><a href="http://www.itlibrary.com/reference/dir.funandgames1.html"><font face="verdana,helvetica" size="1" color="000000"><b>Fun & Games</b></font></td></tr></table><!-- <IMG SRC="/images/leftnav.gif" WIDTH=111 HEIGHT=404 ALT="nav" border="0" ISMAP USEMAP="#leftnav"> --><p><a href="http://www.earthweb.com/jobs/" target=new><IMG SRC="../../../images/dice-105x30.gif" WIDTH=105 HEIGHT=30 ALT="EarthWeb Direct" border="0"></a><a href="http://www.earthwebdirect.com/" target=new><IMG SRC="../../../images/earthwebdirect.gif" WIDTH=105 HEIGHT=30 ALT="EarthWeb Direct" border="0"></a><a href="http://www.fatbrain.com/home.html?from=UUX592" target=new><IMG SRC="../../../images/fatbrain.gif" WIDTH=105 HEIGHT=30 ALT="Fatbrain" border="0"></a><a href="http://auctions.earthweb.com" target=new><IMG SRC="../../../images/auctions_105x30.gif" WIDTH=105 HEIGHT=30 ALT="Auctions" border="0"></a><a href="http://www.supportsource.com" target=new><IMG SRC="../../../images/ss2000sneak2.gif" WIDTH=105 HEIGHT=30 ALT="Support Source Answers" border="0"></a><P><b><font face="verdana,helvetica" size="2">EarthWeb sites</FONT></b><br> <FONT SIZE="1"> <a href="http://www.crossnodes.com"><font face="verdana,helvetica" size="1" color="000000">Crossnodes</font></a><br> <a href="http://www.datamation.com"><font face="verdana,helvetica" size="1" color="000000">Datamation</font></a><br> <a href="http://www.developer.com"><font face="verdana,helvetica" size="1" color="000000">Developer.com</FONT></A><br> <a href="http://www.dice.com"><font face="verdana,helvetica" size="1" color="000000">DICE</font></a><br> <a href="http://www.earthweb.com"><font face="verdana,helvetica" size="1" color="000000">EarthWeb.com</font></a><br> <a href="http://www.earthwebdirect.com"><font face="verdana,helvetica" size="1" color="000000">EarthWeb Direct</font></a><br> <a href="http://www.erphub.com"><font face="verdana,helvetica" size="1" color="000000">ERP Hub</font></a><br> <a href="http://www.gamelan.com"><font face="verdana,helvetica" size="1" color="000000">Gamelan</font></a><br> <a href="http://www.gocertify.com"><font face="verdana,helvetica" size="1" color="000000">GoCertify.com</font></a><br> <a href="http://www.htmlgoodies.com"><font face="verdana,helvetica" size="1" color="000000">HTMLGoodies</font></a><br> <a href="http://www.intranetjournal.com"><font face="verdana,helvetica" size="1" color="000000">Intranet Journal</font></a><br> <a href="http://www.itknowledge.com"><font face="verdana,helvetica" size="1" color="000000">IT Knowledge</font></a><br> <a href="http://www.itlibrary.com"><font face="verdana,helvetica" size="1" color="000000">IT Library</font></a><br> <a href="http://www.javagoodies.com"><font face="verdana,helvetica" size="1" color="000000">JavaGoodies</font></a><br> <a href="http://www.jars.com"><font face="verdana,helvetica" size="1" color="000000">JARS</font></a><br> <a href="http://www.javascripts.com"><font face="verdana,helvetica" size="1" color="000000">JavaScripts.com</font></a><br> <a href="http://www.opensourceit.com"><font face="verdana,helvetica" size="1" color="000000">open source IT</font></a><br> <a href="http://www.roadcoders.com"><font face="verdana,helvetica" size="1" color="000000">RoadCoders</font></a><br> <a href="http://www.Y2Kinfo.com"><font face="verdana,helvetica" size="1" color="000000">Y2K Info</font></a></FONT></td><!--End Left Navigation column --><!-- spacer column --><TD width="40"><img src="../../../images/dotclear.gif" WIDTH="40" HEIGHT="1" border=0></TD><!--Begin Content Column --><TD VALIGN="TOP" width="500"><P><blockquote><font size="+1"><B> 9.7 How do I匔onfigure database files to extend automatically?</B></font><p><B>Problem</B><p>I have sized my database files as carefully as I can, but I am concerned that they will run out of space during a crucial database operation. How can I tell the Oracle8 server to extend data files automatically without any DBA intervention?<p><B>Technique</B><p>Use the AUTOEXTEND option on the create tablespace or alter database commands to enable autoextend capability on data files. Through these statements you can also specify the size of the increment for Oracle8 to use when the server must autoextend a data file. Query the DBA_DATA_FILES data dictionary view to determine or confirm the autoextend status of data files. This view appears in Table 9.5.<p>Table 9.5 The DBA_DATA_FILES data dictionary view<p><table cellpadding=3 cellspacing=3 bgcolor="cdcdcd" border=0><TR><td>Column</td><td>Column Description</td></TR><TR><td>FILE_NAME</td><td>Physical file name</td></TR><TR><td>FILE_ID</td><td>File number in database</td></TR><TR><td>TABLESPACE_NAME</td><td>Tablespace to which the file belongs</td></TR><TR><td>BYTES</td><td>File size in bytes</td></TR><TR><td>BLOCKS</td><td>File size in blocks</td></TR><TR><td>STATUS</td><td>File status: AVAILABLE or INVALID</td></TR><TR><td>RELATIVE_FNO</td><td>File number in tablespace</td></TR><TR><td>AUTOEXTENSIBLE</td><td>File can autoextend (YES or NO)</td></TR><TR><td>MAXBYTES</td><td>Limit on file抯 growth in bytes</td></TR><TR><td>MAXBLOCKS</td><td>Limit on file抯 growth in blocks</td></TR><TR><td>INCREMENT_BY</td><td>Autoextension increment in blocks</td></TR></table><p><B>Steps</B><p>1. Run SQL*Plus and connect as the WAITE user. The script CHP9_13.SQL is operating-system杝pecific because it contains physical file names. Modify it as necessary for your operating system prior to execution. Use the START command to load and execute CHP9_13.SQL. The script and its output appear in Figure 9.17.<p>The first statement creates a new tablespace called AUTO09, which is a single data file. The initial size of the file is 2MB, but it can autoextend as necessary up to 50MB. The second SQL statement modifies an existing data file so that it can autoextend.<p>2. Use the START command to load and execute the CHP9_14.SQL script, which queries the DBA_DATA_FILES data dictionary view and lists all data files with autoextend capability. <A HREF="image/09oht18.gif" TARGET="_blank">Figure 9.18</A> contains the script and its output.<p><B>How It Works</B><p>Step 1 illustrates two methods for enabling autoextend capability for a data file: The first is to create a tablespace consisting of an autoextending file, and the second is to modify an existing data file to autoextend. Step 2 queries the appropriate data dictionary view to confirm the success of Step 1.<p><B>Comments</B><p>The autoextension defaults do not serve every Oracle8 installation. <A HREF="image/09oht18.gif" TARGET="_blank">Figure 9.18</A> shows that the defaults are accepted for the MAXSIZE and NEXT parameters in the USERS tablespace. Oracle8 set the values of these parameters to 8 gigabytes and 1 block, respectively.<p>Remember that it is a waste of time to enable autoextension for a data file residing on a full, or nearly full, device. Autoextension in this case fails because of inadequate space availability at the physical level. In such a situation, the options are to rename the data file using the alter database rename... statement or to add an additional autoextensible data file, residing on a less populated device, to the appropriate tablespace.<p>It is tempting to combine the information in How-To抯 9.5 and 9.7 so that database objects and data files can extend without limit. It would appear that this architecture frees DBAs from space management altogether! A database like this, however, will not run out of space until Oracle8 reaches a hardware limitation (usually, a full disk). When this happens, though, options for resolution are limited to freeing disk space, adding another disk, or reorganizing the database to move some data files to less populated media. These operations take time and will delay the offending database operation until the DBA resolves the space limitation. Paradoxically, the autoextend options can increase the need for space management monitoring, so use them with care.<!-- </td></td></tr></table> --></td></td></tr></table><!-- begin footer information --><MAP NAME="footer"><AREA SHAPE=RECT COORDS="0,0,62,26" HREF="http://www.itlibrary.com/"><AREA SHAPE=RECT COORDS="62,0,135,26" HREF="http://www.developer.com/about/"><AREA SHAPE=RECT COORDS="135,0,199,26" HREF="http://www.itlibrary.com/search/"><AREA SHAPE=RECT COORDS="200,0,274,26" HREF="http://www.itlibrary.com/subscribe/"><AREA SHAPE=RECT COORDS="275,0,335,25" HREF="http://www.developer.com/contact/adinfo.html"><AREA SHAPE=RECT COORDS="335,0,417,25" HREF="http://www.developer.com/contact/"><AREA SHAPE=RECT COORDS="418,0,467,26" HREF="http://www.developer.com/about/faq.html"></MAP><P><table width="640" cellpadding="0" cellspacing="0" border="0"><tr><TD WIDTH="130"></TD><td width="468"><IMG SRC="../../../images/footer/footerfile.gif" ALT="footer nav" width="467" height="26" BORDER="0" usemap="#footer" ismap></td></tr><tr><TD WIDTH="130"></TD><td width="468"> <font face=arial,helvetica size="1"> Use of this site is subject certain <a href="http://www.developer.com/legal/">Terms & Conditions.</a><br>Copyright (c) 1996-1999 <A HREF="http://www.earthweb.com/">EarthWeb, Inc.</A>. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited.<a href="http://www.earthweb.com/corporate/privacy.html">Please read our privacy policy for details.</a></td></tr></table></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?