Skip Headers

Oracle9i Database Administrator's Guide
Release 2 (9.2) for Windows

Part Number A95491-01
Go To Documentation Library
Go To Product List
Book List
Go To Table Of Contents
Go To Index

Master Index


Go to previous page Go to next page

Storing Tablespaces on Raw Partitions

This appendix describes how to configure your system to store datafiles for tablespaces on raw partitions.

This appendix contains these topics:

Raw Partition Overview

In addition to storing datafiles for tablespaces on a file system, datafiles can also be stored 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.

A raw partition is created after generation of an extended partition and a logical partition. Windows NT Disk Administrator enables you to create an extended partition on a physical drive.


The Windows 2000 equivalent is Disk Management.

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 Oracle9i database server. Logical partitions can then be given symbolic link names to free up drive letters.

Raw partitions are of two types:

Physical Disk

A physical disk represents the entire disk and points to the following:


Windows NT automatically creates a symbolic link name of \\.\PhysicalDrivex, where x is the number corresponding to your hard disk drive number in Disk Administrator and matching the x in \Device\Harddiskx\Partition0. \\.Symbolic link name \PhysicalDrivex is automatically defined by Windows for every hard disk in the computer. For example, a computer with three hard disks:


Internally, these names expand to the following:

\\.\PhysicalDrive0 = \Device\Harddisk0\Partition0 
\\.\PhysicalDrive1 =\Device\Harddisk1\Partition0 
\\.\PhysicalDrive2 =\Device\Harddisk2\Partition0 

Partition0 is special, because it represents the entire physical disk regardless of any partitioning scheme on that disk. On all disks recognized by Windows, Disk Administrator writes a signature on the first block of all disks. To avoid overwriting that block, Oracle9i database skips the first block of a physical raw partition that is used for an Oracle9i datafile.

Logical Partition

A logical partition is a partition created by Disk Administrator that points to a drive other than \Device\Harddiskx\Partition0.

Logical partitions are initially assigned names with drive letters (\\.\drive_letter:) and typically re-assigned symbolic link names (\\.\symbolic link name). For example, \\.\D: may be assigned a symbolic link name of \\.\ACCOUNTING_1. 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:

\\.\D:= \Device\Harddisk2\Partition1 
\\.\ACCOUNTING_1= \Device\Harddisk3\Partition2 

Drive letters can be assigned to specific partitions, using Disk Administrator. Symbolic link names can, on the other hand, be assigned using a utility such as DOSDEV.EXE, which is available with Windows NT Resource Kit.


Oracle9i database does not skip the first block of a logical raw partition used for an Oracle9i datafile.

Physical Disk and Logical Partition Considerations

Consider the following when deciding which raw partition to use:

Frequently Asked Questions

Question: What is the impact if I have created logical partitions, but defined physical disk convention names for them. For example:

\\.\PhysicalDriveACCOUNTING_1 = \Device\Harddisk2\Partition1 
\\.\PhysicalDriveACCOUNTING_2 = \Device\Harddisk3\Partition1 

Answer: Oracle9i database 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 Corporation recommends that you convert to the logical partition at your earliest convenience. See "Compatibility Issues".

Question: What is the impact if I have created logical names representing Partition0? For example:

\\.\ACCOUNTING_1 = \Device\Harddisk1\Partition0 

Answer: This poses severe problems, because Disk Administrator typically writes a signature into the first block of every disk, and consequently may overwrite a portion of the datafile header.

This can also cause data loss. Never use Partition0 with the logical partition convention. See "Compatibility Issues" for information on rebuilding your Oracle9i database with the proper conventions.

Question: How do I transfer the contents of any raw partition to a standard file system for backup purposes?

Answer: Use OCOPY utility to copy data to/from a raw partition for both physical and logical raw conventions. See "Compatibility Issues" for further information.

Compatibility Issues

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 utility to copy from a physical disk to a logical partition, because contents of these partitions are incompatible.

To convert from a physical convention to a logical convention, you must:

  1. Perform a full database export to a (local) file system.

  2. Create logical partitions and define logical names for these partitions.

  3. Recreate the database by using the new logical partitions.

  4. Perform the full database import to the newly-created database.

If your database installation uses physical disk conventions with logical partitions, Oracle Corporation recommends converting to the logical partition conventions at your earliest convenience, using the preceding steps.

Creating an Extended Partition

Only one extended partition can be created for each disk. You can use free space in the extended partition to create multiple logical partitions or use all or part of it when creating volume sets or other kinds of volumes for fault-tolerance purposes.

To create an extended partition:

  1. Choose Start > Programs > Administrative Tools > Disk Administrator.

    The Disk Administrator window appears.

    Text description of disk1.gif follows.

    Text description of the illustration disk1.gif

    Note that the lines display diagonally from top right to bottom left, indicating unpartitioned devices.

  2. Select an area of free space in an extended partition on a disk that is on the shared disk subsystem by clicking the mouse.

    Oracle Corporation recommends that you use the entire disk.

  3. Choose Partition > Create Extended.

    Disk Administrator displays minimum and maximum sizes for the extended partition:

    Text description of extended.gif follows.

    Text description of the illustration extended.gif

  4. Use the default maximum size, then choose OK.


    Changes that you have made are not saved until you choose Partition > Commit Changes Now or exit Disk Administrator.

    The extended partition is created.

    Note that the lines now display diagonally from top left to bottom right, indicating the partition is an extended partition.

Creating Logical Partitions in an Extended Partition

After an extended drive is created, you must assign logical partitions to it. Logical partitions are assigned letters of the alphabet.


Oracle Corporation recommends that you not create more than 120 logical partitions in an extended partition.

To create logical partitions in an extended partition:

  1. Select an area of free space in an extended partition by clicking the mouse on it.

  2. Choose Partition > Create.

    Disk Administrator displays minimum and maximum sizes for the logical partition.

  3. Enter the size of the logical partition for the data file, then choose OK.

    The size depends on how large your datafiles will be. Add 2 MB to this size for overhead.

  4. Repeat Steps 1-3 for each additional datafile that you plan to store in a raw partition.

  5. Choose Partition > Commit Changes Now.

    A confirmation dialog appears, informing you that changes have been made to the disk.

  6. Click Yes.

    A dialog box appears, informing you that the disks have been updated successfully.

  7. Click OK.

  8. Write down the hard disk number(s) and the number of the partition (starting at 1) for that drive. Oracle Corporation recommends using a worksheet similar to the one shown here.

    Hard Disk Number Partition Number Range

    Hard Diskx

    Partitions x-x

    Hard Diskx

    Partitions x-x

  1. Choose Partition > Close.

    Disk Administrator exits.

Creating a Tablespace in a Raw Partition

To create a tablespace using a datafile located in a raw partition:

  1. Start SQL*Plus:

    C:\> sqlplus
  2. Connect to the Oracle9i repository database:

    Enter user-name: SYSTEM/password

    where password for user account SYSTEM is MANAGER by default. If you have changed this password, substitute the correct password for MANAGER.

  3. Create the tablespace:

    SQL> CREATE TABLESPACE tablespace DATAFILE '\\.\datafile' SIZE xm;


    • tablespace is the tablespace name

    • `\\.\' is the drive letter or symbolic link name assigned to the raw partition

    • x is the tablespace size in megabytes (Twenty megabytes is a good starting place.)

For example, to create a tablespace named accounting_1 that was assigned a symbolic link name of accounting_1, enter the following:

SQL> CREATE TABLESPACE accounting_1 DATAFILE '\\.\accounting_1 SIZE 502M;


If you are creating a database with the SQL script, modify datafiles that are stored on raw partitions with a naming convention of \\.\drive_letter: or \\.\symbolic link name.

Go to previous page Go to next page
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Go To Product List
Book List
Go To Table Of Contents
Go To Index

Master Index