Edit D:\rfid\database\database\doc\win.112\e10845\ap_raw.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta name="robots" content="all" scheme="http://www.robotstxt.org/" /> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 5.1" /> <meta name="Date" content="2010-03-05T15:45:39Z" /> <meta name="doctitle" content="Oracle® Database Platform Guide 11g Release 2 (11.2) for Microsoft Windows" /> <meta name="partno" content="E10845-01" /> <meta name="docid" content="NTQRF" /> <link rel="Start" href="../../index.htm" title="Home" type="text/html" /> <link rel="Copyright" href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="Stylesheet" href="../../dcommon/css/blafdoc.css" title="Default" type="text/css" /> <script type="text/javascript" src="../../dcommon/js/doccd.js"> </script> <link rel="Contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="Index" href="index.htm" title="Index" type="text/html" /> <link rel="Glossary" href="glossary.htm" title="Glossary" type="text/html" /> <link rel="Prev" href="ap_doc.htm" title="Previous" type="text/html" /> <link rel="Next" href="ap_net.htm" title="Next" type="text/html" /> <link rel="alternate" href="../e10845.pdf" title="PDF version" type="application/pdf" /> <title>Storing Tablespaces on Raw Partitions</title> </head> <body> <div class="header"> <div class="zz-skip-header"><a name="top" id="top" href="#BEGIN">Skip Headers</a></div> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" valign="top"><b>Oracle® Database Platform Guide<br /> 11<i>g</i> Release 2 (11.2) for Microsoft Windows</b><br /> Part Number E10845-01</td> <td valign="bottom" align="right"> <table class="icons oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="245"> <tr> <td align="center" valign="top"><a href="../../index.htm"><img width="24" height="24" src="../../dcommon/gifs/doclib.gif" alt="Go to Documentation Home" /><br /> <span class="icon">Home</span></a></td> <td align="center" valign="top"><a href="../../nav/portal_booklist.htm"><img width="24" height="24" src="../../dcommon/gifs/booklist.gif" alt="Go to Book List" /><br /> <span class="icon">Book List</span></a></td> <td align="center" valign="top"><a href="toc.htm"><img width="24" height="24" src="../../dcommon/gifs/toc.gif" alt="Go to Table of Contents" /><br /> <span class="icon">Contents</span></a></td> <td align="center" valign="top"><a href="index.htm"><img width="24" height="24" src="../../dcommon/gifs/index.gif" alt="Go to Index" /><br /> <span class="icon">Index</span></a></td> <td align="center" valign="top"><a href="../../dcommon/html/feedback.htm"><img width="24" height="24" src="../../dcommon/gifs/feedbck2.gif" alt="Go to Feedback page" /><br /> <span class="icon">Contact Us</span></a></td> </tr> </table> </td> </tr> </table> <hr /> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="left" valign="top"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="98"> <tr> <td align="center" valign="top"><a href="ap_doc.htm"><img width="24" height="24" src="../../dcommon/gifs/leftnav.gif" alt="Go to previous page" /><br /> <span class="icon">Previous</span></a></td> <td align="center" valign="top"><a href="ap_net.htm"><img width="24" height="24" src="../../dcommon/gifs/rightnav.gif" alt="Go to next page" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </td> <td align="right" valign="top" style="font-size: 90%"><a href="../e10845.pdf">View PDF</a></td> </tr> </table> <a name="BEGIN" id="BEGIN"></a></div> <div class="IND"><!-- End Header --><a id="g637025" name="g637025"></a><a id="NTQRF210" name="NTQRF210"></a><a id="i633623" name="i633623"></a> <h1 class="appendix"><span class="secnum">B</span> Storing Tablespaces on Raw Partitions</h1> <p>This appendix describes how to configure your system to store datafiles for a <a href="glossary.htm#i432555"><span class="xrefglossterm">tablespace</span></a> on <a href="glossary.htm#i432460"><span class="xrefglossterm">raw partitions</span></a>.</p> <p>This appendix contains these topics:</p> <ul> <li> <p><a href="#i634225">Raw Partition Overview</a></p> </li> <li> <p><a href="#CHDEIDEB">Creating a Raw Partition and a Mount Point</a></p> </li> <li> <p><a href="#i634853">Creating a Tablespace in a Raw Partition</a></p> </li> <li> <p><a href="#BCFEBCAA">Configuring Disks for Automatic Storage Management</a></p> </li> </ul> <div class="infoboxnote"> <p class="notep1">Note:</p> Oracle RAC requires additional configuration tools. See <a class="olink RACAD7256" href="http://www.oracle.com/pls/db112/lookup?id=RACAD7256"><span class="italic">Oracle Real Application Clusters Administration and Deployment Guide</span></a> for information on creating logical partitions and assigning symbolic links. Do not use this appendix to create partitions for Oracle RAC.</div> <a id="i634225" name="i634225"></a><a id="NTQRF500" name="NTQRF500"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref765" name="sthref765"></a><a id="sthref766" name="sthref766"></a><a id="sthref767" name="sthref767"></a><a id="sthref768" name="sthref768"></a><a id="sthref769" name="sthref769"></a>Raw Partition Overview</h2> <p>Datafiles for tablespaces can be stored on a file system or on raw partitions. A raw partition is a portion of a physical disk that is accessed at the lowest possible level. Input/output (I/O) to a raw partition offers approximately a 5% to 10% performance improvement over I/O to a partition with a file system on it.</p> <a id="i634261" name="i634261"></a><a id="NTQRF501" name="NTQRF501"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2"><a id="sthref770" name="sthref770"></a><a id="sthref771" name="sthref771"></a><a id="sthref772" name="sthref772"></a>Physical Disk</h3> <p>A physical disk represents the entire disk and points to the following:</p> <pre xml:space="preserve" class="oac_no_warn">\Device\Harddisk<span class="italic">x</span>\Partition0 </pre> <p>Symbolic link name <code>\\.\PhysicalDrive</code><code><span class="codeinlineitalic">x</span></code> is automatically defined by Windows for every hard disk in the computer. For example, a computer with three hard disks will have the following symbolic links:</p> <pre xml:space="preserve" class="oac_no_warn">\\.\PhysicalDrive0 \\.\PhysicalDrive1 \\.\PhysicalDrive2 </pre> <p>Internally, these names expand to the following:</p> <pre xml:space="preserve" class="oac_no_warn">\\.\PhysicalDrive0 =\Device\Harddisk0\Partition0 \\.\PhysicalDrive1 =\Device\Harddisk1\Partition0 \\.\PhysicalDrive2 =\Device\Harddisk2\Partition0 </pre> <p><code>Partition0</code> is special, because it represents the entire physical disk regardless of any partitioning scheme on that disk. Windows writes a signature on the first block of all disks it recognizes. To avoid overwriting that block, Oracle Database skips the first block of a physical raw partition that is used for an Oracle Database datafile.</p> <div class="infoboxnote"> <p class="notep1">Note:</p> Although you can use physical disks, Oracle recommends that you use logical partitions.</div> </div> <!-- class="sect2" --> <a id="i634281" name="i634281"></a><a id="NTQRF502" name="NTQRF502"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2"><a id="sthref773" name="sthref773"></a><a id="sthref774" name="sthref774"></a>Logical Partition</h3> <p>Logical partitions point to drives other than <code>\Device\Harddisk</code><code><span class="codeinlineitalic">x</span></code><code>\Partition0</code>. They are initially assigned names with drive letters (<code>\\.\</code><code><span class="codeinlineitalic">drive_letter</span></code>:) and typically re-assigned symbolic link names (<code>\\.\</code><code><span class="codeinlineitalic">symbolic link name</span></code>). For example, <code>\\.\D</code>: may be assigned a symbolic link name of <code>\\.\ACCOUNTING_1</code>. Regardless of whether a drive letter or symbolic link name is used, logical partitions are defined to represent a specific partition in a disk rather than the entire disk. Internally, these names can expand to:</p> <pre xml:space="preserve" class="oac_no_warn">\\.\D:= \Device\Harddisk2\Partition1 \\.\ACCOUNTING_1= \Device\Harddisk3\Partition2 </pre> <div class="infoboxnote"> <p class="notep1">Note:</p> Oracle Database does not skip the first block of a logical raw partition used for an Oracle Database datafile.</div> </div> <!-- class="sect2" --> <a id="NTQRF503" name="NTQRF503"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --><a id="sthref775" name="sthref775"></a> <h3 class="sect2">Physical Disk and Logical Partition Considerations</h3> <p>Consider the following when deciding which raw partition to use:</p> <ul> <li> <p>Physical disks are automatically defined by Windows to represent the entire disk, and should never be defined by the user.</p> </li> <li> <p>Logical partitions must be defined by the user to represent a specific partition in a disk. These partitions should be logical partitions or drives contained in an extended partition. They should never be defined as <code>Partition0</code>.</p> </li> <li> <p>Using an entire disk (<code>Partition0</code>) for an Oracle Database datafile and using a partition that occupies the entire disk for an Oracle Database datafile are not the same thing. Even when a partition occupies the entire disk, there is still a small space on the disk that is not part of the partition.</p> </li> <li> <p>If you are using an entire disk for an Oracle Database datafile (<code>Partition0</code>), then use the pre-defined physical raw names that Windows provides.</p> </li> <li> <p>If you are using a specific partition and it occupies the entire disk, then use a logical partition.</p> </li> <li> <p>If you are using a specific partition created with Windows disk-management tools, then define and use a symbolic link name rather than a logical partition number (even if it occupies the entire disk).</p> </li> </ul> <div class="infoboxnote"> <p class="notep1">Note:</p> For both physical and logical raw conventions, use OCOPY to transfer the contents of a raw partition to a standard file system for backup purposes.</div> </div> <!-- class="sect2" --> <a id="i634333" name="i634333"></a><a id="NTQRF504" name="NTQRF504"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h3 class="sect2">Compatibility Issues</h3> <p>You can create logical partitions, but define physical disk convention names for them. For example:</p> <pre xml:space="preserve" class="oac_no_warn">\\.\PhysicalDriveACCOUNTING_1 = \Device\Harddisk2\Partition1 \\.\PhysicalDriveACCOUNTING_2 = \Device\Harddisk3\Partition1 </pre> <p>Oracle Database then handles datafiles using the physical disk convention even though it really is a logical partition. This will not cause any data corruption or loss as long as you continue to use physical disk naming conventions. Oracle recommends that you convert to the logical partition at your earliest convenience.</p> <p>You can also create logical names representing <code>Partition0</code>, but this is definitely not recommended. For example:</p> <pre xml:space="preserve" class="oac_no_warn">\\.\ACCOUNTING_1 = \Device\Harddisk1\Partition0 </pre> <p>This poses severe problems, because Disk Management typically writes a signature into the first block of every disk, and consequently may overwrite a portion of the datafile header. It can also cause data loss. Never use <code>Partition0</code> with the logical partition convention.</p> <p>Physical and logical partition conventions are not compatible with one another because of the extra block that is skipped for physical raw conventions. This also means you cannot simply use OCOPY to copy from a physical disk to a logical partition, because contents of these partitions are incompatible.</p> <p>To convert from a physical convention to a logical convention, you must:</p> <ol> <li> <p>Perform a full database export to a (local) file system.</p> </li> <li> <p>Create logical partitions and define logical names for these partitions.</p> </li> <li> <p>Recreate the database by using the new logical partitions.</p> </li> <li> <p>Perform the full database import to the newly-created database.</p> </li> </ol> <p>If your database installation uses physical disk conventions with logical partitions, Oracle recommends converting to the logical partition conventions at your earliest convenience, using the preceding steps.</p> <div class="infoboxnotealso"> <p class="notep1">See Also:</p> Your operating system documentation for information on creating extended and logical partitions</div> </div> <!-- class="sect2" --></div> <!-- class="sect1" --> <a id="CHDEIDEB" name="CHDEIDEB"></a><a id="NTQRF505" name="NTQRF505"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1">Creating a Raw Partition and a Mount Point</h2> <p>To create a raw partition, you must first generate an extended partition and a logical partition. An extended partition points to raw space on the disk that can be assigned multiple logical partitions for database files. An extended partition also avoids the four-partition limit by letting you define large numbers of logical partitions to accommodate applications using the Oracle Database server. Logical partitions can then be given symbolic link names to free up drive letters.</p> <p>On Windows Vista, Windows Server 2008, and Windows Server 2008 R2, create primary partitions and logical drives in extended partitions by selecting the <span class="bold">New Simple Volume</span> option. To create a raw device, select <span class="bold">Do not assign a drive letter or drive path.</span> To mount the raw device, assign and remove a drive letter. Do not use spanned volumes or striped volumes. These options will convert the volume to a dynamic disk. Automatic Storage Management does not support dynamic disks.</p> <p>You can use <code>diskpart.exe</code> for disk management from the command line. It can increase the disk volume capacity dynamically and create, delete, and resize partitions and volumes.</p> <p>Volume mount point offers additional storage space on a volume. Different partitions appear as a single logical volume and that is why it surpasses the 26-drive letter limitation. Use mount points as an alternative to drive letters.</p> <div class="infoboxnotealso"> <p class="notep1">See Also:</p> The Microsoft Web site for more information about raw partitions and volume mount points <p><code><a href="http://www.microsoft.com/en/us/default.aspx">http://www.microsoft.com/en/us/default.aspx</a></code></p> </div> </div> <!-- class="sect1" --> <a id="i634853" name="i634853"></a><a id="NTQRF506" name="NTQRF506"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1"><a id="sthref776" name="sthref776"></a>Creating a Tablespace in a Raw Partition</h2> <p>To create a tablespace using a datafile located in a raw partition:</p> <ol> <li> <p>Start SQL*Plus:</p> <pre xml:space="preserve" class="oac_no_warn">C:\> sqlplus </pre></li> <li> <p>Connect to the Oracle Database repository database:</p> <pre xml:space="preserve" class="oac_no_warn">SQL> CONNECT SYSTEM Enter password: <span class="italic">password</span> </pre> <p>where <code><span class="codeinlineitalic">password</span></code> for user account <a href="glossary.htm#i432552"><span class="xrefglossterm">SYSTEM</span></a> is <code>MANAGER</code> by default. If you have changed this password, substitute the correct password for <code>MANAGER</code>.</p> </li> <li><a id="i634418" name="i634418"></a> <p>Create the tablespace:</p> <pre xml:space="preserve" class="oac_no_warn">SQL> CREATE TABLESPACE <span class="italic">tablespace</span> DATAFILE '\\.\<span class="italic">datafile</span>' SIZE <span class="italic">x</span>m; </pre> <p>where:</p> <ul> <li> <p><code><span class="codeinlineitalic">tablespace</span></code> is the tablespace name</p> </li> <li> <p><code>'\\.\'</code> is the drive letter or symbolic link name assigned to the raw partition</p> </li> <li> <p><code><span class="codeinlineitalic">x</span></code> is the tablespace size in megabytes (Twenty megabytes is a good starting place.)</p> </li> </ul> </li> </ol> <p>For example, to create a tablespace named <code>accounting_1</code> that was assigned a symbolic link name of <code>accounting_1</code>, enter the following:</p> <pre xml:space="preserve" class="oac_no_warn">SQL> CREATE TABLESPACE accounting_1 DATAFILE '\\.\accounting_1' SIZE 502M; </pre> <div class="infoboxnote"> <p class="notep1">Note:</p> If you are creating a database with the <code>SQL</code> script, modify datafiles that are stored on raw partitions with a naming convention of <code>\\.\drive_letter:</code> or <code>\\.\symbolic link name</code><span class="italic">.</span></div> </div> <!-- class="sect1" --> <a id="BCFEBCAA" name="BCFEBCAA"></a><a id="NTQRF507" name="NTQRF507"></a> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h2 class="sect1">Configuring Disks for Automatic Storage Management</h2> <p>To use Automatic Storage Management with direct attached storage (DAS) or storage area network (SAN) storage, the disks must be stamped with a header by <code>asmtool</code> or <code>asmtoolg</code> (GUI version).</p> <div class="infoboxnotealso"> <p class="notep1">See Also:</p> "Manually Configuring Disks for Automatic Storage Management" in <a class="olink NTDBI" href="../../install.112/e10843/toc.htm"><span class="italic">Oracle Database Installation Guide for Microsoft Windows</span></a> for instructions on using <code>asmtool</code> or <code>asmtoolg</code></div> <p>Each DAS or SAN disk must have a partition table. Oracle recommends creating exactly one partition for each disk containing the entire disk. Use Microsoft Computer Management or the command line tool <code>diskpart</code> to create the partition. Once the partitions have been created, run <code>asmtoolg</code> or <code>asmtool</code>. These tools associate meaningful, persistent names with disks to facilitate using those disks with Automatic Storage Management. Automatic Storage Management uses disk strings to more easily operate on groups of disks at once, so the names created by <code>asmtool</code> make this easier than using Windows drive letters. All disk names created by <code>asmtool</code> begin with the prefix <code>ORCLDISK</code> for identification purposes.</p> <p>Automatic Storage Management uses the value of initialization parameter <code>ASM_DISKSTRING</code> as its search path when it discovers disks. The default value of <code>ASM_DISKSTRING</code> is <code>\\.\ORCLDISK</code><code><span class="codeinlineitalic">n</span></code>. If you want a different search path, then you must specify a different value for this parameter.</p> <div class="infoboxnotealso"> <p class="notep1">See Also:</p> "Initialization Parameters for ASM Instances" in <a class="olink ADMIN10100" href="http://www.oracle.com/pls/db112/lookup?id=ADMIN10100"><span class="italic">Oracle Database Administrator's Guide</span></a></div> </div> <!-- class="sect1" --></div> <!-- class="ind" --> <div class="footer"> <hr /> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="33%" /> <col width="*" /> <col width="33%" /> <tr> <td align="left"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="98"> <tr> <td align="center" valign="top"><a href="ap_doc.htm"><img width="24" height="24" src="../../dcommon/gifs/leftnav.gif" alt="Go to previous page" /><br /> <span class="icon">Previous</span></a></td> <td align="center" valign="top"><a href="ap_net.htm"><img width="24" height="24" src="../../dcommon/gifs/rightnav.gif" alt="Go to next page" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </td> <td style="font-size: 90%" align="center" class="copyrightlogo"><img width="144" height="18" src="../../dcommon/gifs/oracle.gif" alt="Oracle" /><br /> Copyright © 1996, 2010, Oracle and/or its affiliates. All rights reserved.<br /> <a href="../../dcommon/html/cpyr.htm">Legal Notices</a></td> <td align="right"> <table class="icons oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="245"> <tr> <td align="center" valign="top"><a href="../../index.htm"><img width="24" height="24" src="../../dcommon/gifs/doclib.gif" alt="Go to Documentation Home" /><br /> <span class="icon">Home</span></a></td> <td align="center" valign="top"><a href="../../nav/portal_booklist.htm"><img width="24" height="24" src="../../dcommon/gifs/booklist.gif" alt="Go to Book List" /><br /> <span class="icon">Book List</span></a></td> <td align="center" valign="top"><a href="toc.htm"><img width="24" height="24" src="../../dcommon/gifs/toc.gif" alt="Go to Table of Contents" /><br /> <span class="icon">Contents</span></a></td> <td align="center" valign="top"><a href="index.htm"><img width="24" height="24" src="../../dcommon/gifs/index.gif" alt="Go to Index" /><br /> <span class="icon">Index</span></a></td> <td align="center" valign="top"><a href="../../dcommon/html/feedback.htm"><img width="24" height="24" src="../../dcommon/gifs/feedbck2.gif" alt="Go to Feedback page" /><br /> <span class="icon">Contact Us</span></a></td> </tr> </table> </td> </tr> </table> </div> <noscript> <p>Scripting on this page enhances content navigation, but does not change the content in any way.</p> </noscript> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de