- Benefits of Using Soft Links
- Using Symbolic Links to Set Up a Database
- Using Soft Links With VERITAS QIO
- Acknowledgements
Using Symbolic Links to Set Up a Database
Normally, using symbolic links is a three-step procedure. However, when VERITAS QIO is involved, there is an additional, fourth step to complete.
CAUTION
For the procedure described in this article to work safely and accurately, we strongly recommended that Step 2 on page 3 and the second step on page 4 be scripted to include all database files.
To Use Symbolic Links
Identify database file names and their corresponding real (physical) locations.
Create symbolic links as shown in the following file system and raw device examples:
File system example:
#!/bin/ksh ORACLE_BASE=/home/oracle; export $ORACLE_BASE rm -f $ORACLE_BASE/oradata/PROD/*.{dbf,ctl,log} ln -s /fs01/control.ctl $ORACLE_BASE/oradata/control.ctl ln -s /fs02/system.dbf $ORACLE_BASE/oradata/system.dbf ln -s /fs03/undotbs01.dbf $ORACLE_BASE/oradata/undotbs01.dbf ln -s /fs03/redo.log $ORACLE_BASE/oradata/redo.log
Raw devices example:
#!/bin/ksh ORACLE_BASE=/home/oracle; export $ORACLE_BASE rm -f $ORACLE_BASE/oradata/PROD/*.{dbf,ctl,log} ln -s /dev/rdsk/c1t1d0s3 $ORACLE_BASE/oradata/control.ctl ln -s /dev/rdsk/c2t2d0s3 $ORACLE_BASE/oradata/system.dbf ln -s /dev/rdsk/c3t3d0s3 $ORACLE_BASE/oradata/undotbs01.dbf ln -s /dev/rdsk/c4t4d0s3 $ORACLE_BASE/oradata/redo.log
Create the database, specifying soft link file names to map to the location where a storage object is needed, for example:
CREATE DATABASE PROD DATAFILES '$ORACLE_HOME/oradata/system.dbf' SIZE 500M REUSE AUTOEXTEND OFF LOGFILE GROUP 1 ('$ORACLE_BASE/oradata/PROD/redo01.log') SIZE 1500M reuse, GROUP 2 ('$ORACLE_BASE/oradata/PROD/redo02.log') SIZE 1500M reuse,
NOTE
Even though these examples use an ORACLE database, the same techniques and principles should work with any database.