Home > Veritas Storage Foundation™ for Oracle Manual Pages

QIO_CONVERTDBFILES (1)

User Commands

Table of contents


NAME

qio_convertdbfiles - convert VxFS files to Quick I/O files

SYNOPSIS

For all databases: qio_convertdbfiles [ -T database_type ] [ -a | -f | -h | -i | -u ]


AVAILABILITY

This command is part of Veritas Storage Foundation for Databases.

To determine whether Veritas Storage Foundation for Oracle is installed on an 1 system, enter:

lslpp -L VRTSdbed

To determine whether Veritas Storage Foundation for DB2 is installed on an 1 system, enter:

lslpp -L VRTSdb2ed


DESCRIPTION

You can use the qio_convertdbfiles command to convert database files to use Quick I/O. These command is for use with VxFS file systems only. The qio_convertdbfiles command will only convert regular files or links that point to regular files on VxFS file systems. The qio_convertdbfiles commands calls the database-specific version of the conversion utility.

Note: Veritas Storage Foundation for DB2 on 1 does not support converting existing DB2 containers or VxFS files to or from Quick I/O due to a DB2 limiitation.

The qio_convertdbfiles command is available in the /opt/VRTSdbed/bin directory for Oracle; the /opt/VRTSdb2ed/bin directory for DB2; and the /opt/VRTSsybed/bin directory for Sybase.

To use this command for Oracle, the ORACLE_SID environment variable must be set.

To use these commands for DB2, the DB2DATABASE environment variable must be set. If DB2INSTANCE is not set, the script will assume the current user ID is DB2INSTANCE.

To use these commands for Sybase, the SYBASE and DSQUERY environment variables must be set.

While the database instance is up and running, run the qio_getdbfiles command to get a list of files used by the database. This command stores the file names and sizes in bytes in a file called mkqio.dat. The files listed in mkqio.dat are converted to Quick I/O by the qio_convertdbfiles command. If the database you want to gather this information about is not up and running, you can manually create the mkqio.dat file. The format of this file is a list of paired file paths and file sizes. For example:


/database/dbfile.001 1024000
/database/dbfile.002 2048000

After running the qio_getdbfiles command, shut down the database and run the qio_convertdbfiles command to convert the list of file names in the mkqio.dat file 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. You must remove any non-VxFS files from the mkqio.dat file before running the qio_convertdbfiles command. After the qio_convertdbfiles command has run, you can re-start the database to access these database files using the Quick I/O interface.


OPTIONS

The following option is supported by qio_convertdbfiles:
-T database_type
This option forces behavior for a specific database vendor. The database options that are currently supported are ora, syb, and db2. Use this option in environments where the database to perform operations on is ambiguous. qio_getdbfiles and qio_convertdbfiles resolve ambiguity by examining the environment and searching for variable settings that are a prerequisite for using one or more database vendors' products.

-a
Changes regular files to Quick I/O files using absolute pathnames. Use this option when symbolic links need to point to absolute pathnames. By default, qio_convertdbfiles uses relative pathnames, which are more portable when moving database directories or recovering from backup.
-f
Reports on the current fragmentation levels for files listed in the mkqio.dat file. Fragmentation is reported at four levels: not fragmented, slightly fragmented, fragmented, and highly fragmented.
-h
Shows command usage.
-i
Creates extra links for all database files and log files in the /dev directory to support the SAP brbackup command.
-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 command.

Converting existing database files to Quick I/O files may not be the optimal thing to do if these files are fragmented. In this case, creating new files with the qiomkfile command (which are guaranteed not to be fragmented) and converting the data from the old files (using a command such as dd) is recommended.


USAGE

You must be logged in as the Database Administrator to run qio_convertdbfiles. The qio_getdbfiles command queries the database to gather a list of datafiles to be converted, which requires direct access to the database. The qio_convertdbfiles command expects all files to be owned by the Database Administrator.

Running the qio_convertdbfiles command with any option except -f while the database is up and running can cause severe problems for your database, including data loss and corruption. Make sure the database is shut down before running this command.

For Sybase, qio_convertdbfiles connect to the Sybase ASE server via a Sybase sa account. It is important to protect the sa password so that it is not visible to other users. By default, both commands will ask users to type in the Sybase sa password. The Sybase tools used in these commands will receive the password without displaying it on the screen. To run these commands in a non-interactive mode, you can create a file /opt/VRTSsybed/.private/sa_password_dataserver_name, which contains the Sybase sa password for the corresponding ASE server. dataserver_name is the content of the DSQUERY variable set by the user. Only the Sybase DBA user should have access to the .private directory and sa_password_dataserver_name file. If the sa_password_dataserver_name file is present, qio_convertdbfiles will read the Sybase sa password from the file and run in non-interactive mode.


EXAMPLES

This example shows the procedure for converting the files in a database to Quick I/O.

Get information about the file:


$ /opt/VRTSdbed/bin/qio_getdbfiles
$ cat mkqio.dat
dbfile  104800000

Note: For Oracle, use VRTSdbed in the command path; for DB2, use VRTSdb2ed; and for Sybase, use VRTSsybed.

Shut down the database and convert the file to Quick I/O:


$ /opt/VRTSdbed/bin/qio_convertdbfiles

$ ls -alL d* .d*
-rw-r--r-- 1 admin dbgrp 104857600 May 2 13:42 .dbfile
crw-r--r-- 1 admin dbgrp 45, 1 May 3 12:18 dbfile

$ ls -al d* .d*
-rw-r--r-- 1 admin dbgrp 104857600 May 2 13:42 .dbfile
lrwxrwxrwx 1 admin dbgrp 17 May 3 12:18 dbfile -> .dbfile::cdev:vxfs:

The qio_convertdbfiles command renames the file dbfile to .dbfile and creates a symbolic link to .dbfile with the Quick I/O extension. By default, the symbolic link uses a relative path name.

Start up the database.

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


$ /opt/VRTSdbed/bin/qio_convertdbfiles -u
.dbfile::cdev:vxfs: --> dbfile 

Note: If the server is up and running, you will receive an error message stating that you need to shut it down before you can run the qio_convertdbfiles command.

The qio_convertdbfiles command with the undo (-u) option 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.


SEE ALSO

qio_getdbfiles(1M), qio_recreate(1M)

For Oracle:

oracle_edition(7)

Veritas Storage Foundation for Oracle Administrator's Guide

For DB2:

db2_edition(7)

Veritas Storage Foundation for DB2 Administrator's Guide

For Sybase:

sybase_edition(7)

Veritas Storage Foundation for Sybase Administrator's Guide

Last updated: 15 Jan 2006
Copyright ©2009 Symantec Corporation
All rights reserved.