Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Converting Oracle Files to Quick I/O Files

Special commands, available in the /opt/VRTSdbed/bin directory, are provided to assist you in converting an existing database to use Quick I/O. You can use the qio_getdbfiles command to extract a list of file names from the database system tables and the qio_convertdbfiles command to convert this list of database files to use Quick I/O.


Note   Note    It is recommended that you create a Storage Checkpoint before converting to or from Quick I/O. For information on creating Storage Checkpoints, see Using Storage Checkpoints and Storage Rollback for Backup and Restore.

Prerequisites

  • Log in as the Database Administrator (typically, the user ID oracle) to run the qio_getdbfiles and qio_convertdbfiles commands.
  • You must predefine the Oracle environment variable $ORACLE_SID.
  • The repository must exist before you can convert to Quick I/O files. Run the dbed_update command to update or create the repository.
  • Files you want to convert must be regular files on VxFS file systems or links that point to regular VxFS files.


Options

For the qio_getdbfiles command:

-a

Lets you include all datafiles, including those that are potentially sparse.

(Use this option only for debugging purposes, as sparse files are not candidates for use with Quick I/O.)

-T

Lets you specify the type of database as ora. Specify this option only in environments where the type of database is ambiguous (for example, when multiple types of database environment variables, such as $ORACLE_SID, SYBASE, DSQUERY, and $DB2INSTANCE, are present on a server).

For the qio_convertdbfiles command:

-a

Changes regular files to Quick I/O files using absolute path names. Use this option when symbolic links need to point to absolute path names (for example, at a site that uses SAP).

-f

Reports on the current fragmentation levels for database files listed in the mkqio.dat file. Fragmentation is reported as not fragmented, slightly fragmented, fragmented, highly fragmented.

-h

Displays a help message.

-i

Creates the extra links for all datafiles and log files in the /dev directory to support SAP's brbackup.

-T

Lets you specify the type of database as ora. Specify this option only in environments where the type of database is ambiguous (for example, when multiple types of database environment variables, such as $ORACLE_SID, SYBASE, DSQUERY, and $DB2INSTANCE are present on a server).

-u

Changes Quick I/O files back to regular files. Use this option to undo changes made by a previous run of the qio_convertdbfiles script.


Usage Notes

  • Converting existing database files to be Quick I/O files may not be the best choice if the files are fragmented. Use the -f option to determine the fragmentation levels and either:
    • Exclude files that are highly fragmented and do not have sufficient contiguous extents for Quick I/O use.
    • or
    • Create new files with the qiomkfile command, rather than converting the files using the qio_convertdbfiles command. The new files will be contiguous. You must then move data from the old files to the new files using the dd(1M) command or a database import facility, and then define the new files to the database.

  • By default, qio_getdbfiles skips any tablespaces marked TEMPORARY. Tablespaces marked TEMPORARY can be sparse, which means that not all blocks in the file are allocated. Quick I/O files cannot be sparse, as Quick I/O provides a raw-type interface to storage. If a sparse file is converted to a Quick I/O file, the Oracle instance can fail if Oracle attempts to write into one of these unallocated blocks. See Handling Oracle Temporary Tablespaces and Quick I/O for more information.
  • For information on creating Quick I/O files for temporary tablespaces, see Creating Database Files as Quick I/O Files Using qiomkfile.
  • Instead of using the qio_getdbfiles command, you can manually create the mkqio.dat file containing the Oracle database filenames that you want to convert to Quick I/O files.
  • The qio_convertdbfiles command exits and prints an error message if any of the database files are not on a VxFS file system. If this happens, you must remove any non-VxFS files from the mkqio.dat file before running the qio_convertdbfiles command.

  To extract a list of Oracle files to convert

With the database instance up and running, run the qio_getdbfiles command from a directory for which you have write permission:


 $ cd /extract_directory 
 $ /opt/VRTSdbed/bin/qio_getdbfiles -T ora

The qio_getdbfiles command extracts the list file names from the database system tables and stores the file names and their size in bytes in a file called mkqio.dat under the current directory.


Note   Note    Alternatively, you can manually create the mkqio.dat file containing the Oracle database file names that you want to convert to use Quick I/O. You can also manually edit the mkqio.dat file generated by qio_getdbfiles, and remove files that you do not want to convert to Quick I/O files.

To run the qio_getdbfiles command, you must have permission to access the database and permission to write to the /extract_directory.

The mkqio.dat list file should look similar to the following:


   /db01/file1             210356
   /db01/file2             157996
   /db01/file3             38096
   /db01/file4             394932
   /db01/file5             911784

  To convert the Oracle database files to Quick I/O files

  1. Shut down the database.
    Caution  Caution    Running the qio_convertdbfiles command while the database is up and running can cause severe problems with your database, including loss of data, and corruption.
  2. Run the qio_convertdbfiles command from the writable directory where the mkqio.dat list resides:
      $ cd /extract_directory 
      $ /opt/VRTSdbed/bin/qio_convertdbfiles

    The list of files in the mkqio.dat file is displayed. For example:


       file1 --> .file1::cdev:vxfs:
       file2 --> .file2::cdev:vxfs:
       file3 --> .file3::cdev:vxfs:
       file4 --> .file4::cdev:vxfs:
       file5 --> .file5::cdev:vxfs:

    Run the qio_convertdbfiles command (with no options specified) to rename the file filename to .filename and creates a symbolic link to .filename with the Quick I/O extension. By default, the symbolic link uses a relative path name.

    The qio_convertdbfiles script exits and prints an error message if any of the database files are not on a VxFS file system. If this happens, you must remove any non-VxFS files from the mkqio.dat file before running the qio_convertdbfiles command again.

  3. Start up the database.

    You can now access these database files using the Quick I/O interface.

  To undo the previous run of qio_convertdbfiles and change Quick I/O files back to regular VxFS files

  1. If the database is running, shut it down
  2. Run the following command from the writable directory where the mkqio.dat list resides:
      $ cd /extract_directory 
      $ /opt/VRTSdbed/bin/qio_convertdbfiles -u

    The list of Quick I/O files in the mkqio.dat file is displayed. For example:


       .file1::cdev:vxfs: --> file1
       .file2::cdev:vxfs: --> file2
       .file3::cdev:vxfs: --> file3
       .file4::cdev:vxfs: --> file4
       .file5::cdev:vxfs: --> file5

    The qio_convertdbfiles command with the undo option (-u) specified renames the files from .filename to filename and undoes the symbolic link to .filename that was created along with the Quick I/O files.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com