Home > Veritas Storage Foundation™ for Oracle Manual Pages
QIO_CONVERTDBFILES (1) |
User Commands |
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
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.
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.
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.
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.
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.