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:

It is recommended that you create a Storage Checkpoint before converting to or from Quick I/O.

Before converting database files to Ouick I/O files, the following conditions must be met:

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. Change to the ORACLE_SID environment variable must be defined.

  • Files you want to convert must be regular files on VxFS file systems or links that point to regular VxFS files

Usage notes

  • Converting existing database files to Quick I/O files may not be the best choice if the files are fragmented. Use of the -f option to determine the fragmentation levels is not supported for 5.1.

  • If you choose to create new files, they 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.

  • You may also want to consider creating Quick I/O files for temporary tablespaces.

    See Creating database files as Quick I/O files using qiomkfile.

  • 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.

  • 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 following options are available 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.

The following options are available 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).

-h

Displays a help message.

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.

-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.

To extract a list of Oracle files to convert

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

  1. Shut down the database.

  2. Run the qio_convertdbfiles command from the directory containing the mkqio.dat file:

    $ 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.

  4. 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 directory containing the mkqio.dat file:

    $ 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.

More Information

Creating Storage Checkpoints using dbed_ckptcreate