Veritas Storage Foundation™ for Oracle 5.0.1 Administrator's Guide HP-UX 11i v3 HP Part Number: 5900-0090 Published: November 2009 Edition: 1.
© Copyright 2009 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents Technical Support ............................................................................................... 4 Chapter 1 Introducing Veritas Storage Foundation for Oracle ............................................................................... 17 About Veritas Storage Foundation for Oracle .................................... Components of Veritas Storage Foundation for Oracle .................. How Veritas Volume Manager works ...............................................
8 Contents About restoring file systems using Storage Checkpoints ................ About quotas ......................................................................... About cluster functionality (optional) ........................................ How Veritas Storage Mapping works ............................................... How Veritas Database FlashSnap works ........................................... How Veritas Extension for Oracle Disk Manager works .......................
Contents Chapter 3 Managing the SFDB repository ......................................... 67 About the SFDB repository ............................................................. Runtime management tasks for the SFDB repository .......................... Starting, stopping, and checking the SFDB repository with sfua_db_config ................................................................ Backing up and restoring the SFDB repository with sfua_rept_adm ...................................................
10 Contents Determining candidates for Cached Quick I/O .................................. Collecting I/O statistics ......................................................... About I/O statistics ............................................................... Effects of read-aheads on I/O statistics ..................................... Other tools for analysis ......................................................... Enabling and disabling Cached Quick I/O for individual files ..............
Contents Using dbed_analyzer .................................................................. Obtaining Storage Mapping information for a list of tablespaces ................................................................... Oracle file mapping (ORAMAP) ..................................................... Mapping components ............................................................ Storage Mapping views .......................................................... Verifying Oracle file mapping setup ...
12 Contents Chapter 11 Using Database Dynamic Storage Tiering .................... 183 About Database Dynamic Storage Tiering ....................................... Database Dynamic Storage Tiering building blocks ..................... Database Dynamic Storage Tiering in a High Availability (HA) environment ................................................................. Configuring Database Dynamic Storage Tiering ............................... Database Dynamic Storage Tiering command requirements ..
Contents Chapter 13 Using Database FlashSnap for backup and off-host processing ..................................................................... 223 About Veritas Database FlashSnap ................................................ Typical database problems solved with Database FlashSnap ......... About Database FlashSnap applications .................................... Database FlashSnap .............................................................. Database FlashSnap commands ......................
14 Contents Chapter 14 Using Veritas NetBackup for database backup ........... 295 About using Veritas NetBackup for backup and restore ..................... 295 Using Veritas NetBackup to backup and restore Quick I/O files ........... 295 About using Veritas NetBackup to backup and restore Oracle Disk Manager files ...................................................................... 297 Chapter 15 Tuning for performance ...................................................
Contents Checking the database configuration environment using dbed_checkconfig ........................................................... Saving the database configuration environment using dbed_saveconfig ............................................................. Creating Storage Checkpoints using dbed_ckptcreate .................. Displaying Storage Checkpoints using dbed_ckptdisplay .............. Mounting Storage Checkpoints using dbed_ckptmount ................
16 Contents Starting or stopping I/O statistic collection for Database Dynamic Storage Tiering using dbdst_fstat ...................................... Relocating files for Database Dynamic Storage Tiering using dbdst_file_move ............................................................. Relocating tablespaces for Database Dynamic Storage Tiering using dbdst_tbs_move .....................................................
Chapter 1 Introducing Veritas Storage Foundation for Oracle This chapter includes the following topics: ■ About Veritas Storage Foundation for Oracle ■ How Veritas Volume Manager works ■ How Veritas File System works ■ How Veritas Storage Mapping works ■ How Veritas Database FlashSnap works ■ How Veritas Extension for Oracle Disk Manager works ■ How Database Dynamic Storage Tiering works ■ About the vxdbd daemon ■ About Veritas Storage Foundation for Oracle graphical user interface ■ Ab
18 Introducing Veritas Storage Foundation for Oracle About Veritas Storage Foundation for Oracle Note: Veritas Storage Foundation/High Availability (HA) for Oracle is available only with the Enterprise Edition. Unless otherwise noted, features pertain to both the Standard and Enterprise Edition products.
Introducing Veritas Storage Foundation for Oracle About Veritas Storage Foundation for Oracle ■ A feature of the Enterprise Edition, VxFS Storage Checkpoint technology lets you create a point-in-time image of a file system. Storage Checkpoints are treated like any other VxFS file system and can be created, mounted, unmounted, and removed with VxFS and Veritas Storage Foundation administrative utilities.
20 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works ■ Veritas Enterprise Administrator Veritas Enterprise Administrator (VEA) is the infrastructure that allows you to access Veritas Storage Foundation for Oracle, Veritas Volume Manager, and Veritas File System information and features through the GUI.
Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works Table 1-1 Veritas Volume Manager features (continued) Feature Benefit Dirty Region Logging (DRL) Speeds the recovery of mirrored volumes after a system crash. SmartSync Recovery Accelerator Increases the availability of mirrored volumes by only resynchronizing changed data. Volume snapshots Allows backup of volumes based on disk mirroring.
22 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works Table 1-1 Veritas Volume Manager features (continued) Feature Benefit Veritas FlashSnap Agent for Symmetrix Separately licensed, optional feature that includes a set of commands that allows you to use EMC TimeFinder in conjunction with VxVM disk groups and volumes that have been created on Symmetrix standard devices.
Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works About disk groups A disk group is a collection of disks that share a common configuration (for example, configuration objects that belong to a single database). We recommend creating one disk group for each database. You can move a disk group and its components as a unit from one host to another host.
24 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works in the first subdisk from beginning to end. Data is then accessed in the remaining subdisks sequentially from beginning to end, until the end of the last subdisk. You can use concatenation with multiple subdisks when there is insufficient contiguous space for the plex on any one disk. This form of concatenation can be used for load balancing between disks, and for head movement optimization on a particular disk.
Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works provide redundancy of data. A volume can consist of up to 32 mirrors. Each of these mirrors must contain disk space from different disks for the redundancy to be effective. How striping plus mirroring (mirrored-stripe or RAID-0+1) works VxVM supports the combination of mirroring above striping. The combined layout is called a mirrored-stripe layout.
26 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works slow write performance. RAID-5 is useful if the database workload is read-intensive (as in many data warehousing applications). You can snapshot a RAID-5 volume and move a RAID-5 subdisk without losing redundancy. About online relayout As databases grow and usage patterns change, online relayout lets you change volumes to a different layout, with uninterrupted data access. Relayout is accomplished online and in place.
Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works About dirty region logging Dirty region logging (DRL), if enabled, speeds the recovery of mirrored volumes after a system crash. DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume. DRL uses this information to recover only those portions of the volume that need to be recovered.
28 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works ■ Space-optimized instant snapshots ■ Emulation of third-mirror snapshots See “About Veritas Database FlashSnap” on page 224. About Veritas FastResync Veritas FastResync (previously called Fast Mirror Resynchronization or FMR) is included with the Enterprise Edition. It is also included as part of the Veritas FlashSnap option with the Standard Edition.
Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works FastResync maps on disk so that they can survive system reboots and system crashes. When the disk groups are rejoined, this allows the snapshot plexes to be quickly resynchronized. This ability is not supported by non-persistent FastResync. If persistent FastResync is enabled on a volume or on a snapshot volume, a DCO and a DCO log volume are associated with the volume.
30 Introducing Veritas Storage Foundation for Oracle How Veritas Volume Manager works the volume configuration for any possible performance impact. It is also a good idea to designate additional disks as spares to augment the spare pool. While a disk is designated as a spare, you cannot use the space on that disk for the creation of VxVM objects within its disk group. VxVM also lets you free a spare disk for general use by removing it from the pool of hot-relocation disks.
Introducing Veritas Storage Foundation for Oracle How Veritas File System works output is sent to the screen, but you can redirect it to a file using standard UNIX redirection. See the Veritas Volume Manager Administrator's Guide. About cluster functionality (optional) VxVM includes an optional, separately licensable clustering feature, known as Cluster Volume Manager, that enables VxVM to be used in a cluster environment. With the clustering option, VxVM supports up to 16 nodes per cluster.
32 Introducing Veritas Storage Foundation for Oracle How Veritas File System works See the Veritas File System Administrator's Guide. About Veritas Quick I/O Databases can run on either file systems or raw devices. Database administrators often create their databases on file systems because it makes common administrative tasks (such as moving, copying, and backing up) easier. However, running databases on most file systems significantly reduces database performance.
Introducing Veritas Storage Foundation for Oracle How Veritas File System works About extent-based allocation The HFS file system supplied with HP-UX uses block-based allocation schemes that provide good random access to files and acceptable latency on small files. For larger files, like database files, this block-based architecture limits throughput. This limitation makes the HFS file system a less than optimal choice for database environments.
34 Introducing Veritas Storage Foundation for Oracle How Veritas File System works How the defragmentation utility works Free resources are originally aligned in the most efficient order possible and are allocated to files in a way that is considered by the system to provide optimal performance. When a file system is active for extended periods of time, new files are created, old files are removed, and existing files grow and shrink.
Introducing Veritas Storage Foundation for Oracle How Veritas File System works Support for multi-volume file systems The multi-volume file system (MVS) feature allows several volumes to be represented by a single logical object. All I/O to and from an underlying logical volume is directed by way of volume sets. A volume set is a container for multiple different volumes. This feature can be used only in conjunction with Veritas Volume Manager.
36 Introducing Veritas Storage Foundation for Oracle How Veritas File System works Storage Checkpoints also keep track of the block change information that enables incremental database backup at the block level. Storage Checkpoints are writable, and can be created, mounted, and removed.
Introducing Veritas Storage Foundation for Oracle How Veritas Storage Mapping works You can use quotas to limit the amount of file system space used by Storage Checkpoints. With Veritas Storage Foundation for Oracle, you can enable, disable, set, and display quota values for a single file system, for multiple file systems, or for all file systems in a database using the dbed_ckptquota command. See “Administering Storage Checkpoint quotas using dbed_ckptquota” on page 338.
38 Introducing Veritas Storage Foundation for Oracle How Veritas Database FlashSnap works This command can help you avoid I/O contention. For example, you can use the information to avoid backing up two tablespaces that share the same physical disk. Both storage object statistics and the storage structure are displayed in the Veritas Storage Foundation for Oracle GUI. See “About Storage Mapping ” on page 133.
Introducing Veritas Storage Foundation for Oracle How Veritas Extension for Oracle Disk Manager works How Veritas Extension for Oracle Disk Manager works Veritas Extension for Oracle Disk Manager is a custom storage interface defined by Oracle Corporation first introduced in Oracle9. Oracle Disk Manager allows Oracle9 and above to exploit system bandwidth through an improved Application Programming Interface (API) that contains advanced kernel support for file I/O.
40 Introducing Veritas Storage Foundation for Oracle About the vxdbd daemon The DBA can also create a file relocation policy for database files, which would relocate files based on how frequently a file is used. See “About Database Dynamic Storage Tiering” on page 183. About the vxdbd daemon The vxdbd daemon handles communication to and from the Veritas Storage Foundation for Oracle software. By default, vxdbd communicates with Veritas Storage Foundation for Oracle over port number 3233.
Introducing Veritas Storage Foundation for Oracle About Veritas Storage Foundation for Oracle graphical user interface To stop the vxdbd daemon ◆ As root, use the vxdbdctrl stop command: /opt/VRTSdbcom/bin/vxdbdctrl stop To change the communications port used by the vxdbd daemon 1 As the root user, stop the vxdbd daemon: /opt/VRTSdbcom/bin/vxdbdctrl stop 2 In the /etc/vx/vxdbed/admin.
42 Introducing Veritas Storage Foundation for Oracle About Veritas NetBackup (optional) ■ Automate tasks, such as creating or cloning a database using a Storage Checkpoint, with the scheduler. (Java-based GUI only.) ■ Roll back databases, tablespaces, or datafiles to Storage Checkpoints. ■ Collect and display statistics on file system and Oracle space usage. ■ Collect and display storage object I/O statistics and the storage structure.
Introducing Veritas Storage Foundation for Oracle About Veritas Storage Foundation/High Availability for Oracle (optional) System (VxFS) available through Veritas Storage Foundation for Oracle. BLI Backup reduces both the time required to complete a database backup and the amount of data transferred during backups. It also allows more frequent backups, resulting in more up-to-date backup images.
44 Introducing Veritas Storage Foundation for Oracle About Veritas Storage Foundation/High Availability for Oracle (optional) Note: Veritas Storage Foundation/HA (VCS) for Oracle is available only for the Enterprise Edition.
Chapter 2 Setting up databases This chapter includes the following topics: ■ Tasks for setting up new databases ■ About setting up a disk group ■ Creating a disk group ■ Adding disks to a disk group ■ About selecting a volume layout ■ Creating a volume ■ Creating a volume set ■ Adding a volume to a volume set ■ File system creation guidelines ■ Creating a VxFS file system ■ Mounting a file system ■ Unmounting a file system ■ About fragmentation ■ Resizing a file system Tasks fo
46 Setting up databases Tasks for setting up new databases Determine the number and sizes of file See the Veritas File System Administrator's systems you need for the database you want Guide. to create. Create volumes to meet your file system ■ See “About selecting a volume layout” needs. You can use disk mirroring as a on page 51. safeguard against disk failures and striping ■ See “Creating a volume ” on page 53. for better performance. ■ See “About tuning VxVM ” on page 299.
Setting up databases About setting up a disk group If you are not currently running on VxVM and VxFS, make sure Veritas Storage Foundation for Oracle is installed and convert your existing database configuration. See the Veritas Storage Foundation for Oracle Installation Guide. For backup and recovery on the same host, See “About Storage Checkpoints and Storage you can use the Storage Checkpoint facility Rollback” on page 149. to create file system snapshots of the database.
48 Setting up databases Creating a disk group and a dg suffix. The dg suffix helps identify the object as a disk group. Also, each disk name must be unique within the disk group. ■ Never create database files using file systems or volumes that are not in the same disk group. In earlier releases of Veritas Volume Manager, a system installed with VxVM was configured with a default disk group, rootdg, that had to contain at least one disk.
Setting up databases Creating a disk group Usage notes Veritas Storage Foundation for Oracle only supports single disk groups. ■ Veritas Storage Foundation for Oracle RAC supports shared disk groups. If you are in an Oracle RAC environment: ■ Create disk groups on the shared disks from the master node. To determine if a node is a master or slave, run the following command: ■ vxdctl -c mode RAID-5 volumes are not supported for sharing in a cluster.
50 Setting up databases Adding disks to a disk group To create a new shared disk group in an Oracle RAC environment ◆ Use the vxdg command as follows: # /opt/VRTS/bin/vxdg -s init disk_group [disk_name=disk_device] Where the -s option allows the disk group to be shared. Note: Veritas Storage Foundation forOracle RAC supports shared disk groups. Veritas Storage Foundation for Oracle Standard and Enterprise edition support both single and multiple disk groups.
Setting up databases About selecting a volume layout # /opt/VRTS/bin/vxdg -g PRODdg adddisk PRODdg02=c4t0d0 # /opt/VRTS/bin/vxdg -g PRODdg adddisk PRODdg03=c4t0d1 # /opt/VRTS/bin/vxdg -g PRODdg adddisk PRODdg04=c4t0d2 About selecting a volume layout Veritas Volume Manager offers a variety of layouts that allow you to configure your database to meet performance and availability requirements. The proper selection of volume layouts provides optimal performance for the database workload.
52 Setting up databases About selecting a volume layout In general, for most OLTP databases, use the default stripe unit size of 64 K or smaller for striped volumes and 16 K for RAID-5 volumes. How to choose between mirroring and RAID-5 VxVM provides two volume configuration strategies for data redundancy: mirroring and RAID-5. Both strategies allow continuous access to data in the event of disk failure. For most database configurations, we recommend using mirrored, striped volumes.
Setting up databases Creating a volume sizes. Put the most frequently accessed tables or tables that are accessed together on separate striped volumes to improve the bandwidth of data transfer. See “About tuning VxVM ” on page 299. Creating a volume Veritas Volume Manager uses logical volumes to organize and manage disk space. A volume is made up of portions of one or more physical disks, so it does not have the limitations of a physical disk.
54 Setting up databases Creating a volume set To create a volume ◆ Use the vxassist command as follows: # /opt/VRTS/bin/vxassist -g disk_group make volume_name \ size disk_name The following is an example of creating a volume using the vxassist command: To create a 1 GB mirrored volume called db01 on the PRODdg disk group: # /opt/VRTS/bin/vxassist -g PRODdg make db01 1g PRODdg01 Creating a volume set Volume Sets enable the use of the Multi-Volume Support feature with Veritas File System (VxFS).
Setting up databases Adding a volume to a volume set # /usr/sbin/vxvset [-g diskgroup] -t vxfs make volset volume where: ■ volset is the name of the volume set ■ volume is the name of the first volume in the volume set ■ -t defines the content handler subdirectory for the application that is to be used with the volume. This subdirectory contains utilities that an application uses to operate on the volume set.
56 Setting up databases Creating a VxFS file system ■ Specify the maximum log size when creating file systems for databases. ■ Except for specifying the maximum log size and support for large files as required, use the VxFS defaults when creating file systems for databases. ■ Never disable the intent logging feature of the file system. ■ For redo logs, create a single file system using a simple (and mirrored, if necessary) volume.
Setting up databases Creating a VxFS file system Usage notes ■ See the mkfs(1M) and mkfs_vxfs(1M) manual pages for more information about the options and variables available for use with the mkfs command. ■ See the mount(1M) and mount_vxfs(1M) manual pages for more information about mount settings.
58 Setting up databases Creating a VxFS file system You can now mount the newly created file system. See “Mounting a file system ” on page 59. Large file system and large file support In conjunction with VxVM, VxFS can support file systems up to 8 exabytes in size. For large database configurations, this eliminates the need to use multiple file systems because of the size limitations of the underlying physical devices.
Setting up databases Mounting a file system ■ fsapadm - VxFS allocation policy administration utility ■ fsvoladm - VxFS device administration utility See the Veritas File System Administrator's Guide. Mounting a file system After creating a VxFS file system, mount the file system using the mount command. By default, the command tries to enable Quick I/O. If Quick I/O is not installed or licensed, no error messages are displayed unless you explicitly specify the mount option.
60 Setting up databases Unmounting a file system # mkdir /db01 # chown oracle:dba /db01 # /usr/sbin/mount -F vxfs -o largefiles /dev/vx/dsk/PRODdg/db01 \ /db01 If you would like /db01 to be mounted automatically after rebooting, add an entry for it in /etc/fstab as follows: /dev/vx/dsk/PRODdg/db01 /db01 vxfs largefiles,qio 0 2 If you do not need to use Quick I/O files, set noqio instead of qio as one of the options.
Setting up databases About fragmentation ■ special is a block special device ■ /mount_point is the location where the file system is mounted ■ -f forcibly unmounts the mount point The following is an example of unmounting a file system: To verify that the file system /db01 is not in use and then unmount the file system: # fuser -c /db01 /db01: # umount /db01 About fragmentation When free resources are initially allocated to files in a Veritas file system, they are aligned in the most efficient order
62 Setting up databases About fragmentation As files are created and removed, the free extent map for an allocation unit changes from having one large free area to having many smaller free areas. Extent fragmentation occurs when files cannot be allocated in contiguous chunks and more extents must be referenced to access a file. In a case of extreme fragmentation, a file system may have free space that cannot be allocated.
Setting up databases About fragmentation -e Reorganizes extents. Files are reorganized to have the minimum number of extents. Note: If you specify -d and -e, directory reorganization is always completed first. -D -E Produces reports on directory and extent fragmentation, respectively. Note: If you use both -D and -E with the -d and -e options, the fragmentation reports are produced both before and after reorganization. -v Specifies verbose mode and reports reorganization activity.
64 Setting up databases Resizing a file system To defragment a file system ◆ Run the fsadm command followed by the options specifying the type and amount of defragmentation. Complete the command by specifying the mount point or raw device to identify the file system.
Setting up databases Resizing a file system Prerequisites ■ This task requires a mounted file system. You must know either the desired size or the amount of space to add to or subtract from the file system size. Usage notes ■ See the (1M) manual page. See the fsadm_vxfs(1M) manual page.
66 Setting up databases Resizing a file system Prerequisites ■ You must know the new desired size of the file system. Usage notes ■ vxresize works with VxFS, JFS (derived from VxFS), and HFS file systems only. If the file system is mounted and Online JFS (full VxFS), you can grow or shrink the size. If the file system is mounted and either Base JFS (Lite VxFS) or HFS, you cannot grow or shrink the size.
Chapter 3 Managing the SFDB repository This chapter includes the following topics: ■ About the SFDB repository ■ Runtime management tasks for the SFDB repository ■ Adding a new system to an HA configuration ■ Reconfiguring virtual IP address for repository configuration ■ Accessing an off-host repository in a non-VCS environment About the SFDB repository The Storage Foundation for Databases (SFDB) repository stores metadata information required by Storage Foundation for Oracle software.
68 Managing the SFDB repository Runtime management tasks for the SFDB repository transaction log files, yymmddxx.log. VxDBMS supports remote client access from any host in the network that has proper authorization and configuration. SFDB requires only occasional interaction outside of the initial installation and configuration of Veritas Storage Foundation for Oracle. See the Veritas Storage Foundation Installation Guide for more information on configuring the SFDB repository.
Managing the SFDB repository Runtime management tasks for the SFDB repository ■ Create and configure a schedule for automatically backing up the SFDB repository, including specifying the type of backup (full or incremental), its start time and frequency, and the destination directory for the backed up files. ■ Restore the repository from backup files. ■ Disable or enable an existing backup schedule.
70 Managing the SFDB repository Runtime management tasks for the SFDB repository Table 3-1 sfua_rept_adm command options (continued) Option Description -o space_monitor_disable Disables the free-space monitoring schedule, if one exists. -t full | incr Specifies the type of backup schedule being created, enabled , or disabled by the accompanying -o option. Specify full for a full backup or incr for an incremental backup.
Managing the SFDB repository Runtime management tasks for the SFDB repository Table 3-1 sfua_rept_adm command options (continued) Option Description -u smtp_sender Specifies the SMTP sender in whose name the warning email is emailed when the repository file system free space falls below the threshold specified by the -w option.
72 Managing the SFDB repository Adding a new system to an HA configuration ■ Check the system console for error messages received at the time the backup was scheduled. ■ Verify the existence of the proper backup files in the backup directory (specified by -m backup_dest). The type of repository backup you schedule determines which files should be found in this directory. If an incremental backup, only repository transaction log files (yymmddxx.log) are created there.
Managing the SFDB repository Reconfiguring virtual IP address for repository configuration To add a new system to the SFDB repository 1 After installing Veritas Storage Foundation for Oracle, add the new system to the cluster. See the Veritas Cluster Server User's Guide.
74 Managing the SFDB repository Accessing an off-host repository in a non-VCS environment To change the virtual IP address for a cluster environment 1 Change the IP address for the cluster. 2 Update the IP address for the repository configuration in HA environment by running the following set of commands. 3 Unconfigure the SFUA repository. # /opt/VRTSdbcom/bin/sfua_db_config -o unconfig_cluster 4 Import the repository disk group. 5 Start the repository disk volume.
Chapter 4 Using Veritas Quick I/O This chapter includes the following topics: ■ About Quick I/O ■ Creating database files as Quick I/O files using qiomkfile ■ Preallocating space for Quick I/O files using the setext command ■ Accessing regular VxFS files as Quick I/O files ■ Converting Oracle files to Quick I/O files ■ About sparse files ■ Handling Oracle temporary tablespaces and Quick I/O ■ Displaying Quick I/O status and file attributes ■ Extending a Quick I/O file ■ Using Oracle's A
76 Using Veritas Quick I/O About Quick I/O Note: Veritas recommends that you use Veritas Extension for Oracle Disk Manager. See “Setting up Veritas Extension for Oracle Disk Manager” on page 125. How Quick I/O works Veritas Quick I/O supports direct I/O and kernel asynchronous I/O and allows databases to access regular files on a VxFS file system as raw character devices. The benefits of using Quick I/O are: ■ Improved performance and processing throughput by having Quick I/O files act as raw devices.
Using Veritas Quick I/O About Quick I/O Supporting direct I/O I/O on files using read() and write() system calls typically results in data being copied twice: once between user and kernel space, and later between kernel space and disk. In contrast, I/O on raw devices is direct. That is, data is copied directly between user space and disk, saving one level of copying. As with I/O on raw devices, Quick I/O avoids extra copying.
78 Using Veritas Quick I/O About Quick I/O in OLTP throughput when using indirect extent access. In addition, this type of preallocation causes no fragmentation of the file system. You must preallocate Quick I/O files because they cannot be extended through writes using their Quick I/O interfaces. They are initially limited to the maximum size you specify at the time of creation. See “Extending a Quick I/O file” on page 94.
Using Veritas Quick I/O Creating database files as Quick I/O files using qiomkfile If you are creating a new database: ■ You can use the qiomkfile command to preallocate space for database files and make them accessible to the Quick I/O interface. See “Creating database files as Quick I/O files using qiomkfile” on page 79. ■ You can use the setext command to preallocate space for database files and create the Quick I/O files.
80 Using Veritas Quick I/O Creating database files as Quick I/O files using qiomkfile -e Extends a file by a specified amount to allow Oracle tablespace resizing. See “Extending a Quick I/O file” on page 94. -h Specifies the Oracle datafile header size. This option specifies a header that will be allocated in addition to the size specified because Oracle requires one additional database block for all its datafiles. If this option is used, the resulting file can be used as an Oracle datafile.
Using Veritas Quick I/O Creating database files as Quick I/O files using qiomkfile To create a database file as a Quick I/O file using qiomkfile 1 Create a database file using the qiomkfile command: # /opt/VRTS/bin/qiomkfile -h headersize -s file_size /mount_point/filename 2 Change the owner and group permissions on the file: # chown oracle:dba .filename # chmod 660 .filename 3 Create tablespaces on this file using SQL*Plus statements.
82 Using Veritas Quick I/O Preallocating space for Quick I/O files using the setext command Preallocating space for Quick I/O files using the setext command As an alternative to using the qiomkfile command, you can also use the VxFS setext command to preallocate space for database files. Before preallocating space with setext, make sure the following conditions have been met: Prerequisites ■ The setext command requires superuser (root) privileges.
Using Veritas Quick I/O Accessing regular VxFS files as Quick I/O files 3 Create a symbolic link to allow databases or applications access to the file using its Quick I/O interface: # ln -s .filename::cdev:vxfs: filename 4 Change the owner and group permissions on the file: # chown oracle:dba .filename # chmod 660 .filename An example to show how to access the mount point /db01, create a datafile, preallocate the space, and change the permissions: # # # # cd /db01 touch .
84 Using Veritas Quick I/O Converting Oracle files to Quick I/O files Usage notes ■ When possible, use relative path names instead of absolute path names when creating symbolic links to access regular files as Quick I/O files. Using relative path names prevents copies of the symbolic link from referring to the original file when the directory is copied. This is important if you are backing up or moving database files with a command that preserves the symbolic link.
Using Veritas Quick I/O Converting Oracle files to Quick I/O files 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. See “Creating Storage Checkpoints using dbed_ckptcreate” on page 328.
86 Using Veritas Quick I/O Converting Oracle files to Quick I/O files Usage notes ■ Converting existing database files to 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 choose one of two approaches: 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 convert them with the qio_convertdbfiles command.
Using Veritas Quick I/O Converting Oracle files to Quick I/O files -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). The following options are available for the qio_convertdbfiles command: -a Changes regular files to Quick I/O files using absolute path names.
88 Using Veritas Quick I/O Converting Oracle files to Quick I/O files 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.
Using Veritas Quick I/O Converting Oracle files to Quick I/O files 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 file2 file3 file4 file5 --> --> --> --> --> .file1::cdev:vxfs: .file2::cdev:vxfs: .file3::cdev:vxfs: .file4::cdev:vxfs: .
90 Using Veritas Quick I/O About sparse files 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: .file2::cdev:vxfs: .file3::cdev:vxfs: .file4::cdev:vxfs: .
Using Veritas Quick I/O Handling Oracle temporary tablespaces and Quick I/O So a 1TB file system can potentially store up to 2TB worth of files if there are sufficient blocks containing zeroes. Quick I/O files cannot be sparse and will always have all blocks specified allocated to them. Handling Oracle temporary tablespaces and Quick I/O You can create a new temporary tablespace using Quick I/O files.
92 Using Veritas Quick I/O Handling Oracle temporary tablespaces and Quick I/O To drop an existing temporary tablespace and recreate using Quick I/O files 1 Drop the temporary tablespace, including its contents: $ sqlplus /nolog SQL> connect / as sysdba; SQL> drop tablespace tablespace_name including contents; 2 Create a Quick I/O file on a VxFS file system: # /opt/VRTS/bin/qiomkfile -h header_size -s size \ /mount_point/filename.
Using Veritas Quick I/O Displaying Quick I/O status and file attributes 93 size 100M reuse; Tablespace created. Displaying Quick I/O status and file attributes You can obtain and display information about Quick I/O status and file attributes using various options of the ls command: -al Lists all files on a file system, including Quick I/O files and their links. -1L Shows if Quick I/O was successfully installed and enabled. -a1L Shows how a Quick I/O file name is resolved to that of a raw device.
94 Using Veritas Quick I/O Extending a Quick I/O file To determine if a datafile has been converted to Quick I/O ◆ Use the ls command as follows: $ ls -lL filename The following example shows how to determine if Quick I/O is installed and enabled: $ ls -lL dbfile crw-r--r-- 1 oracle dba crw-r--r-- 1 oracle dba 45, 1 237 0x000004 Oct 2 13:42 dbfile Oct 2 13:42 dbfile where the first character, c, indicates it is a raw character device file, and the major and minor device numbers are displayed
Using Veritas Quick I/O Extending a Quick I/O file Usage notes ■ You can also grow VxFS file systems online (provided the underlying disk or volume can be extended) using the fsadm command. You can expand the underlying volume and the filesystem with the vxresize command. ■ You must have superuser (root) privileges to resize VxFS file systems using the fsadm command. ■ See the fsadm_vxfs (1M) and qiomkfile (1M) manual pages for more information.
96 Using Veritas Quick I/O Using Oracle's AUTOEXTEND with Quick I/O files ■ 2 is the file system's mount point Extend the Quick I/O file using the qiomkfile command: $ /opt/VRTS/bin/qiomkfile -e extend_amount /mount_point/filename or $ /opt/VRTS/bin/qiomkfile -r newsize /mount_point/filename An example to show how to grow VxFS file system /db01 to 500MB and extend the emp.dbf Quick I/O file by 20MB: # /opt/VRTS/bin/fsadm -b 500M /db01 $ /opt/VRTS/bin/qiomkfile -e 20M /db01/emp.
Using Veritas Quick I/O Using Oracle's AUTOEXTEND with Quick I/O files For Quick I/O files or raw devices, AUTOEXTEND does not know how to grow the underlying Quick I/O files or devices. Therefore, the Quick I/O file size must be large enough to accommodate the new size before AUTOEXTEND can grow the datafile. You can use AUTOEXTEND with Quick I/O files in the following ways: ■ Preallocate the Quick I/O file to a size at least as big as the maximum growth size expected for this database file.
98 Using Veritas Quick I/O Recreating Quick I/O files after restoring a database To extend a Quick I/O file using qiomkfile ◆ If the datafile is running low on free blocks, use the qiomkfile command to extend the Quick I/O file: $ /opt/VRTS/bin/qiomkfile -e extend_amount \ /mount_point/filename The following example shows how to monitor the free space on the tablespace EMP on file system /db01: $ sqlplus /nolog SQL> connect / as sysdba; SQL> select * from dba_free_space where tablespace_name = ’EMP’; SQ
Using Veritas Quick I/O Disabling Quick I/O Usage notes The qio_recreate command supports only conventional Quick I/O files. ■ Refer to the qio_recreate(1M) manual page for more information. ■ To recreate Quick I/O files after recovering a database ◆ Use the qio_recreate command as follows: # /opt/VRTSdbed/bin/qio_recreate -T ora You will not see any output if the command is successful. When you run the qio_recreate command, the following actions occur: If... Then...
100 Using Veritas Quick I/O Disabling Quick I/O To disable Quick I/O 1 If the database is running, shut it down. 2 To change Quick I/O files back to regular VxFS files, run the following command from the directory containing the mkqio.dat list: $ /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: .file2::cdev:vxfs: .file3::cdev:vxfs: .file4::cdev:vxfs: .
Chapter 5 Using Veritas Cached Quick I/O This chapter includes the following topics: ■ About Cached Quick I/O ■ Enabling Cached Quick I/O on a file system ■ Determining candidates for Cached Quick I/O ■ Enabling and disabling Cached Quick I/O for individual files About Cached Quick I/O Veritas Cached Quick I/O maintains and extends the database performance benefits of Veritas Quick I/O by making more efficient use of large, unused system memory through a selective buffering mechanism.
102 Using Veritas Cached Quick I/O About Cached Quick I/O For example, consider a system configured with 12GB of physical memory, an operating system using 1GB, and a total Oracle size of 3.5GB. Unless you have other applications running on your system, the remaining 7.5GB of memory is unused. If you enable Cached Quick I/O, these remaining 7.5GB become available for caching database files. Note: You cannot allocate specific amounts of the available memory to Cached Quick I/O.
Using Veritas Cached Quick I/O Enabling Cached Quick I/O on a file system speeds up system reads by accessing the system buffer cache and avoiding disk I/O when searching for information. Having data at the cache level improves database performance in the following ways: ■ For read operations, Cached Quick I/O caches database blocks in the system buffer cache, which can reduce the number of physical I/O operations and therefore improve read performance.
104 Using Veritas Cached Quick I/O Enabling Cached Quick I/O on a file system Prerequisites ■ You must have permission to change file system behavior using the vxtunefs command to enable or disable Cached Quick I/O. By default, you need superuser (root) permissions to run the vxtunefs command, but other system users do not. Superuser (root) must specifically grant database administrators permission to use this command as follows: # chown root:dba /sbin/fs/vxfs5.0/vxtunefs # chmod 4550 /sbin/fs/vxfs5.
Using Veritas Cached Quick I/O Enabling Cached Quick I/O on a file system 105 To enable the qio_cache_enable flag for a file system ◆ Use the vxtunefs command as follows: # /sbin/fs/vxfs5.0/vxtunefs -s -o qio_cache_enable=1 / mount_point For example: # /sbin/fs/vxfs5.0/vxtunefs -s -o qio_cache_enable=1 /db02 where /db02 is a VxFS file system containing the Quick I/O files and setting the qio_cache_enable flag to “1” enables Cached Quick I/O.
106 Using Veritas Cached Quick I/O Enabling Cached Quick I/O on a file system ■ volname is the name of the volume For example: /dev/vx/dsk/PRODdg/db01 qio_cache_enable=1 /dev/vx/dsk/PRODdg/db02 qio_cache_enable=1 where /dev/vx/dsk/PRODdg/db01 is the block device on which the file system resides. The tunefstab (4) manual pages contain information on how to add tuning parameters. See the tunefstab (4) manual page.
Using Veritas Cached Quick I/O Determining candidates for Cached Quick I/O For example: # /opt/VRTS/bin/vxtunefs /db01 The vxtunefs command displays output similar to the following: Filesystem i/o parameters for /db01 read_pref_io = 2097152 read_nstream = 1 read_unit_io = 2097152 write_pref_io = 2097152 write_nstream = 1 write_unit_io = 2097152 pref_strength = 10 buf_breakup_size = 2097152 discovered_direct_iosz = 262144 max_direct_iosz = 1048576 default_indir_size = 8192 qio_cache_enable = 1 write_thrott
108 Using Veritas Cached Quick I/O Determining candidates for Cached Quick I/O following steps more than once to determine the best possible candidates for Cached Quick I/O. Before determining candidate files for Quick I/O, make sure the following conditions have been met: Prerequisites ■ You must enable Cached Quick I/O for the file systems. See “Enabling Cached Quick I/O on a file system” on page 103. Usage notes ■ See the qiostat (1M) manual page for more information.
Using Veritas Cached Quick I/O Determining candidates for Cached Quick I/O About I/O statistics The output of the qiostat command is the primary source of information to use in deciding whether to enable or disable Cached Quick I/O on specific files. Statistics are printed in two lines per object.
110 Using Veritas Cached Quick I/O Determining candidates for Cached Quick I/O Analyze the output to find out where the cache-hit ratio is above a given threshold. A cache-hit ratio above 20 percent on a file for a given application may be sufficient to justify caching on that file. For systems with larger loads, the acceptable ratio may be 30 percent or above. Cache-hit-ratio thresholds vary according to the database type and load. Using the sample output above as an example, the file /db01/system.
Using Veritas Cached Quick I/O Enabling and disabling Cached Quick I/O for individual files Other tools for analysis While the output of the qiostat command is the primary source of information to use in deciding whether to enable Cached Quick I/O on specific files, we also recommend using other tools in conjunction with qiostat. For example, benchmarking software that measures database throughput is also helpful.
112 Using Veritas Cached Quick I/O Enabling and disabling Cached Quick I/O for individual files To enable Cached Quick I/O for an individual file ◆ Use the qioadmin command to set the cache advisory to ON as follows: $ /opt/VRTS/bin/qioadmin -S filename=ON /mount_point For example, running qiostatshows the cache hit ratio for the file /db01/system.dbfreaches a level that would benefit from caching. To enable Cached Quick I/O for the file /db01/system.
Using Veritas Cached Quick I/O Enabling and disabling Cached Quick I/O for individual files To enable or disable individual file settings for Cached Quick I/O automatically after a reboot or mount ◆ Add cache advisory entries in the /etc/vx/qioadmin file as follows: device=/dev/vx/dsk// filename,OFF filename,OFF filename,OFF filename,ON For example, to make the Cached Quick I/O settings for individual files in the /db01 file system persistent, edit the /etc/vx/qioadmin file similar to
114 Using Veritas Cached Quick I/O Enabling and disabling Cached Quick I/O for individual files To display the current cache advisory settings for a file ◆ Use the qioadmin command with the -P option as follows: $ /opt/VRTS/bin/qioadmin -P filename /mount_point For example, to display the current cache advisory setting for the file cust.dbfin the /db01file system: $ /opt/VRTS/bin/qioadmin -P cust.dbf /db01 cust.
Chapter 6 Using Veritas Concurrent I/O This chapter includes the following topics: ■ About Concurrent I/O ■ Enabling and disabling Concurrent I/O About Concurrent I/O Veritas Concurrent I/O improves the performance of regular files on a VxFS file system without the need for extending namespaces and presenting the files as devices. This simplifies administrative tasks and allows databases, which do not have a sequential read/write requirement, to access files concurrently.
116 Using Veritas Concurrent I/O Enabling and disabling Concurrent I/O How Concurrent I/O works Traditionally, UNIX semantics require that read and write operations on a file occur in a serialized order. Because of this, a file system must enforce strict ordering of overlapping read and write operations. However, databases do not usually require this level of control and implement concurrency control internally, without using a file system for order enforcement.
Using Veritas Concurrent I/O Enabling and disabling Concurrent I/O 117 Enabling Concurrent I/O Because you do not need to extend name spaces and present the files as devices, you can enable Concurrent I/O on regular files. Before enabling Concurrent I/O, review the following: Prerequisites ■ To use the Concurrent I/O feature, the file system must be a VxFS file system. ■ Make sure the mount point on which you plan to mount the file system exists. ■ Make sure the DBA can access the mount point.
118 Using Veritas Concurrent I/O Enabling and disabling Concurrent I/O ■ /mount_point is the directory where the file system will be mounted. For example, to mount a file system named /datavolon a mount point named /oradata: # /usr/sbin/mount -F vxfs -o cio /dev/vx/dsk/oradg/datavol \ /oradata Disabling Concurrent I/O If you need to disable Concurrent I/O, unmount the VxFS file system and mount it again without the mount option.
Chapter 7 Using Veritas Extension for Oracle Disk Manager This chapter includes the following topics: ■ About Oracle Disk Manager ■ About Oracle Disk Manager and Oracle Managed Files ■ Setting up Veritas Extension for Oracle Disk Manager ■ How to prepare existing database storage for Oracle Disk Manager ■ Converting Quick I/O files to Oracle Disk Manager files ■ Verifying that Oracle Disk Manager is configured ■ Disabling the Oracle Disk Manager feature About Oracle Disk Manager Veritas Exte
120 Using Veritas Extension for Oracle Disk Manager About Oracle Disk Manager Oracle Disk Manager reduces administrative overhead by providing enhanced support for Oracle Managed Files. Veritas Extension for Oracle Disk Manager has Quick I/O-like capabilities, but is transparent to the user. Unlike Veritas Quick I/O, files managed using Veritas Extension for Oracle Disk Manager do not require special file naming conventions. The Oracle Disk Manager interface uses regular database files.
Using Veritas Extension for Oracle Disk Manager About Oracle Disk Manager ■ Supporting kernel asynchronous I/O ■ Supporting direct I/O and avoiding double buffering ■ Avoiding kernel write locks on database files ■ Supporting many concurrent I/Os in one system call ■ Avoiding duplicate opening of files per Oracle instance ■ Allocating contiguous datafiles About kernel asynchronous I/O support Asynchronous I/O performs non-blocking system level reads and writes, allowing the system to perform mu
122 Using Veritas Extension for Oracle Disk Manager About Oracle Disk Manager and Oracle Managed Files can be accomplished with one system call when Oracle uses the Oracle Disk Manager I/O interface. This interface reduces the number of system calls performed to accomplish the same work, reducing the number of user space/kernel space context switches. About avoiding duplicate file opens Oracle Disk Manager allows files to be opened once, providing a “file identifier.
Using Veritas Extension for Oracle Disk Manager About Oracle Disk Manager and Oracle Managed Files By default, OMF datafiles are created with auto-extend capability. This attribute reduces capacity planning associated with maintaining existing databases and implementing new applications. Due to disk fragmentation that occurs as the tablespace grows over time, database administrators have been somewhat cautious when considering auto-extensible tablespaces. Oracle Disk Manager eliminates this concern.
124 Using Veritas Extension for Oracle Disk Manager About Oracle Disk Manager and Oracle Managed Files To implement a layout that places files associated with the EMP_TABLE tablespace in a directory separate from the EMP_INDEX tablespace, use the ALTER SYSTEM statement. This example shows how OMF handles file names and storage clauses and paths. The layout allows you to think of the tablespaces as objects in a file system as opposed to a collection of datafiles.
Using Veritas Extension for Oracle Disk Manager Setting up Veritas Extension for Oracle Disk Manager -rw-r--r--rw-r--r--rw-r--r--rw-r--r-- 1 1 1 1 oracle9i oracle9i oracle9i oracle9i dba dba dba dba 806912 May 3 15:43 ora_BEahlfUX.ctl 10489856 May 3 15:43 ora_sys_undo_BEajPSVq.dbf 104861696 May 3 15:4 ora_system_BEaiFE8v.dbf 186 May 3 15:03 PROD.ora ./EMP_INDEX: total 204808 -rw-r--r-- 1 oracle9i dba 104861696 May 3 15:43 ora_emp_inde_BEakGfun.dbf .
126 Using Veritas Extension for Oracle Disk Manager Setting up Veritas Extension for Oracle Disk Manager Linking the Veritas extension for Oracle Disk Manager library into Oracle home If the Veritas extension for Oracle Disk Manager library is not linked into Oracle home, perform the following procedure. The steps vary depending on the Oracle version.
Using Veritas Extension for Oracle Disk Manager Setting up Veritas Extension for Oracle Disk Manager To link the Veritas extension for Oracle Disk Manager library into Oracle home for Oracle 10g 1 Shut down the database instance before linking the Oracle Disk Manager library. 2 Use the mv and ln commands as follows: For HP-UX PA, enter: # mv ${ORACLE_HOME}/lib/libodm10.sl \ ${ORACLE_HOME}/lib/libodm10.sl.orig # ln -s /opt/VRTSodm/lib/libodm.sl \ ${ORACLE_HOME}/lib/libodm10.
128 Using Veritas Extension for Oracle Disk Manager How to prepare existing database storage for Oracle Disk Manager To link the Veritas extension for Oracle Disk Manager library into Oracle home for Oracle9i 1 Shut down the database instance before linking the Oracle Disk Manager library. 2 Use the mv and ln commands as follows. For HP-UX PA, enter: # mv ${ORACLE_HOME}/lib/libodm9.sl \ ${ORACLE_HOME}/lib/libodm9.sl.orig # ln -s /opt/VRTSodm/lib/libodm.sl \ ${ORACLE_HOME}/lib/libodm9.
Using Veritas Extension for Oracle Disk Manager Converting Quick I/O files to Oracle Disk Manager files Converting Quick I/O files to Oracle Disk Manager files If you plan to run Veritas Storage Foundation for Oracle with Oracle9i or later, and you have been using Quick I/O files, it is recommended that you convert your Quick I/O files to regular files. This should be done after you upgrade Veritas Storage Foundation for Oracle. Note: If you are running an earlier version of Oracle (Oracle 8.
130 Using Veritas Extension for Oracle Disk Manager Verifying that Oracle Disk Manager is configured Prerequisites ■ /opt/VRTSodm/lib/libodm.sl must exist. ■ If you are using Oracle9i, $ORACLE_HOME/lib/libodm9.sl is linked to /opt/VRTSodm/lib/libodm.sl. ■ If you are using Oracle 10g, $ORACLE_HOME/lib/libodm10.sl is linked to /opt/VRTSodm/lib/libodm.sl. ■ The VRTSdbed license must be valid. ■ The VRTSodm package must be installed.
Using Veritas Extension for Oracle Disk Manager Disabling the Oracle Disk Manager feature See “Checking the database configuration environment using dbed_checkconfig” on page 322. To verify that Oracle Disk Manager is running 1 Start the Oracle database.
132 Using Veritas Extension for Oracle Disk Manager Disabling the Oracle Disk Manager feature To disable the Oracle Disk Manager feature in an Oracle instance 1 Shut down the database instance. 2 Use the rm and ln commands to remove the link to the Oracle Disk Manager Library. For HP-UX PA For Oracle 11g, enter: # rm ${ORACLE_HOME}/lib/libodm11.sl # ln -s ${ORACLE_HOME}/lib/libodmd11.sl \ ${ORACLE_HOME}/lib/libodm11.sl For Oracle 10g, enter: # rm ${ORACLE_HOME}/lib/libodm10.
Chapter 8 Using Storage Mapping This chapter includes the following topics: ■ About Storage Mapping ■ Verifying Veritas Storage Mapping setup ■ Using vxstorage_stats ■ Using dbed_analyzer ■ Oracle file mapping (ORAMAP) About Storage Mapping Storage mapping is included with Veritas Storage Foundation for Oracle Enterprise Edition. Storage mapping enables you to map datafiles, tablespaces, and tables to physical devices.
134 Using Storage Mapping Verifying Veritas Storage Mapping setup Mapping Service (VxMS), a library that assists in the development of distributed SAN applications that must share information about the physical location of files and volumes on a disk. The Veritas Storage Mapping option supports Oracle's set of storage APIs called Oracle Mapping (“ORAMAP” for short) that lets Oracle determine the mapping information for files and devices.
Using Storage Mapping Using vxstorage_stats 135 To verify that your system is using the Veritas Storage Mapping option 1 Verify that you have a license key for the Storage Mapping option. # /opt/VRTS/bin/vxlictest -n "VERITAS Mapping Services" -f \ "Found_Edi_map" Found_Edi_map feature is licensed 2 Verify that the VRTSvxmsa package is installed. # swlist VRTSvxmsa # VRTSvxmsa VRTSvxmsa.ADMIN VRTSvxmsa.LIBRARIES VRTSvxmsa.LOGGING VRTSvxmsa.PLUGINS 4.5.000.002 4.5.000.002 4.5.000.002 4.5.000.002 4.5.
136 Using Storage Mapping Using vxstorage_stats Usage notes ■ The -s option displays the file statistics for the specified file. ■ The -c count option specifies the number of times to display statistics within the interval specified by -i interval. The -i interval option specifies the interval frequency for displaying updated I/O statistics. ■ The -f filename option specifies the file to display I/O mapping and statistics for. ■ For more information, see the vxstorage_stats(1m) online manual page.
Using Storage Mapping Using vxstorage_stats TY NAME NSUB DESCRIPTION fi /oradata/system01.
138 Using Storage Mapping Using vxstorage_stats To display I/O statistics information ◆ Use the vxstorage_stats command with the -s option: $ /opt/VRTSdbed/bin/vxstorage_stats -s -f file_name For example: $ /opt/VRTSdbed/bin/vxstorage_stats -s -f \ /data/system01.dbf Output similar to the following is displayed: I/O OPERATIONS OBJECT READ I/O BLOCKS(512 byte) WRITE /data/system01.
Using Storage Mapping Using vxstorage_stats 139 To display Storage Mapping and I/O statistics information at repeated intervals ◆ Use the vxstorage_stats command with the -i interval and -c count options to display storage mapping and I/O statistics information at repeated intervals. The -i interval option specifies the interval frequency for displaying updated I/O statistics and the -c count option specifies the number of times to display statistics.
140 Using Storage Mapping Using dbed_analyzer Using dbed_analyzer This release adds table-level mapping, with which for a given table dbed_analyzer lists the disks on which it resides and the space it occupies on each disk. Use the -o sort=table option to use this enhancement. Users previously could find which tablespace resides on which disk, but with table-level mapping a user can learn on which disk a heavily-used table resides.
Using Storage Mapping Using dbed_analyzer 141 Obtaining Storage Mapping information for a list of tablespaces To obtain Storage Mapping information sorted by tablespace ◆ Use the dbed_analyzer command with the -f filename and -o sort=tbs options: $ /opt/VRTSdbed/bin/dbed_analyzer -S $ORACLE_SID -H $ORACLE_HOME \ -o sort=tbs -f filename For example, $ /opt/VRTSdbed/bin/dbed_analyzer -S PROD -H /usr1/oracle \ -o sort=tbs -f /tmp/tbsfile Output similar to the following is displayed in the file tbsfile: TA
142 Using Storage Mapping Oracle file mapping (ORAMAP) $ /opt/VRTSdbed/bin/dbed_analyzer -S PROD -H /usr1/oracle \ -o sort=disk -f /tmp/tbsfile Output similar to the following is displayed in the file tbsfile: DEVICE c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t210
Using Storage Mapping Oracle file mapping (ORAMAP) Mapping components You need to understand the mapping components in the System Global Area (SGA) and Oracle's representation of these components before you can interpret the mapping information in Oracle's dynamic performance views. The mapping information in Oracle's dynamic performance views consists of: ■ File components A mapping file component is a mapping structure describing a file.
144 Using Storage Mapping Oracle file mapping (ORAMAP) Table 8-1 Storage mapping information in Oracle dynamic performamce views View Description V$MAP_LIBRARY Contains a list of all the mapping libraries that have been dynamically loaded by the external process. V$MAP_FILE Contains a list of all the file mapping structures in the shared memory of the instance. V$MAP_FILE_EXTENT Contains a list of all the file extent mapping structures in the shared memory of the instance.
Using Storage Mapping Oracle file mapping (ORAMAP) ■ 3 The permissions for fmputl are set to -r-xr-x---. If any of these items is not set as specified, make the appropriate corrections. To verify the ORCLfmap direcotries are set up properly 1 Enter: # cd /opt/ORCLfmap # ls -ld prot1_32 prot1_64 2 Verify that both directories are owned by root and are writable only by root (have drwxr-xr-x permissions). 3 If needed, change the ownership and permissions for these directories.
146 Using Storage Mapping Oracle file mapping (ORAMAP) Accessing dynamic performance views After enabling file mapping, map Oracle datafiles with the DBMS_STORAGE_MAP package and use SQL commands to display the mapping information captured in Oracle's dynamic performance views. To access dynamic performance views 1 Confirm that the Veritas mapping library for Oracle file mapping has been enabled.
Using Storage Mapping Oracle file mapping (ORAMAP) Using Oracle Enterprise Manager Oracle Enterprise Manager is a web-based GUI for managing Oracle databases. You can use this GUI to perform a variety of administrative tasks such as creating tablespaces, tables, and indexes; managing user security; and backing up and recovering your database. You can also use Oracle Enterprise Manager to view performance and status information about your database instance.
148 Using Storage Mapping Oracle file mapping (ORAMAP) 8 Expand the objects to display their storage layout. Within the Oracle Enterprise Manager Console, you can point to an object on the screen and a description of the object is displayed in a pop-up field. If an object name or path appears truncated, point to it and the pop-up field will display the full object name and path. You can also right-click on an object and select View Details to see detailed information about the object.
Chapter 9 Using Storage Checkpoints and Storage Rollback This chapter includes the following topics: ■ About Storage Checkpoints and Storage Rollback ■ Space requirements for Storage Checkpoints ■ Performance of Storage Checkpoints ■ Storage Checkpoint allocation policies ■ Backing up and recovering the database using Storage Checkpoints ■ Cloning the Oracle instance using dbed_clonedb ■ Guidelines for Oracle recovery ■ Using the GUI to perform Storage Checkpoint-related operations About S
150 Using Storage Checkpoints and Storage Rollback About Storage Checkpoints and Storage Rollback Storage Checkpoint image is managed and available through the GUI, or the Veritas Storage Foundation command line interface (CLI). Veritas NetBackup also makes use of Storage Checkpoints to provide a very efficient Oracle backup mechanism. See the Veritas Storage Foundation for Oracle Graphical User Interface Guide. A direct application of the Storage Checkpoint facility is Storage Rollback.
Using Storage Checkpoints and Storage Rollback Space requirements for Storage Checkpoints primary file system, and less and less of the block map in the Storage Checkpoint points back to blocks on the primary file system. You can set a quota to limit how much space a file system will give to all storage checkpoints, to prevent the checkpoints from consuming all free space. See the command dbed_ckptquota for more information.
152 Using Storage Checkpoints and Storage Rollback Space requirements for Storage Checkpoints needed depends on how the Storage Checkpoints are used. Storage Checkpoints that are used to keep track of the block changes contain only file system block maps, and therefore require very little additional space (less than 1 percent of the file system size).
Using Storage Checkpoints and Storage Rollback Performance of Storage Checkpoints If you are restoring some of the files in the file system, you should first remove the data-full Storage Checkpoints that are no longer needed. If you have very limited free space on the file system, you may have to remove all data-full Storage Checkpoints in order for the restore to succeed. Always reserve free disk space for growing volumes and file systems.
154 Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies file system over multiple volumes, each volume with properties of its own. This helps administrators specify which data goes on which volume types. For more details about MVS, see Veritas Volume Manager Administrator's Guide. Setting up a storage configuration for MVS operations is a system administrator's responsibility and requires superuser (root) privileges.
Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies Once the assigned policy is deleted, the allocation for metadata and file data for subsequent requests of storage checkpoint will return to the no policy assigned state. For VxFS file systems disk layout Version 7, the volumes on the VxFS Multi-Volume File System can be either one of these types: dataonly and metadataok. Only metadataok volumes can be used to store checkpoint metadata.
156 Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies See “Creating and working with Storage Checkpoint allocation policies using dbed_ckptpolicy” on page 335. Note: You cannot administer Storage Checkpoint allocation policies through the the GUI. The following are usage notes for the dbed_ckptpolicy and dbed_ckptcreate commands: Usage notes See the dbed_ckptpolicy(1M) and dbed_ckptcreate(1M) manual pages for more information.
Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies 157 To create a Storage Checkpoint allocation policy ◆ Use the dbed_ckptpolicy command as follows: $ /opt/VRTS/bin/dbed_ckptpolicy -S ORACLE_SID \ -o create -p ckpt_policy Note: A partial policy indicates that the Storage Checkpoint allocation policy does not include all the file systems used by the database.
158 Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies The following procedure uses dbed_ckptpolicy to assign an allocation policy to an existing Storage Checkpoint. This example uses PROD as the database name and Checkpoint_1096060202 as a sample Storage Checkpoint. To assign an allocation policy to an existing Storage Checkpoint 1 Create an online Storage Checkpoint for database PROD.
Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies 159 To assign an allocation policy to a new Storage Checkpoint 1 Use dbed_ckpcreate to assign an allocation policy to a new Storage Checkpoint. $ dbed_ckptcreate -S PROD -H $ORACLE_HOME -o online \ -p ckpt_data,ckpt_metadata As a result, a Storage Checkpoint allocation policy is assigned to Checkpoint_1096060122, which is a new Storage Checkpoint.
160 Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies To display a Storage Checkpoint allocation policy ◆ Use the -o display option to list all the Storage Checkpoint allocation policies contained in the file systems used by the database. $ dbed_ckptpolicy -S FLAS11r1 -n -o display Output similar to the following is displayed: /snap_data11r1/FLAS11r1/users01.dbf /snap_data11r1/FLAS11r1/undotbs01.dbf /snap_data11r1/FLAS11r1/sysaux01.
Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies 161 To display the allocation policies assigned to a Storage Checkpoint ◆ Use the -o display -c checkpoint_xxxxxxxxx option to display the allocation policies assigned to the Storage Checkpoint.
162 Using Storage Checkpoints and Storage Rollback Storage Checkpoint allocation policies You are prompted to enter any new volumes to which you would want to assign the Storage Checkpoint allocation policy. Removing a Storage Checkpoint allocation policy If a Storage Checkpoint allocation policy no longer meets your needs, you can remove the policy.
Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints 5 Add the new volume to the volume set: # vxvset -g dgname addvol myvset new_vol 6 Add the new volume to the file system.
164 Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints To allow the easiest recovery, always keep ARCHIVELOG mode enabled, regardless of whether the database is online or offline when you create Storage Checkpoints. Verifying a Storage Checkpoint using the command line After creating a Storage Checkpoint and before using it to back up or restore a database, you can verify that the Storage Checkpoint is free of errors.
Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints 165 To verify that a Storage Checkpoint is error-free using the command line 1 Create and mount a Storage Checkpoint: $ /opt/VRTS/bin/dbed_ckptcreate -S $ORACLE_SID -H $ORACLE_HOME -o online Storage Checkpoint Checkpoint_1244189082 created.
166 Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints 3 Run the dbv tool against the datafile undotbs01.dbf $ $ORACLE_HOME/bin/dbv file=/tmp/ckptMnt/data/orcldb/undotbs01.dbf DBVERIFY: Release 11.1.0.6.0 - Production on Fri Jun 5 02:08:20 2009 Copyright (c) 1982, 2007, Oracle. All rights reserved. DBVERIFY - Verification starting : FILE = /tmp/ckptMnt/data \ orcldb/undotbs01.
Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints The following are usage notes for backing up a database with the dbed_ckptcreate command: Usage notes ■ See the dbed_ckptcreate(1M), dbed_ckptmount(1M), dbed_ckptumount(1M), tar(1), and cpio(1) manual pages for more information.
168 Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints To back up a frozen database image using the command line 1 Assuming all the database datafiles in this example reside on one VxFS file system named /db01, create a Storage Checkpoint using the dbed_ckptcreate command: $ /opt/VRTS/bin/dbed_ckptcreate -S PROD -H /oracle/product \ -o online Storage Checkpoint Checkpoint_903937870 created.
Using Storage Checkpoints and Storage Rollback Backing up and recovering the database using Storage Checkpoints Unmounting a Storage Checkpoint To unmount a Storage Checkpoint for an Oracle database, use the dbed_ckptumount command as follows: ◆ $ /opt/VRTS/bin/dbed_ckptumount -S ORACLE_SID -c CKPT_NAME \ [ -m MOUNT_POINT ] [ -h ] See the dbed_ckptumount(1M) manual page for more information.
170 Using Storage Checkpoints and Storage Rollback Cloning the Oracle instance using dbed_clonedb To recover the database using a Storage Checkpoint 1 Ensure that the affected datafiles, tablespaces, or database are offline, and use Storage Rollback to roll back any datafiles in the database that contained the table data from the Storage Checkpoint you created at 11:00 a.m.
Using Storage Checkpoints and Storage Rollback Cloning the Oracle instance using dbed_clonedb Prerequisites You must first create a Storage Checkpoint. See “Creating Storage Checkpoints using dbed_ckptcreate” on page 328. ■ You must be logged in as the database administrator. ■ Make sure you have enough space and system resources to create a clone database on your system. ■ A clone database takes up as much memory and machine resources as the primary database.
172 Using Storage Checkpoints and Storage Rollback Cloning the Oracle instance using dbed_clonedb Table 9-1 dbed_clonedb command options (continued) Option Description -d Used with the -o umount option. If the -d option is specified, the Storage Checkpoint used to create the clone database will be removed along with the clone database.
Using Storage Checkpoints and Storage Rollback Cloning the Oracle instance using dbed_clonedb 173 Found archive log destination at /snap_arch11r1/FLAS11r1. The latest archive log(s) must now be applied. To apply the logs, open a new window and perform the following steps: 1. You must copy required archive log(s) from primary to clone: Primary archive logs in /snap_arch11r1/FLAS11r1 Clone archive logs expected in /tmp/test2cln/snap_arch11r1/FLAS11r1. 2.
174 Using Storage Checkpoints and Storage Rollback Guidelines for Oracle recovery About to start up new database and begin reconfiguration. Database test1cln is being reconfigured. Did not see error regarding database name. Starting automatic database recovery. Shutting down clone database. Altering clone database archive log directory. Updating log_archive_dest in clone database init file. Found archive log destination at /snap_arch11r1/FLAS11r1. Mounting clone database.
Using Storage Checkpoints and Storage Rollback Guidelines for Oracle recovery ■ Back up all control files before Storage Rollback in case the subsequent Oracle recovery is not successful. Oracle recommends that you keep at least two copies of the control files for each Oracle database and that you store the copies on different disks. It is also a good idea to back up the control files before and after making structural changes to databases. ■ Make sure that the control files are not rolled back.
176 Using Storage Checkpoints and Storage Rollback Using the GUI to perform Storage Checkpoint-related operations To perform an incomplete media recovery, use one of the following: ◆ ■ RECOVER DATABASE UNTIL CANCEL; ■ RECOVER DATABASE UNTIL TIME ’yyyy-mm-dd:hh:mm:ss’; (You can confirm the time of error by checking the $ORACLE_HOME/rdbms/log/alert*.log file.
Chapter 10 Converting existing database configurations to VxFS This chapter includes the following topics: ■ About converting LVM volume groups to VxVM disk groups ■ Converting native file systems to VxFS for Oracle Disk Manager ■ Converting native file systems to VxFS with Quick I/O ■ Upgrading from earlier VxFS version layouts ■ Converting from raw devices About converting LVM volume groups to VxVM disk groups If you are currently using VxFS file systems for your database and the file systems
178 Converting existing database configurations to VxFS Converting native file systems to VxFS for Oracle Disk Manager Note: As is customary before performing any kind of conversion or upgrade, back up your database and LVM configuration information before converting LVM volume groups to VxVM disk groups. For detailed information on converting LVM volume groups, you must refer to the volume manager migration guide. See the Veritas Volume Manager Migration Guide.
Converting existing database configurations to VxFS Converting native file systems to VxFS with Quick I/O 7 Restore the backup created in step 2 to the new VxFS file system. 8 Restart the database. Converting native file systems to VxFS with Quick I/O If you are currently using file systems native to your operating system, use the procedure to upgrade each file system used by the database to a VxFS file system with Quick I/O.
180 Converting existing database configurations to VxFS Converting from raw devices Usage notes ■ The vxupgrade command lets you to upgrade the VxFS file system disk layout while the file system is mounted. See the vxupgrade(1M) manual page for more details. ■ VxFS supports four file system disk layouts: Versions 4, 5, 6, and 7.
Converting existing database configurations to VxFS Converting from raw devices To convert from raw devices to VxFS with Quick I/O 1 Create a VxFS file system using a size that is 10 percent larger than the original database or total raw device size. You can create more file systems based on your performance and availability requirements. See “Creating a VxFS file system ” on page 56. 2 Shut down the database. 3 Preallocate Quick I/O files using qiomkfile.
182 Converting existing database configurations to VxFS Converting from raw devices To convert from raw devices to regular files for ODM 1 Create a VxFS file system using a size that is 10 percent larger than the original database or total raw device size. You can create more file systems based on your performance and availability requirements. See “Creating a VxFS file system ” on page 56. 2 Shut down the database. 3 Preallocate the files for ODM using odmmkfile.
Chapter 11 Using Database Dynamic Storage Tiering This chapter includes the following topics: ■ About Database Dynamic Storage Tiering ■ Configuring Database Dynamic Storage Tiering ■ Dynamic Storage Tiering policy management ■ Running Database Dynamic Storage Tiering reports ■ Extent balancing in a database environment ■ Database Dynamic Storage Tiering use cases for Oracle About Database Dynamic Storage Tiering More and more data is being retained.
184 Using Database Dynamic Storage Tiering About Database Dynamic Storage Tiering ■ Resilience class: Each class consists of non-mirrored volumes, mirrored volumes, and n-way mirrored volumes. For example, a database is usually made up of data, an index, and logs. The data could be set up with a three-way mirror because data is critical. The index could be set up with a two-way mirror because the index is important, but can be recreated.
Using Database Dynamic Storage Tiering About Database Dynamic Storage Tiering About VxVM volume sets Volume sets allow several volumes to be represented by a single logical object. Volume sets cannot be empty. All I/O from and to the underlying volumes is directed via the I/O interfaces of the volume set. The volume set feature supports the multi-volume enhancement to Veritas File System (VxFS).
186 Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering of the StartVolumes and StopVolumes attributes are both 1, the DiskGroup agent onlines and offlines the volumes during the import and deport operations of the disk group. When using volume sets, set StartVolumes and StopVolumes attributes of the DiskGroup resource that contains the volume set to 1. If a file system is created on the volume set, use a Mount resource to mount the volume set.
Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering Because the Database Dynamic Storage Tiering commands retrieve database information from the repository, the repository must be up to date. ■ If you are using any of the Database Dynamic Storage Tiering commands in a high availability (HA) environment, the time on each system in the cluster must be synchronized.
188 Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering Table 11-1 dbdst_admin command options (continued) Option Description sweepinterval= Interval for file sweeping for file relocation. Default value is 1, which means one per day. If this value is set to 0, all scheduled sweep tasks will become unscheduled. sweeptime= Time per day for the file sweep to take place. Times are entered in 24-hour periods and should list hour: minute.
Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering 189 Note: If you do not want to change specific default values, you can omit those parameters when you run the dbdst_admin command. You only need to enter the parameters that need to be changed.
190 Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering $ /opt/VRTS/bin/dbdst_admin -S $ORACLE_SID -o addclass=FAST:\ "fast EMC array" Removing storage classes If you no longer require a specific storage class, you can remove it. You cannot remove the pre-defined storage classes (PRIMARY, SECONDARY, and BALANCE).
Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering To display existing storage classes and properties ◆ Use the dbdst_admin command as follows: $ /opt/VRTS/bin/dbdst_admin -S $ORACLE_SID -o list For example: $ /opt/VRTS/bin/dbdst_admin -S FLAS10r1 -o list TSDB Parameters for FLAS10r1 ----------------------------------Maxclass = 4 Minclass = 2 Stat-Interval = 30 Sweep Information = 22HH:0MM, Frequency = 1 Purge Information = 20HH:0MM, Frequency = 30 TSDB Storage Classes f
192 Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering Usage notes You must convert the single-volume file system on which you plan to implement Database Dynamic Storage Tiering. ■ The file system should be unmounted when you run the dbdst_convert command. ■ If the file system has n volumes, volumes 1 through n–1 will be placed in the storage class "PRIMARY" and volume n will be placed in the storage class "SECONDARY.
Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering Usage notes 193 You must convert your VxFS file system to a multi-volume file system first. ■ Storage classes must be registered using the dbdst_admin command before assigning classes to volumes. ■ The database can be online or offline.
194 Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering To display the free space on a storage class ◆ Use the dbdst_show_fs command as follows: $ /opt/VRTS/bin/dbdst_show_fs -S $ORACLE_SID -o volume \ -m mount_point For example: $ /opt/VRTS/bin/dbdst_show_fs -S FLAS10r2 -m /snap_data10r2 MAXCLASS=4 MINCLASS=2 TOTAL CLASS=3 VOLUME NAME ----------- SIZE ---- USED ---- AVAILABLE --------- CLASS=FAST datavol1 1024000 20692 1003308 CLASS=MEDIUM datavol2 4608000 22
Using Database Dynamic Storage Tiering Configuring Database Dynamic Storage Tiering Usage notes ■ 195 The database must be inactive when adding volumes to a storage class. To add a volume to a volume set ◆ Use the dbdst_addvol command as follows: $ /opt/VRTS/bin/dbdst_addvol -S $ORACLE_SID -M mount_device \ -v volume_name:class[,volume_name:class] Removing volumes from a storage class You may need to remove a volume from a volume set. To remove a volume, use the dbdst_rmvol command.
196 Using Database Dynamic Storage Tiering Dynamic Storage Tiering policy management For example: $ /opt/VRTS/bin/dbdst_fstat -S orcldb -o start /datavol/orcldb/system01.dbf $ /opt/VRTS/bin/dbdst_fstat -S ORACLE_SID -o stop -t SYSAUX $ /opt/VRTS/bin/dbdst_fstat -S ORACLE_SID -o list /opt/VRTS/bin/dbdst_fstat -S FLAS2 -o list Task Name Status ----------------------------------------Statistic Datafile ----------------------------------------------/datavol/orcldb/system01.
Using Database Dynamic Storage Tiering Dynamic Storage Tiering policy management Table 11-3 197 dbdst_file_move command options (continued) Option Description -c class[:days] Specifies the storage class to which the files should be moved. If the days option is used, the files will be moved to the class specified if they have not been accessed in the number of days specified. Do not specify days if you are using the -o datafile option. -R Removes the policy for the specified object.
198 Using Database Dynamic Storage Tiering Dynamic Storage Tiering policy management ■ tablespace indicates which tablespace to move. ■ class indicates to which class the tablespace should be moved. For example: $ /opt/VRTS/bin/dbdst_tbs_move -S FLAS10r2 -t MYTBS -c MEDIUM Assign placement policy file successful on filesystem /snap_data10r2 Begin enforcing filesystem /snap_data10r2 ...
Using Database Dynamic Storage Tiering Dynamic Storage Tiering policy management 199 Using preset policies Use the dbdst_preset_policy command to set a policy based on file name patterns before the files are created. Use the dbdst_preset_policy command as follows: $ /opt/VRTS/bin/dbdst_preset_policy -S $ORACLE_SID -d directory \ -P pattern_spec Table 11-4 shows the dbdst_preset_policy options.
200 Using Database Dynamic Storage Tiering Running Database Dynamic Storage Tiering reports For example: $ /opt/VRTS/bin/dbdst_preset_policy -S FLAS10r2 -d /snap_data10r2 \ /FLAS10r2 -P "PRIMARY=*.dbf:MEDIUM=*.log" Assign placement policy file successful on filesystem /snap_data10r2 Begin enforcing filesystem /snap_data10r2 ...
Using Database Dynamic Storage Tiering Extent balancing in a database environment To view an audit report ◆ Use the dbdst_report command as follows: $ /opt/VRTS/bin/dbdst_report -S $ORACLE_SID -o audit \ startdate=yyyy-mm-dd,enddate=yyyy-mm-dd For example, to view an audit report of changes from January 1, 2006 through March 1, 2006, use the dbdst_report command as follows: $ /opt/VRTS/bin/dbdst_report -S $ORACLE_SID -o audit \ startdate=2006-01-01,enddate=2006-03-01 AUDIT DATETIME AUDIT DESCRIPTION ----
202 Using Database Dynamic Storage Tiering Extent balancing in a database environment individual volumes that make up the LBFS and volume set be of same size and same access properties. Setting up the file system in this way provides the same benefit as striping your volumes. Use the dbdst_makelbfs command to create an LBFS file system. Note that you cannot convert an existing file system to an LBFS file system.
Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle Database Dynamic Storage Tiering use cases for Oracle Use cases were created in order to provide examples of how and why you would use Database Dynamic Storage Tiering. Migrating partitioned data and tablespaces Perhaps the simplest application of multi-tier storage to databases is relocation of individual table partitions between different placement classes as usage requirements change.
204 Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle To convert the database's file system and add volumes for use with Database Dynamic Storage Tiering ◆ Use the dbdst_convert command as follows: $ /opt/VRTS/bin/dbdst_convert -S PROD \ -M /dev/vx/dsk/oradg/oradata -v new_vol1,new_vol2,new_vol3 To classify volumes into storage classes ◆ Use the dbdst_classify command as follows: $ /opt/VRTS/bin/dbdst_classify -S PROD \ -M /dev/vx/dsk/oradg/oradata -v new_vol1
Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle product_tab, and uses underlying DST services to immediately relocate those files to the fast_storage and slow_storage placement classes respectively.
206 Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle The rapidly decaying probability of use for archive and Flashback logs suggests that regular enforcement of a placement policy that relocates them to lower-cost storage after a period of inactivity can reduce an enterprise’s average cost of online storage.
Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle To add the NEW, MEDIUM, and OLD storage classes ◆ Use the dbdst_admin command as follows: $ /opt/VRTS/bin/dbdst_admin -S PROD -o addclass=\ NEW:"EMC Storage for Production DB" $ /opt/VRTS/bin/dbdst_admin -S PROD -o addclass=\ MEDIUM:"Clarion Storage for Production DB" $ /opt/VRTS/bin/dbdst_admin -S PROD -o addclass=\ OLD:"JBOD Storage for Production DB" To convert the database's file system and add volumes for us
208 Using Database Dynamic Storage Tiering Database Dynamic Storage Tiering use cases for Oracle To define rules that periodically relocate Flashback and archive logs ◆ Use the dbdst_file_move command as follows: $ /opt/VRTS/bin/dbdst_file_move -S FLAS10r2 -o flashback -c MEDIUM:2 Assign placement policy file successful on filesystem /snap_arch10r2 Filesystem /snap_arch10r2 is scheduled to be enforced at sweeptime This relocates files in the flashback directory that have not been accessed for two days
Chapter 12 Using the Space Capacity Planning Utility for Storage Checkpoints This chapter includes the following topics: ■ About planning file system space for Storage Checkpoints ■ Starting the Storage Checkpoint Capacity Planning utility ■ Creating Capacity Planning schedules ■ Displaying Capacity Planning schedules ■ Displaying file system space usage information ■ Removing Capacity Planning schedules About planning file system space for Storage Checkpoints This is the last major release of
210 Using the Space Capacity Planning Utility for Storage Checkpoints Starting the Storage Checkpoint Capacity Planning utility which you plan to create Storage Checkpoints, and how many Storage Checkpoints you want to retain on your system at any given time.
Using the Space Capacity Planning Utility for Storage Checkpoints Creating Capacity Planning schedules To start the Storage Checkpoint Capacity Planning utility ◆ At the administrative prompt, enter: $ /opt/VRTSdbed/bin/dbed_ckptplan The Storage Checkpoint Capacity Planning utility starts up and displays the associated operations: VERITAS Storage Foundation for Oracle (ORACLE_SID 'PROD') Menu: Storage Checkpoint Capacity Planning 1 2 3 4 Create Capacity Planning Schedules Display Capacity Planning Sched
212 Using the Space Capacity Planning Utility for Storage Checkpoints Creating Capacity Planning schedules To create Capacity Planning schedules using the Capacity Planning Utility 1 From the Storage Checkpoint Capacity Planning menu, type 1 to select Create Capacity Planning Schedules: VERITAS Storage Foundation for Oracle (ORACLE_SID 'PROD') Menu: Storage Checkpoint Capacity Planning 1 2 3 4 Create Capacity Planning Schedules Display Capacity Planning Schedules Display Space Usage Information Remove
Using the Space Capacity Planning Utility for Storage Checkpoints Creating Capacity Planning schedules 3 213 Supply the schedule-creation information when prompted. When you finish entering the schedule information, the Storage Checkpoint Capacity Planning utility displays the schedule you created and lets you confirm or edit it.
214 Using the Space Capacity Planning Utility for Storage Checkpoints Displaying Capacity Planning schedules Press to confirm this schedule, 'm' to modify the schedule, or 'q' to quit. [,m,q] Press to activate this schedule, 'a' to add a new schedule, or 'q' to quit. [,a,q]? Displaying Capacity Planning schedules Use the Storage Checkpoint Capacity Planning utility to display all the Capacity Planning schedules you created.
Using the Space Capacity Planning Utility for Storage Checkpoints Displaying file system space usage information To display Capacity Planning schedules using the Capacity Planning utility ◆ From the Storage Checkpoint Capacity Planning menu, type 2 to select Display Capacity Planning Schedules: VERITAS Storage Foundation for Oracle (ORACLE_SID 'PROD') Menu: Storage Checkpoint Capacity Planning 1 2 3 4 Create Capacity Planning Schedules Display Capacity Planning Schedules Display Space Usage Information
216 Using the Space Capacity Planning Utility for Storage Checkpoints Displaying file system space usage information Before starting Storage Checkpoint Planning utility, the following conditions must be met: Usage notes ■ If a Storage Checkpoint is created using other tools and products (for example, through the command line interface using the dbed_ckptcreate command or VERITAS NetBackup), then the following will occur when a Storage Checkpoint Capacity Planning schedule is in progress: The Storage Che
Using the Space Capacity Planning Utility for Storage Checkpoints Displaying file system space usage information 3 4 Display Space Usage for All File Systems Display Space Usage by Schedule ? q x Display Help About the Current Menu Exit From Current Menu Exit From Capacity Planning Utility 217 Select Operation to Perform: 1 Select from the following operations: Display Space Usage for Displays space-usage information for the VxFS file systems the Current Instance contained in the current database ins
218 Using the Space Capacity Planning Utility for Storage Checkpoints Removing Capacity Planning schedules In addition to providing space-usage information for the current database instance's underlying file systems, Display Space Usage Information for the Current Instance shows the following information about each Storage Checkpoint it detects: Storage Checkpoint All Storage Checkpoints created by the Storage Checkpoints Capacity Planning utility are named using the following conventions: ■ Prefixed wi
Using the Space Capacity Planning Utility for Storage Checkpoints Removing Capacity Planning schedules To remove Capacity Planning schedules using the Capacity Planning Utility 219
220 Using the Space Capacity Planning Utility for Storage Checkpoints Removing Capacity Planning schedules ◆ From the Storage Checkpoint Capacity Planning menu, type 4 to select Remove Capacity Planning Schedules: VERITAS Storage Foundation for Oracle (ORACLE_SID 'PROD') Menu: Storage Checkpoint Capacity Planning 1 2 3 4 Create Capacity Planning Schedules Display Capacity Planning Schedules Display Space Usage Information Remove Capacity Planning Schedules ? q x Display Help About the Current Menu Ex
Using the Space Capacity Planning Utility for Storage Checkpoints Removing Capacity Planning schedules -- ----------- ---------- -------------1 2001-12-15 2001-12-15 Daily at at 1 a.m. Do you want to delete schedule #1? [y,n,q,?] y Do you want to remove the Storage Checkpoints created by Capacity Planning schedule #1? [y,n,q,?] (default: y) Generating the output /etc/vx/vxdba/logs/plan00001.out', please wait... Removed schedule ' 00001' successfully.
222 Using the Space Capacity Planning Utility for Storage Checkpoints Removing Capacity Planning schedules
Chapter 13 Using Database FlashSnap for backup and off-host processing This chapter includes the following topics: ■ About Veritas Database FlashSnap ■ How to plan for Database FlashSnap ■ Hosts and storage for Database FlashSnap ■ Summary of database snapshot steps ■ Creating a snapplan (dbed_vmchecksnap) ■ Validating a snapplan (dbed_vmchecksnap) ■ Displaying, copying, and removing a snapplan (dbed_vmchecksnap) ■ Creating a snapshot (dbed_vmsnap) ■ Backing up the database from snapshot
224 Using Database FlashSnap for backup and off-host processing About Veritas Database FlashSnap About Veritas Database FlashSnap Veritas Database FlashSnap is included with Veritas Database Edition Enterprise Edition. Database FlashSnap lets you capture an online image of an actively changing database at a given instant, known as a snapshot. You can perform backups and off-host processing tasks on snapshots while providing continuous availability of your critical data, with minimal interruption to users.
Using Database FlashSnap for backup and off-host processing About Veritas Database FlashSnap Typical database problems solved with Database FlashSnap Database FlashSnap is designed to enable you to use database snapshots to overcome the following types of problems encountered in enterprise database environments: ■ In many companies, there is a clear separation between the roles of system administrators and database administrators.
226 Using Database FlashSnap for backup and off-host processing About Veritas Database FlashSnap developers, system testers, and quality assurance groups with a realistic basis for testing the robustness, integrity, and performance of new applications. ■ Logical Error Recovery Logical errors caused by an administrator or an application program can compromise the integrity of a database.
Using Database FlashSnap for backup and off-host processing About Veritas Database FlashSnap on any node on either the same host or a secondary one or on both nodes if used within Oracle RAC.. A database clone can be used on a secondary host for off-host processing, including decision-support analysis and reporting, application development and testing, database backup, and logical error recovery.
228 Using Database FlashSnap for backup and off-host processing About Veritas Database FlashSnap In Oracle RAC, this command can be run on the CVM master or slave node. ■ dbed_vmclonedb (used on the primary or secondary host) Mounts and starts a clone database using snapshot volumes. It can also shut down a clone database and deport its volumes, as well as restart a clone database that has been shut down.
Using Database FlashSnap for backup and off-host processing How to plan for Database FlashSnap Note: In Oracle RAC configurations, only the online option can be used. How to plan for Database FlashSnap Before using Database FlashSnap, you must determine your intended application. You then need to make the following decisions: ■ Which snapshot mode is appropriate: online, offline, or instant? Veritas Storage Foundation for Oracle RAC uses only the online mode.
230 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap Setting up a storage configuration for Database FlashSnap operations is a system administrator's responsibility and requires superuser (root) privileges. Database FlashSnap utilities do not address setting up an appropriate storage configuration.
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap Figure 13-2 shows a two-host configuration, or the equivalent with an Oracle RAC configuration. For off-host processing applications, both the primary and secondary hosts need to share the storage in which the snapshot database is created. Both the primary and secondary hosts must be able to access the disks containing the snapshot volumes.
232 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap In addition, before attempting to use Database FlashSnap with two hosts, ensure that: ■ The versions of Veritas Storage Foundation for Oracle on the primary and secondary hosts are the same. ■ The same version of Oracle is installed on both hosts. ■ The Oracle binaries and datafiles are on different volumes and disks.
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap Prerequisites ■ You must be logged in as superuser (root). ■ The disk group must be version 110 or later. For more information on disk group versions, see the vxdg(1M) online manual page. ■ Be sure that a data change object (DCO) and a DCO log volume are associated with the volume for which you are creating the snapshot.
234 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap To create a snapshot mirror of a volume 1 Create a volume: vxassist -g diskgroup make volume_name size disk_name For example: # vxassist -g PRODdg make snapvset_1 8g data01 2 Create a DCO and enable FastResync on the volume: vxsnap -g diskgroup prepare volume_name [alloc=storage_attribute] For example: # vxsnap -g PRODdg prepare snapvset alloc="snap01" 3 Verify that a DCO and DCO log are attach
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 5 235 List the available mirrored data plex for the volume: vxprint -g diskgroup -F%name -e"pl_v_name in \"volume_name\"" For example: # vxprint -g flashdstdg16 -e"pl_v_name in\"datavol\"" 6 TY NAME pl datavol-01 sd c4t5d0-01 ASSOC datavol datavol-01 KSTATE ENABLED ENABLED LENGTH 4608000 4608000 PLOFFS 0 STATE ACTIVE - pl datavol-02 sd c4t6d2-01 datavol datavol-02 ENABLED ENABLED 4608000 46080
236 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 7 Verify that the dbed_flashsnap tag has been set on the data plex for each volume in the volume set: vxprint -g diskgroup -F%name -e"pl_v_name in \"volume_name\" \ && p2 in \"dbed_flashsnap\"" For example: # vxprint -g PRODdg -F%name -e"pl_v_name in \"snapdata\" \ && p2 in \"dbed_flashsnap\"" snapdata-02 8 Verify the disk group configuration: vxprint -g diskgroup For example: # vxprint -g PRODdg
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap To create a snapshot mirror of a volume set 1 Create a volume: vxassist -g diskgroup make volume_name size disk_name For example: # vxassist -g PRODdg make snapvset_1 8g snap01 # vxassist -g PRODdg make snapvset_2 4g snap01 2 Create a volume set for use by VxFS: vxvset -g diskgroup -t vxfs make vset_name volume_name For example: # vxvset -g PRODdg -t vxfs make snapvset snapvset_1 3 Add the volume to
238 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 5 Verify that a DCO and DCO log are attached to each volume in the volume set: vxprint -g diskgroup -F%fastresync volume_name vxprint -g diskgroup -F%hasdcolog volume_name This command returns on if a DCO and DCO log are attached to the specified volume.
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 8 Set the dbed_flashsnap tag on the break-off data plex for each volume in the volume set: vxedit -g diskgroup set putil2=dbed_flashsnap plex_name For example: # vxedit -g PRODdg set putil2=dbed_flashsnap snapvset_1-02 # vxedit -g PRODdg set putil2=dbed_flashsnap snapvset_2-02 239
240 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 9 Verify that the dbed_flashsnap tag has been set on the data plex for each volume in the volume set: vxprint -g diskgroup -F%name -e"pl_v_name in \"volume_name\" \ && p2 in \"dbed_flashsnap\"" For example: # vxprint -g PRODdg -F%name -e"pl_v_name in \"snapvset_1\" \ && p2 in \"dbed_flashsnap\"" snapvset_1-02 # vxprint -g PRODdg -F%name -e"pl_v_name in \"snapvset_2\" \ && p2 in \"dbed_flashsnap\"" sn
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 10 Verify the snapshot volume configuration: vxprint -g diskgroup For example: # vxprint -g PRODdg TY NAME ASSOC dg PRODdg PRODdg KSTATE - LENGTH - dm snap01 dm snap02 - 33483648 33483648 - ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED DISABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED DISABLED ENABLED 16777216 16777216 16777216 16777216 167772
242 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap # vxprint -g PRODdg -F%fastresync data_vol on Verify that a DCO and a DCO log are attached to the volume: # vxprint -g PRODdg -F%hasdcolog data_vol on Create a snapshot mirror of data_vol: # vxsnap -g PRODdg addmir data_vol alloc=PRODdg02 List the data plexes: # vxprint -g flashdstdg16 -e"pl_v_name in\"datavol\"" TY NAME ASSOC KSTATE LENGTH PLOFFS STATE pl datavol-01 datavol ENABLED 4608000 ACTIVE s
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap v pl sd pl sd dc v pl sd pl sd data_vol fsgen data_vol-01 data_vol PRODdg03-01 data_vol-01 data_vol-02 data_vol PRODdg02-01 data_vol-02 data_vol_dco data_vol data_vol_dcl gen data_vol_dcl-01 data_vol_dcl PRODdg01-01 data_vol_dcl-01 data_vol_dcl-02 data_vol_dcl PRODdg02-02 data_vol_dcl-02 ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED DISABLED ENABLED 4194304 4194304 4194304 4194304 41943
244 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap To upgrade an existing volume created with an earlier version of VxVM 1 Upgrade the disk group that contains the volume to a version 120 or higher before performing the remainder of this procedure.
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap 6 Use the following command on the volume to upgrade it: # vxsnap [-g diskgroup] prepare volume \ alloc="disk_name1,disk_name2" Provide two disk names to avoid overlapping the storage of the snapshot DCO plex with any other non-moving data or DCO plexes. The vxsnap prepare command automatically enables persistent FastResync on the volume and on any snapshots that are generated from it.
246 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap Reattach any snapshot volume back to the primary volume to be upgraded: # vxsnap -g PRODdg snapback SNAP-data_vol Turn off FastResync on the volume to be upgraded: # vxvol -g PRODdg set fastresync=off data_vol Disassociate and remove any older DCO object and DCO volumes: # vxassist -g PRODdg remove log data_vol logtype=dco Upgrade the volume by associating a new DCO object and DCO volume: # vxsnap
Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap pl sd v pl sd pl sd dc v pl sd pl sd data_vol-03 PRODdg02-01 data_vol-03 data_vol fsgen data_vol-01 data_vol PRODdg01-01 data_vol-01 data_vol-04 data_vol PRODdg02-03 data_vol-04 data_vol_dco data_vol data_vol_dcl gen data_vol_dcl-01 data_vol_dcl PRODdg01-02 data_vol_dcl-01 data_vol_dcl-02 data_vol_dcl PRODdg02-02 data_vol_dcl-02 DISABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENAB
248 Using Database FlashSnap for backup and off-host processing Hosts and storage for Database FlashSnap pl v pl sd pl sd dc v pl sd pl sd data_vol-03 data_vol fsgen data_vol-01 data_vol PRODdg01-01 data_vol-01 data_vol-04 data_vol PRODdg02-03 data_vol-04 data_vol_dco data_vol data_vol_dcl gen data_vol_dcl-01 data_vol_dcl PRODdg01-02 data_vol_dcl-01 data_vol_dcl-02 data_vol_dcl PRODdg02-02 data_vol_dcl-02 DISABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED ENABLED DISABLED ENABLED 4194304
Using Database FlashSnap for backup and off-host processing Summary of database snapshot steps 4 Remove the volume plexes for vxdbavol and ORACLE_HOME. # vxplex -g diskgroup -o rm dis plex_name 5 Log in as the DBA user and revalidate your snapplan. $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID -H ORACLE_HOME \ -f SNAPPLAN -o validate Summary of database snapshot steps You can use Database FlashSnap commands to create a snapshot of your entire database on the same host or on a different one.
250 Using Database FlashSnap for backup and off-host processing Summary of database snapshot steps Note: Make sure the volumes used by the database are configured properly before attempting to take a snapshot. This requires superuser (root) privileges. Anytime you change the structure of the database (for example, by adding or deleting datafiles, converting PFILE to SPFILE, or converting SPFILE to PFILE), you must run dbed_update.
Using Database FlashSnap for backup and off-host processing Summary of database snapshot steps 4 On the secondary host, use the dbed_vmclonedb command to create a clone database using the disk group deported from the primary host. The dbed_vmclonedb command imports the disk group that was deported from the primary host, recovers the snapshot volumes, mounts the file systems, recovers the database, and brings the database online. If the secondary host is different, the database name can be same.
252 Using Database FlashSnap for backup and off-host processing Summary of database snapshot steps Figure 13-3 Prerequisites for creating a snapshot of your database Determine your storage configuration Prepare hosts and storage for Database FlashSnap Create a default snapplan (dbed_vmchecksnap -o setdefaults) Change the default values? Yes Modify the snapplan No Validate the snapplan (dbed_vmchecksnap -o validate) Pass validation? No Yes Fix the error SNAPSHOT There are many actions you can
Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) Figure 13-4 Database FlashSnap process SNAPSHOT Create the snapshot volumes (dbed_vmsnap -o snapshot) Do you want to clone the database? No Yes Resynchronize the snapshot volumes? Use the clone on a secondary host? The snapshot disk group will be imported Yes Yes No Resynchronize.
254 Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) You can name a snapplan file whatever you choose. Each entry in the snapplan file is a line in parameter=argument format. Table 13-1 shows which parameters are set when using dbed_vmchecksnap to create or validate a snapplan.
Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) Table 13-1 Parameter values for dbed_vmchecksnap (continued) Parameter Value SNAPSHOT_ARCHIVE_LOG yes or no Specifies whether to create a snapshot of the archive log volumes. Specify yes to split the archive log volume mirrors and deport them to the secondary host.
256 Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) Table 13-1 Parameter values for dbed_vmchecksnap (continued) Parameter Value SNAPSHOT_PLEX_TAG Specifies the snapshot plex tag. Use this variable to specify a tag for the plexes to be snapshot. The maximum length of the plex_tag is 15 characters. The default plex tag is dbed_flashsnap. SNAPSHOT_VOL_PREFIX Specifies the snapshot volume prefix.
Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) Prerequisites Storage must be configured properly. See “Hosts and storage for Database FlashSnap ” on page 229. ■ You must be the Oracle database administrator. ■ ■ The disk group must be version 110 or later. For more information on disk group versions, see the vxdg(1M) manual page. Be sure that a DCO and DCO volume are associated with the volume for which you are creating the snapshot.
258 Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) To create a snapplan 1 Change directories to the working directory you want to store your snapplan in. $ cd /working_directory 2 Create a snapplan with default values using the dbed_vmchecksnap command: $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID \ -H ORACLE_HOME -f SNAPPLAN -o setdefaults -t host_name \ [-p PLEX_TAG] 3 Open the snapplan file in a text editor and modify it as needed.
Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -H /oracle/product/9i \ -f snap2 -o setdefaults -t host2 Snapplan snap2 for PROD. ===================================================== SNAPSHOT_VERSION=5.
260 Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) ALLOW_REVERSE_RESYNC=no SNAPSHOT_MIRROR=1 Creating multi-mirror snapshots To make Database Snapshots highly available, the snapped snapshot volume should contain more than one mirror. This makes the snapshot volumes available even if one of the mirrors gets disabled. Snapshot volumes can be mounted and the entire database snapshot is usable even if one of the mirror gets disabled.
Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) To create a multi-mirror snaphot 1 Add the second mirror and DCO log. When allocating storage for the second mirror and DCO logs, make sure the snap volumes are splittable. If snap volumes are not splittable, dbed_vmchecksnap fails with appropriate errors. # vxsnap -g dg_a addmir dg_a_vol1 alloc=dg_a03 2 Tag the newly added mirror with the same tag as that of the first mirror.
262 Using Database FlashSnap for backup and off-host processing Creating a snapplan (dbed_vmchecksnap) 3 Add the SNAPSHOT_MIRROR keyword to the snapplan. Here is a sample snapplan. In case of single disk group: SNAPSHOT_VERSION=5.
Using Database FlashSnap for backup and off-host processing Validating a snapplan (dbed_vmchecksnap) 263 SFORA dbed_vmchecksnap ERROR V-81-5677 Could not find a mandatory, primary and valid archive destination for database PROD. Please review the LOG_ARCHIVE_DEST_n parameters and check v$archive_dest.
264 Using Database FlashSnap for backup and off-host processing Validating a snapplan (dbed_vmchecksnap) To validate a snapplan 1 Change directories to the working directory your snapplan is stored in: $ cd /working_directory 2 Validate the snapplan using the dbed_vmchecksnap command: $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID \ -H ORACLE_HOME -f SNAPPLAN -o validate In an HA environment, you must modify the default snapplan, use the virtual host name defined for the resource group for the PRIMAR
Using Database FlashSnap for backup and off-host processing Validating a snapplan (dbed_vmchecksnap) Volume prodvol1 on PRODdg is ready for snapshot. Original plex and DCO log for prodvol1 is on PRODdg1. Snapshot plex and DCO log for prodvol2 is on PRODdg2. Volume prodvol2 on PRODdg is ready for snapshot. Original plex and DCO log for prodvol2 is on PRODdg1. Snapshot plex and DCO log for prodvol2 is on PRODdg2.
266 Using Database FlashSnap for backup and off-host processing Validating a snapplan (dbed_vmchecksnap) Volume prodvol2 on PRODdg2 is ready for snapshot. Original plex and DCO log for prodvol2 is on PRODdisk21. Snapshot plex and DCO log for prodvol2 is on PRODdisk22. SNAP_PRODdg2 for snapshot will include: PRODdisk21 PRODdisk22. ALLOW_REVERSE_RESYNC is no The snapplan snap1 has been created In the following example, a snapplan, snap2, is validated for a snapshot image in a two-host configuration.
Using Database FlashSnap for backup and off-host processing Displaying, copying, and removing a snapplan (dbed_vmchecksnap) The version of PRIMARY_DG-PRODdg1 is 140. SNAPSHOT_DG is SNAP_PRODdg1 The version of PRIMARY_DG-PRODdg2 is 140. SNAPSHOT_DG is SNAP_PRODdg2 SNAPSHOT_MODE is online The database is running in archivelog mode. ARCHIVELOG_DEST is /archvol SNAPSHOT_PLAN_FOR is database SNAPSHOT_ARCHIVE_LOG is yes ARCHIVELOG_DEST=/archvol is mount on /dev/vx/dsk/archdg/archvol.
268 Using Database FlashSnap for backup and off-host processing Displaying, copying, and removing a snapplan (dbed_vmchecksnap) To list all available snapplans for a specific Oracle database ◆ Use the dbed_vmchecksnap command as follows: $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID -o list In the following example, all available snapplans are listed for the database PROD.
Using Database FlashSnap for backup and off-host processing Displaying, copying, and removing a snapplan (dbed_vmchecksnap) 269 To display detailed information for a snapplan ◆ Use the dbed_vmchecksnap command as follows: $ /opt/VRTS/bin/dbed_vmchecksnap -S ORACLE_SID \ -f SNAPPLAN -o list In the following example, the snapplan snap1 is displayed. $ /opt/VRTS/bin/dbed_vmchecksnap -S FLAS11r1 -f snap1 -o list SNAPSHOT_VERSION=5.
270 Using Database FlashSnap for backup and off-host processing Creating a snapshot (dbed_vmsnap) To copy a snapplan from the repository to your current directory ◆ If you want to create a snapplan similar to an existing snapplan, you can simply create a copy of the existing snapplan and modify it. To copy a snapplan from the repository to your current directory, the snapplan must not already be present in the current directory.
Using Database FlashSnap for backup and off-host processing Creating a snapshot (dbed_vmsnap) Prerequisites Usage notes ■ You must be logged in as the Oracle database administrator. ■ You must create and validate a snapplan using dbed_vmchecksnap before you can create a snapshot image with dbed_vmsnap. ■ The dbed_vmsnap command can only be used on the primary host, or if in an Oracle RAC configuration, on the CVM master or slave node.
272 Using Database FlashSnap for backup and off-host processing Creating a snapshot (dbed_vmsnap) Note: To force snapshot creation, use the -F option. The -F option can be used after a snapshot operation has failed and the problem was fixed without using Veritas Storage Foundation for Oracle commands. (That is, the volumes were synchronized without using Veritas Storage Foundation for Oracle commands.) In this situation, the status of the snapplan will appear as unavailable for creating a snapshot.
Using Database FlashSnap for backup and off-host processing Creating a snapshot (dbed_vmsnap) /snap_arch10r2. /snap_data10r2. dbed_vmsnap ended at 2009-05-31 23:59:26 In case of multiple disk group environment: dbed_vmsnap started at 2009-05-13 08:57:09 The database is running in archivelog mode. A snapshot of ORACLE_SID FLAS10r2 is in DG SNAP_flashdg13. Snapplan ssnap2 is used for the snapshot. Oracle Database server is slpas13. A snapshot of ORACLE_SID FLAS10r2 is in DG SNAP_flashdg13_1.
274 Using Database FlashSnap for backup and off-host processing Backing up the database from snapshot volumes (dbed_vmclonedb) If -r is used in dbed_vmclonedb, make sure is created and owned by Oracle DBA. Otherwise, the following mount points need to be created and owned by Oracle DBA: dbed_vmsnap ended at 2004-04-09 23:02:58 Backing up the database from snapshot volumes (dbed_vmclonedb) Snapshots are most commonly used as a source for backing up a database.
Using Database FlashSnap for backup and off-host processing Backing up the database from snapshot volumes (dbed_vmclonedb) Figure 13-5 Example system configuration for database backup on the primary host Primary host for database Local disks Controllers c1 c2 c3 Database volumes are created on these disks c4 Disk Arrays Snapshot volumes are created on these disks Back up to disk, tape or other media by primary host Figure 13-6 shows a typical configuration when snapshot volumes are used on a sec
276 Using Database FlashSnap for backup and off-host processing Backing up the database from snapshot volumes (dbed_vmclonedb) Figure 13-6 Example system configuration for database backup on a secondary host Network Primary host for database Secondary host Local disks Local disks Controllers c1 c2 c3 Volumes created on these disks are accessed by the primary host Controllers c4 c1 Disk Arrays c2 c3 c4 Snapshot volumes created on these disks are accessed by both hosts Back up to disk, tape
Using Database FlashSnap for backup and off-host processing Backing up the database from snapshot volumes (dbed_vmclonedb) Usage notes 277 The dbed_vmclonedb command can be used on the secondary host. ■ In a single-host configuration, the primary and secondary hosts are the same. ■ In a single-host configuration, -r relocate_path is required. ■ ■ If SNAPSHOT_MODEis set to offlineor instant, a two-host configuration is required and -r relocate_path is not allowed.
278 Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) Consider the following limitations when working with Storage Checkpoints carried over from the primary database: ■ Any mounted Storage Checkpoints must be unmounted.
Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) See “Backing up the database from snapshot volumes (dbed_vmclonedb)” on page 274. You can also back up the primary database to tape using snapshot volumes. The resynchronization functionality of Database FlashSnap allows you to quickly refresh the clone database with up-to-date information from the primary database.
280 Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) Prerequisites ■ You must be logged in as the Oracle database administrator. Before you can use the dbed_vmclonedb command, review the procedure for taking a snapshot of a database, especially the steps required to validate a snapplan and to create the snapshot. See “Summary of database snapshot steps” on page 249. See “Validating a snapplan (dbed_vmchecksnap)” on page 263.
Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) To mount a database and recover it manually 1 Start and mount the clone database to allow manual database recovery: $ /opt/VRTS/bin/dbed_vmclonedb -S ORACLE_SID \ -o mountdb,new_sid=new_sid,server_name=svr_name -f SNAPPLAN \ [-H ORACLE_HOME] [-r relocate_path] 2 Recover the database manually.
282 Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) dbed_vmclonedb started at 2004-04-02 15:19:16 The snapshot status has been updated. dbed_vmclonedb ended at 2004-04-02 15:19:42 In this example, file systems are mounted without recovering the clone database. The clone database must be manually recovered before it can be used. This example is for a clone created on a secondary host.
Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) ■ new_sid specifies the ORACLE_SID for the clone database. ■ server_name=svr_name specifies the server on which the primary database resides. ■ SNAPPLAN is the name of the snapplan file. ■ ORACLE_HOME is the ORACLE_HOME setting for the ORACLE_SID database. ■ relocate_path is the name of the initial mount point for the snapshot image.
284 Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) Altering thread parameter in initclone1.ora. Database CLONE1 (SID=clone1) is running. dbed_vmclonedb ended at 2009-04-15 06:02:20 Shutting down the clone database and unmounting file systems When you are done using the clone database, you can shut it down and unmount all snapshot file systems with the dbed_vmclonedb -o umount command.
Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) 285 Restarting a clone database If the clone database is down as a result of using dbed_vmclonedb -o umount or rebooting the system, you can restart it with the -o restartdb option. Note: This option can only be used when a clone database is created successfully. If the clone database is recovered manually, -o update_status must be run to update the status before -o restartdb will work.
286 Using Database FlashSnap for backup and off-host processing Cloning a database (dbed_vmclonedb) you can then recreate any needed tempfiles on the clone database as described in the following procedure.
Using Database FlashSnap for backup and off-host processing Resynchronizing your database to the snapshot 5 In the add_tf.$ORACLE_SID.sql file, edit the sizes and default path names of the tempfiles as needed to reside on cloned volumes configured for database storage. Note: Do not run the script without first editing it because path names may not exist and the specified mount points may not contain sufficient space. 6 After you have modified the add_tf.$ORACLE_SID.
288 Using Database FlashSnap for backup and off-host processing Resynchronizing your database to the snapshot Prerequisites ■ You must be logged in as the Oracle database administrator. Before you can reverse resynchronize the snapshot image, review the database snapshot procedure and create the snapshot. ■ The mount point for the primary database must be created by and owned by the Oracle DBA user before mounting the VxFS file system.
Using Database FlashSnap for backup and off-host processing Resynchronizing your database to the snapshot 289 To abort reverse resynchronization ◆ Use the -o reverse_resync_abort option of the dbed_vmsnap command: $ /opt/VRTS/bin/dbed_vmsnap -S ORACLE_SID -f SNAPPLAN \ -o reverse_resync_abort The -o reverse_resync_abort option aborts -o reverse_resync_begin, unmounts the snapshot volumes, and mounts the original volumes back with the file systems that are configured to use the volume.
290 Using Database FlashSnap for backup and off-host processing Resynchronizing the snapshot to your database Reverse resychronization is aborted on the primary host. $ /opt/VRTS/bin/dbed_vmsnap -S PROD -f snap1 \ -o reverse_resync_abort dbed_vmsnap started at 2004-04-02 16:16:44 The option reverse_resync_abort has been completed. dbed_vmsnap ended at 2004-04-02 16:16:51 Reverse resychronization changes are committed on the primary host.
Using Database FlashSnap for backup and off-host processing Resynchronizing the snapshot to your database Prerequisites ■ You must be logged in as the Oracle database administrator. Before you can resynchronize the snapshot image, you must validate a snapplan and create the snapshot. See “Summary of database snapshot steps” on page 249. See “Validating a snapplan (dbed_vmchecksnap)” on page 263. See “Creating a snapshot (dbed_vmsnap)” on page 270.
292 Using Database FlashSnap for backup and off-host processing Removing a snapshot volume Removing a snapshot volume If a snapshot volume is no longer needed, you can remove it and free up the disk space for other uses by using the vxedit rm command. Prerequisites ■ You must be logged in as root. ■ If the volume is on a mounted file system, you must unmount it before removing the volume.
Using Database FlashSnap for backup and off-host processing Using Database FlashSnap in an HA environment Note: This HA information does not apply to using Database FlashSnap in a Veritas Storage Foundation for Oracle RAC environment.
294 Using Database FlashSnap for backup and off-host processing Using Database FlashSnap in an HA environment
Chapter 14 Using Veritas NetBackup for database backup This chapter includes the following topics: ■ About using Veritas NetBackup for backup and restore ■ Using Veritas NetBackup to backup and restore Quick I/O files ■ About using Veritas NetBackup to backup and restore Oracle Disk Manager files About using Veritas NetBackup for backup and restore Veritas NetBackup provides for high performance, online (hot) backups of databases that must be available on a 24x7 basis, as well as offline (cold) data
296 Using Veritas NetBackup for database backup Using Veritas NetBackup to backup and restore Quick I/O files same data twice. This would happen if both the link and the file it points to were included in the list of files to be backed up. A Quick I/O file consists of two components: a hidden file with the space allocated for it, and a link that points to the Quick I/O interface of the hidden file.
Using Veritas NetBackup for database backup About using Veritas NetBackup to backup and restore Oracle Disk Manager files Note: The Oracle backup and restore utility cannot be used to back up and restore Quick I/O files. Some back up software may not be able to back up and restore VxFS extent attributes. See the qio_recreate(1M) online manual page for information on how to restore missing Quick I/O files.
298 Using Veritas NetBackup for database backup About using Veritas NetBackup to backup and restore Oracle Disk Manager files
Chapter 15 Tuning for performance This chapter includes the following topics: ■ Additional documentation ■ About tuning VxVM ■ About tuning VxFS ■ About tuning Oracle databases ■ About tuning HP-UX Additional documentation Use the tuning tips and information provided in this chapter in conjunction with other more in-depth publications, such as: ■ Oracle Performance Tuning Tips & Techniques (Osborne McGraw-Hill) ■ Oracle9i Installation Guide (Oracle Corporation) ■ Oracle 10g Installation Gui
300 Tuning for performance About tuning VxVM capable of adopting reasonable defaults for all configuration parameters. On very large systems, however, there may be configurations that require additional tuning of these parameters, both for capacity and performance reasons. For more information on tuning VxVM, see the Veritas Volume Manager Administrator's Guide.
Tuning for performance About tuning VxFS TYP NAME READ WRITE READ WRITE READ WRITE vol blop 0 0 0 0 0.0 0.0 vol foobarvol 0 0 0 0 0.0 0.0 vol rootvol 73017 181735 718528 1114227 26.8 27.9 vol swapvol 13197 20252 105569 162009 25.8 397.0 vol testvol 0 0 0 0 0.0 0.0 Additional information is available on how to use the vxstat output to identify volumes that have excessive activity and how to reorganize, change to a different layout, or move these volumes.
302 Tuning for performance About tuning VxFS free space have less fragmentation and better extent allocation. Regular use of the df command to monitor free space is desirable. Full file systems may have an adverse effect on file system performance. Full file systems should therefore have some files removed or should be expanded. See the fsadm_vxfs(1M) manual page. About monitoring fragmentation Fragmentation reduces performance and availability.
Tuning for performance About tuning VxFS and running the extent fragmentation report feature of fsadm before and after the reorganization. The “before” result is the degree of fragmentation prior to the reorganization. If the degree of fragmentation approaches the percentages for bad fragmentation, reduce the interval between fsadm. If the degree of fragmentation is low, increase the interval between fsadm runs.
304 Tuning for performance About tuning VxFS write_pref_io The preferred write request size. The file system uses this parameter in conjunction with the write_nstream value to determine how to do flush behind on writes. The default value is 64K. read_nstream The number of parallel read requests of size read_pref_io that you can have outstanding at one time. The file system uses the product of read_nstream multiplied by read_pref_io to determine its read ahead size.
Tuning for performance About tuning VxFS initial_extent_ size Changes the default initial extent size. VxFS determines the size of the first extent to be allocated to the file based on the first write to a new file. Normally, the first extent is the smallest power of 2 that is larger than the size of the first write. If that power of 2 is less than 8K, the first extent allocated is 8K.
306 Tuning for performance About tuning VxFS max_seqio_extent_size Increases or decreases the maximum size of an extent. When the file system is following its default allocation policy for sequential writes to a file, it allocates an initial extent that is large enough for the first write to the file. When additional extents are allocated, they are progressively larger (the algorithm tries to double the size of the file with each new extent) so each extent can hold several writes' worth of data.
Tuning for performance About tuning VxFS write_throttle Warning: The write_throttle parameter is useful in special situations where a computer system has a combination of a lot of memory and slow storage devices. In this configuration, sync operations (such as fsync()) may take so long to complete that the system appears to hang.
308 Tuning for performance About tuning VxFS If an application is doing sequential I/O to large files, it should issue requests larger than the discovered_direct_iosz. This causes the I/O requests to be performed as discovered direct I/O requests, which are unbuffered like direct I/O but do not require synchronous inode updates when extending the file. If the file is too large to fit in the cache, then using unbuffered I/O avoids throwing useful data out of the cache and lessons CPU overhead.
Tuning for performance About tuning VxFS 309 There are three primary statistics to consider: ■ file I/O activity ■ volume I/O activity ■ raw disk I/O activity If your database is using one file system on a striped volume, you may only need to pay attention to the file I/O activity statistics. If you have more than one file system, you may need to monitor volume I/O activity as well. First, use the qiostat -r command to clear all existing statistics.
310 Tuning for performance About tuning VxFS File I/O statistics help identify files with an unusually large number of operations or excessive read or write times. When this happens, try moving the “hot” files or busy file systems to different disks or changing the layout to balance the I/O load. Mon May 11 16:21:20 2015 /db/dbfile01 813 0 813 0 0.3 0.0 /db/dbfile02 0 813 0 813 0.0 5.5 /db/dbfile01 816 0 816 0 0.3 0.0 /db/dbfile02 0 816 0 816 0.0 5.
Tuning for performance About tuning VxFS To obtain i/o statistics ◆ Use the odmstat command as follows: # /opt/VRTS/bin/odmstat -i 5 /mnt/odmfile* For example: # /opt/VRTS/bin/odmstat -i 5 /db/odmfile* OPERATIONS FILE NAME FILE BLOCKS AVG TIME(ms) READ WRITE READ WRITE READ WRITE /db/cust.dbf 0 0 0 0 0.0 0.0 /db/system.dbf 0 0 0 0 0.0 0.0 371 0 371 0 0.2 0.0 0 371 0 371 0.0 5.7 813 0 813 0 0.3 0.0 0 813 0 813 0.0 5.5 816 0 816 0 0.3 0.
312 Tuning for performance About tuning Oracle databases time that I/O spends on the disk, and the queueing time is how long it waits for all of the other I/Os ahead of it. At the volume level or the file system level, there is no queueing, so vxstat and qiostat do not show queueing time. For example, if you send 100 I/Os at the same time and each takes 10 milliseconds, the disk reports an average of 10 milliseconds of service and 490 milliseconds of queueing time.
Tuning for performance About tuning Oracle databases ■ If you are using ODM on Oracle9, you do not need to change any init.ora parameters. Your Oracle Installation Guide provides detailed instructions on implementing asynchronous I/O on your system. Tuning buffer cache The UNIX buffer cache plays an important role in performance when using HFS or JFS in buffered I/O mode. When using Quick I/O, however, the database cache must be tuned as if raw devices are being used.
314 Tuning for performance About tuning HP-UX pref_strength = 10 buf_breakup_size = 131072 discovered_direct_iosz = 262144 max_direct_iosz = 2097152 default_indir_size = 8192 Setting slave parameters Quick I/O and ODM provide support for kernel asynchronous I/O, eliminating the need for multiple logwriter slaves or database writer slaves. This parameter is set to by default. It is not necessary to set the DBWR_IO_SLAVES settings if you are using Quick I/O.
Tuning for performance About tuning HP-UX max_thread_proc This parameter sets the maximum number of threads that a process can create. The high performance of VxFS and the Quick I/O driver depend on the value of this tunable. Set the max_thread_proc parameter to 1200. asyncdsk, asyncdsk_included, and max_async_ports These parameters are used for including and configuring the asynchronous I/O driver in the HP-UX kernel, resulting in less I/O overhead and higher throughput.
316 Tuning for performance About tuning HP-UX semmns This parameter sets the maximum number of semaphores in the system. The semmns parameter may need to be set higher for a large database. See your HP-UX and Oracle documentation for the recommended value.
Appendix A Veritas Storage Foundation for Oracle Command Line Interface This appendix includes the following topics: ■ Overview of commands ■ About the command line interface Overview of commands Veritas Storage Foundation for Oracle provides a command line interface (CLI) to many key operations also supplied from within the GUI application. The command line interface lets you incorporate command operations into scripts and other administrative processes.
318 Veritas Storage Foundation for Oracle Command Line Interface Overview of commands Warning: Unless explicitly stated, commands are not supported by Veritas Storage Foundation for Oracle RAC. Table A-1 summarizes the commands available to you from the command line. Table A-1 Veritas Storage Foundation for Oracle commands Command Description dbed_update Updates the SFDB repository in Veritas Storage Foundation for Oracle. This command is supported by Veritas Storage Foundation for Oracle RAC.
Veritas Storage Foundation for Oracle Command Line Interface Overview of commands Table A-1 Veritas Storage Foundation for Oracle commands (continued) Command Description dbed_ckptremove Removes a Storage Checkpoint for an Oracle database. This command is supported by Veritas Storage Foundation for Oracle RAC. dbed_ckptrollback This command is supported by Veritas Storage Foundation for Oracle RAC. dbed_ckptumount Rolls back an Oracle database to a Storage Checkpoint point-in-time image.
320 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-1 Veritas Storage Foundation for Oracle commands (continued) Command Description Creates a snapshot image of an Oracle database by splitting the mirror volumes used by the database. You can also use This command is supported this command to resynchronize the snapshot image back by Veritas Storage to the current database. The command also allows you to Foundation for Oracle RAC.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Updating the repository using dbed_update You can use the dbed_update command to update the repository. Any time you change the structure of the database (for example, by adding or deleting datafiles, converting PFILE to SPFILE, or converting SPFILE to PFILE), you must run dbed_update.
322 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Checking the database configuration environment using dbed_checkconfig You can use the command to verify and report on the database environment from the command line.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface write_pref_io = 2097152 write_nstream = 1 write_unit_io = 2097152 pref_strength = 10 buf_breakup_size = 2097152 discovered_direct_iosz = 262144 max_direct_iosz = 1048576 default_indir_size = 8192 qio_cache_enable = 0 write_throttle = 0 max_diskq = 33554432 initial_extent_size = 8 max_seqio_extent_size = 2048 max_buf_data_size = 8192 hsm_write_prealloc = 0 read_ahead = 1 inode_aging_size = 0 inode_aging_count = 0 f
324 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Total of 3 control files over 1 file systems. SFORA dbed_checkconfig WARNING V-81-3122 Control files are not spread over multiple file systems. Spread control files over multiple file systems for better redundancy. Examining Oracle automatic extension of datafiles. Total of 1009 datafiles are configured to auto extend. Total of 1015 datafiles are defined to the database. Examining Oracle log modes.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface read_unit_io = 2097152 write_pref_io = 2097152 write_nstream = 1 write_unit_io = 2097152 pref_strength = 10 buf_breakup_size = 2097152 discovered_direct_iosz = 262144 max_direct_iosz = 1048576 default_indir_size = 8192 qio_cache_enable = 0 write_throttle = 0 max_diskq = 33554432 initial_extent_size = 8 max_seqio_extent_size = 2048 max_buf_data_size = 8192 hsm_write_prealloc = 0 read_ahead = 1 inode_aging_size = 0
326 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface /snap_data11r1. SFORA dbed_checkconfig WARNING V-81-999 Control file is on a VxVM volume set Total of 3 control files over 1 file systems. SFORA dbed_checkconfig WARNING V-81-3122 Control files are not spread over multiple file systems. Spread control files over multiple file systems for better redundancy. Examining Oracle automatic extension of datafiles.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes The dbed_saveconfig command is used to collect and record configuration information on the database, Symantec products, and system hardware. Information is gathered in the context of a specified database. The utility attempts to gather enough information to allow an administrator to reconstruct a system and database from scratch, in the case of a complete system failure.
328 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Creating Storage Checkpoints using dbed_ckptcreate You can use the dbed_ckptcreate command to create a Storage Checkpoint from the command line. Storage Checkpoints can be either online, offline, or instant. By default, Storage Checkpoints are offline. If online is specified, the database is put into hot-backup mode when the Storage Checkpoint is created.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To create Storage Checkpoints while the database is offline ◆ Use the dbed_ckptcreate command as follows: $ /opt/VRTS/bin/dbed_ckptcreate -S PROD \ -H /oracle/product/9i -o offline Storage Checkpoint Checkpoint_971672044 created. The default option is online.
330 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes Although dbed_ckptcreate is supported by Veritas Storage Foundation for Oracle RAC, this feature is not supported.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 331 Displaying Storage Checkpoints using dbed_ckptdisplay You can use the dbed_ckptdisplay command to display the Storage Checkpoints associated with an Oracle database from the command line. You can also use it to display fileset quota values.
332 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To display other Storage Checkpoints ◆ Use the dbed_ckptdisplay command as follows: $ /opt/VRTS/bin/dbed_ckptdisplay -S PROD \ -H /oracle/product/9i -o other Storage Checkpoint ---------------------------------NetBackup_incr_PROD_955133480 NetBackup_full_PROD_9551329 52 Creator ------NBU NBU Location -------/db01 /db01 To display other Storage Checkpoints without updating the repository ◆ Use the dbed_ck
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 333 To display all Storage Checkpoints without updating the repository ◆ Use the dbed_ckptdisplay command as follows: $ /opt/VRTS/bin/dbed_ckptdisplay -S PROD \ -H /oracle/product/9i -o all -n Checkpoint_971672042 Sun May 15 13:55:53 2005 C+R+IN Checkpoint_903937870 Fri May 13 22:51:10 2005 C+R+ON Checkpoint_901426272 Wed May 11 16:17:52 2005 P+R+ON NetBackup_incr_PROD_955133480 NetBackup_full_PROD_9551
334 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes ■ ■ ■ ■ ■ ■ ■ This command is supported by Veritas Storage Foundation for Oracle RAC. The dbed_ckptmount command is used to mount a Storage Checkpoint into the file system namespace. Mounted Storage Checkpoints appear as any other file system on the machine and can be accessed using all normal file system based commands. Storage Checkpoints can be mounted as read-only or read-write.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes This command is supported by Veritas Storage Foundation for Oracle RAC. ■ The dbed_ckptumount command is used to unmount a mounted Storage Checkpoint from the file system namespace. Mounted Storage Checkpoints appear as any other file system on the machine and can be accessed using all normal file system based commands. When mounted Storage Checkpoints are not required, they can be unmounted.
336 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes ■ ■ ■ ■ ■ ■ The dbed_ckptpolicy command can be used on file systems using disk layout Version 6 and beyond. The VxVM volume set and VxFS Multi-Volume File System features must be enabled to use Storage Checkpoint allocation policies.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 337 To display Storage Checkpoint allocation policy within the database ◆ Use the dbed_ckptpolicy command as follows: $ /opt/VRTS/bin/dbed_ckptpolicy -S ORACLE_SID \ -n -o display [-c storage_ckpt | -p ckpt_policy] If -p ckpt_policy and -c storage_ckpt options are not specified, output similar to the following is displayed: Policy Name -------------------ckpt ckpt_data ckpt_metadata new_ckpt ckpt_sample File S
338 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To update a Storage Checkpoint allocation policy ◆ Use the dbed_ckptpolicy command as follows: $ /opt/VRTS/bin/dbed_ckptpolicy -S ORACLE_SID \ -n -o update -p ckpt_policy Output similar to the following is displayed: File System: /mvsfs/v2 (MVS volumes: mvsv4,mvsv5) Policy: ckpt_sample (MVS volumes: mvsv4) Please enter the volume name(s), separated by space, for the policy ckpt_sample [skip,quit]: mvsv5 Fil
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Prerequisites Usage notes ■ You must be logged on as the database administrator (typically, the user ID oracle). ■ The repository entry for the database must exist and the DBA must be the owner of all file systems to be affected. ■ See the dbed_ckptquota(1M) manual page for more information.
340 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To display quota values for all file systems in the database ◆ Use the dbed_ckptquota command as follows: $ /opt/VRTS/bin/dbed_ckptquota -S PROD -H /ora10i \ -o display Filesystem Hardlimit Softlimit CurrentUse /ora/prod 50000 40000 136 /ora/testvol01 25000 20000 128 /ora/testvol02 50000 40000 128 /ora/testvol03 50000 40000 0 /ora/testvol04 25000 20000 128 /ora/testvol05 50000 40000
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes This command is supported by Veritas Storage Foundation for Oracle RAC. ■ The dbed_ckptrollback command rolls an Oracle database back to a specified Storage Checkpoint. You can perform a Storage Rollback for the entire database, a specific tablespace, or list of datafiles. Database rollback for the entire database requires that the database be inactive before Storage Rollback commences.
342 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To rollback datafiles to a Storage Checkpoint ◆ Use the dbed_ckptrollback command with the -F option as follows: $ /opt/VRTS/bin/dbed_ckptrollback -S PROD -H /oracle/product/9i\ -F /share/oradata1/data01.dbf /share/oradata2/index01.dbf \ -c Checkpoint_903937870 If the Oracle database is running, you must take the datafile offline before running this command. If the datafile is online, the command will fail.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Before using dbed_ckptplan to manage the Capacity Planning utility, note the following: ■ The dbed_ckptplan command is used to obtain estimates on space usage for Storage Checkpoints. It obtains estimates by managing scheduled Storage Checkpoint creation and summarizing statistics from these Storage Checkpoints.
344 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface started as a single instance on the node on which the dbed_clonedb command is executed. You have the option to manually or automatically recover the database when using the dbed_clonedb command: ■ Manual (interactive) recovery, which requires using the -i option, of the clone database allows the user to control the degree of recovery by specifying which archive log files are to be replayed.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-3 dbed_clonedb command options Option Description -S CLONE_SID Specifies the name of the new Oracle SID, which will be the name of the new database instance. -m MOUNT_POINT Indicates the new mount point of the Storage Checkpoint. -c CKPT_NAME Indicates the name of the Storage Checkpoint. -i Runs the command in interactive mode where you must respond to prompts by the system.
346 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface About to start up new database and begin reconfiguration. Database test2cln is being reconfigured. Did not see error regarding database name. Altering clone database archive log directory. Updating log_archive_dest in clone database init file. Found archive log destination at /snap_arch11r1/FLAS11r1. The latest archive log(s) must now be applied.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 347 Updating log_archive_dest in clone database init file. Found archive log destination at /snap_arch11r1/FLAS11r1. Mounting clone database. Resetting logs on new database test1cln. The sql script for adding tempfiles to test1cln is at /tmp/add_tf.test1cln. Database instance test1cln is up and running.
348 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Snapplan parameters When using dbed_vmchecksnap -o setdefaults option to create the snapplan, the following parameters are set: Table A-4 Snapplan parameters Parameter Value SNAPSHOT_VERSION Specifies the snapshot version for this release of Veritas Storage Foundation for Oracle PRIMARY_HOST Specifies the name of the host where the primary database resides.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-4 Snapplan parameters (continued) Parameter Value ARCHIVELOG_DEST Specifies the full path of the archive logs. There are several archive log destinations that can be used for database recovery if you are multiplexing the archive logs. You must specify which archive log destination to use. It is recommended that you have the archive log destination on a separate volume if SNAPSHOT_ARCHIVE_LOG is yes .
350 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-4 Snapplan parameters (continued) Parameter Value SNAPSHOT_MODE online or offline or instant Specifies whether the database snapshot should be online, offline, or instant. Only online snapshot mode is supported by Veritas Storage Foundation for Oracle RAC. If the snapshot is created while the database is online, the dbed_vmsnap command will put the tablespaces into backup mode.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-4 Snapplan parameters (continued) Parameter Value ALLOW_REVERSE_RESYNC yes or no By default, reverse resynchronization is off (set equal to no). If it is set to yes, this parameter allows you to restore the original volume from a snapshot. The original database, however, must be down for this operation. In a Veritas Storage Foundation for Oracle RAC environment, this parameter must be set to no.
352 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes ■ ■ ■ ■ ■ ■ ■ This command is supported by Veritas Storage Foundation for Oracle RAC. In a Veritas Storage Foundation for Oracle RAC environment, the snapplan can be created on any node within the Oracle RAC cluster; the -o validate option can be run on the Veritas Volume Manager CVM master or slave node.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-5 Options for creating a snapplan (continued) Option Description -o validate Validates each parameter in the snapplan and checks whether the snapshot volumes have been configured correctly for creating snapshots, and copies the snapplan to the repository. -o list Lists all the snapplans associated with a specific $ORACLE_SID.
354 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface SNAPSHOT_PLAN_FOR=database SNAPSHOT_PLEX_TAG=dbed_flashsnap SNAPSHOT_DG_PREFIX=SNAP_ SNAPSHOT_VOL_PREFIX=SNAP_ ALLOW_REVERSE_RESYNC=no SNAPSHOT_MIRROR=1 To create a snapplan and set the default values in a two-host configuration ◆ Use the dbed_vmchecksnap command as follows: $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD \ -H /oracle/product/9i -f snap2 -o setdefaults -t host2 Warning: This procedure does not ap
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To validate a snapplan for a snapshot image to be used on the primary host (single instance Oracle) ◆ Use the dbed_vmchecksnap command as follows: $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -H /oracle/product/9i \ -f snap1 -o validate PRIMARY_HOST is host1 SECONDARY_HOST is host1 The version of PRIMARY_DG-PRODdg is 110. SNAPSHOT_DG is SNAP_PRODdg SNAPSHOT_MODE is online The database is running in archivelog mode.
356 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Examining Oracle volume and disk layout for snapshot Volume prod_db on PRODdg is ready for snapshot. Original plex and DCO log for prod_db is on PRODdg01. Snapshot plex and DCO log for prod_db is on PRODdg02. SNAP_PRODdg for snapshot will include: PRODdg02 ALLOW_REVERSE_RESYNC is no The snapplan snap1 has been created.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To list all available snapplans for a specific Oracle database ◆ Use the dbed_vmchecksnap command as follows: $ /opt/VRTS/bin/dbed_vmchecksnap -S PROD -o list The following snapplan(s) are available for PROD: SNAP_PLAN SNAP_STATUS DB_STATUS SNAP_READY snap1 init_full - yes snap2 init_full - yes snap3 init_full - yes The command output displays all available snapplans, their snapshot status (SNAP_S
358 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface STATUS_INFO SNAP_STATUS=init_full Copying or removing a snapplan using dbed_vmchecksnap The dbed_vmchecksnap command allows you to copy or remove snapplans.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes ■ ■ ■ ■ ■ ■ Creating and resynchronizing a database are supported by Veritas Storage Foundation for Oracle RAC. Reverse resynchronization is not supported. The dbed_vmsnap command can only be used on the primary host. In an Oracle RAC environment, the dbed_vmsnap command can only be used on the Veritas Volume Manager CVM volume.
360 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-6 dbed_vmsnap command options (continued) Option Description -o Commits the reverse resynchronization changes after you reverse_resync_commit have verified that they are acceptable. Not supported by Veritas Storage Foundation for Oracle RAC. -o reverse_resync_abort Aborts reverse resynchronization and mounts the original volumes back with the file systems that are configured to use the volume.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To create a snaphsot image on the CVM master node (Oracle RAC) ◆ Use the dbed_vmsnap command as follows: $ /opt/VRTS/bin/dbed_vmsnap -S PROD -f snap1 -o snapshot dbed_vmsnap started at 2005-04-02 14:15:27 The database is running in archivelog mode. A snapshot of ORACLE_SID PROD is in DG SNAP_PRODdg. Snapplan snap1 is used for the snapshot. Oracle Database server is orasvr.
362 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To resynchronize your database to a snapshot ◆ Assuming the mount point for the primary database was created and owned by the Oracle DBA user before mounting the VxFS file system, use the dbed_vmsnapcommand as follows: $ dbed_vmsnap -S FLAS10r1 -f snaptst \ -o reverse_resync_begin dbed_vmsnap started at 2009-07-30 14:06:38 SFORA dbed_vmsnap WARNING V-81-5725 After reverse_resync_commit is performed, you nee
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 363 To commit reverse resynchronization changes ◆ Use the dbed_vmsnap command as follows: Warning: Upon completion of reverse resynchronization, the content of the original database is discarded. Storage Checkpoints taken on either the original database or the clone database before or after the snapshot was created are discarded. Storage Checkpoints taken before the snapshot was created are preserved.
364 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Prerequisites ■ You must be logged in as the Oracle database administrator to use dbed_vmclonedb command. Before you can use the dbed_vmclonedb command, you must create and validate a snapplan and create a snapshot. ■ The volume snapshot must contain the entire database. ■ The system administrator must provide the database administrator with access to the necessary volumes and mount points.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-7 dbed_vmclonedb options Option Description -S ORACLE_SID For Veritas Storage Foundation for Oracle, specifies the ORACLE_SID, which is the name of the Oracle database instance, for which a snapshot image will be created. For Veritas Storage Foundation for Oracle RAC, specifies the ORACLE_SID, which is the name of the Oracle database instance where the Veritas Volume Manager CVM master node resides.
366 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-7 dbed_vmclonedb options (continued) Option Description -r relocate_path Specifies the initial mount point for the snapshot image. If you are creating a clone in a single-host configuration or cloning an Oracle RAC database, -r is required. Otherwise, it is an optional argument.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To clone the primary database on a secondary host automatically in a two-host configuration ◆ Use the dbed_vmclonedb command as follows: $ /opt/VRTS/bin/dbed_vmclonedb -S PROD \ -o recoverdb,new_sid=NEWPROD,server_name=orasvr -f snap2 dbed_vmclonedb started at 2009-05-26 09:29:39 Editing remote_login_passwordfile in initclone1.ora. All redo-log files found. Altering instance_name parameter in initclone1.ora.
368 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 3 Follow the Oracle recovery procedure to recover the database manually. 4 Update the snapshot status (database_recovered) for the clone database on the primary host after manual recovery has been completed. $ /opt/VRTS/bin/dbed_vmclonedb -o update_status,new_sid=NEWPROD,server_name=orasvr -f snap1 -r /clone dbed_vmclonedb started at 2004-04-02 15:19:16 The snapshot status has been updated.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 3 Follow the Oracle recovery procedure to recover the database manually. 4 Update the snapshot status (database_recovered) for the clone database on the secondary host after manual recovery has been completed. $ /opt/VRTS/bin/dbed_vmclonedb -o \ update_status,new_sid=NEWPROD,server_name=orasvr -f snap2 dbed_vmclonedb started at 2004-04-06 09:22:27 The snapshot status has been updated.
370 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To shut down the clone database and unmount all snapshot file systems in a two-host configuration ◆ Use the dbed_vmclonedb command as follows: $ /opt/VRTS/bin/dbed_vmclonedb -o umount,new_sid=NEWPROD,\ server_name=orasvr -f snap2 dbed_vmclonedb started at 2004-04-09 23:09:21 Umounting /clone/arch. Umounting /clone/prod_db.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To restart a clone database in a two-host configuration ◆ Use the dbed_vmclonedb command as follows: $ /opt/VRTS/bin/dbed_vmclonedb -S PROD \ -o restartdb,new_sid=NEWPROD,server_name=orasvr -f snap2 dbed_vmclonedb started at 2003-04-09 23:03:40 Oracle instance NEWPROD successfully started.
372 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-8 edgetmsg2 options (continued) Option Description -M msgid[:severity] Specifies the message ID and severity to be printed. -f msg_catalog | logfile | log_directory Specifies the message catalogue path, log file, or log directory. -v severity | severity Overwrites the minimum log severity or creates a severity filter. The severity values are either 0-8 or 100-108.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To read a message log file ◆ Use the edgetmsg2 command as follows: $ /opt/VRTS/bin/edgetmsg2 -o list[,suppress_time] \ -S ORACLE_SID | [-f logfile] \ [-v severity] [-t from_time,to_time] To list available log files ◆ Use the edgetmsg2 command as follows: $ /opt/VRTS/bin/edgetmsg2 -o report[,no_archive] \ [-f log_directory] Displaying I/O mapping and statistics using vxstorage_stats You can use the vxstorage_st
374 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To display I/O mapping information ◆ Use the vxstorage_stats command with the -m option as follows: $ /opt/VRTS/bin/vxstorage_stats -m -f \ /oradata/system01.dbf For file type (fi), the SIZE column is number of bytes, and for volume (v), plex (pl), sub-disk (sd), and physical disk (da), the SIZE column is in 512-byte blocks. Stripe sizes are given in sectors.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Mapping tablespaces to disks using dbed_analyzer The dbed_analyzer command provides tablespace-to-physical disk mapping information for all the datafiles in a specified database. In addition, dbed_analyzerprovides information about the percentage of disk space being used by a tablespace. Because the dbed_analyzer command output can be long, it is written to a file for easier viewing.
376 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To obtain storage mapping information sorted by tablespace ◆ Use the dbed_analyzercommand with the -f filenameand -o sort=tbs options: $ /opt/VRTS/bin/dbed_analyzer -S $ORACLE_SID -H $ORACLE_HOME \ -o sort=tbs -f filename Output similar to the following is displayed in the file filename: TBSNAME SYSTEM TEMP TEMP SYSAUX ITEM ITM_IDX PRODID_IDX QTY_IDX ROLL_1 ROLL_2 ORDERS ORD_IDX TY_IDX ITM_IDX ROLL_1 QTY_ID
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 377 To obtain storage mapping information sorted by disk ◆ Use the dbed_analyzer command with the -f filename and -o sort=disk options: $ /opt/VRTS/bin/dbed_analyzer -S $ORACLE_SID -H $ORACLE_HOME -o \ sort=disk -f filename Output similar to the following is displayed in the file filename: DEVICE c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t21000020379DBD5Fd0 c3t210
378 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Prerequisites ■ An Oracle database must be up and running. ■ Run the dbed_update command before running any of the Database Dynamic Storage Tiering commands. You should also run the dbed_update command if any of the database files change. Because the Database Dynamic Storage Tiering commands retrieve database information from the repository, the repository must be up to date.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-11 Oracle dbdst_admin command options (continued) Option Description sweeptime= Time per day for the file sweep to take place. Times are entered in 24-hour periods and should list hour: minute. For example, 8:30 AM is represented as 08:30 and 10:00 PM is represented as 22:00. Default value is 22:00. statinterval= Interval in minutes for gathering file statistics.
380 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To define database parameters ◆ Use the dbdst_admin command as follows: $ /opt/VRTS/bin/dbdst_admin -S ORACLE_SID-o setup-parameters,\ [storage_class operations] setup-parameters maxclass=number,minclass=number,statinterval=minutes,\ sweeptime=HH:MM,sweepinterval=days purgetime=HH:MM,purgeinterval=days storage_class operations addclass=classname:"description", rmclass=classname definechunk=classname:128k | 2
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface For example, to remove a storage class called "SLOW," use the dbdst_admin command as follows: $dbdst_admin -S FLAS11r1 -o rmclass=SLOW To display existing storage classes and properties ◆ Use the dbdst_admin command as follows: $ /opt/VRTS/bin/dbdst_admin -S $ORACLE_SID -o list For example $ /opt/VRTS/bin/dbdst_admin -S FLAS10r1 -o list TSDB Parameters for FLAS10r1 ----------------------------------Maxclass = 4
382 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Prerequisites Usage notes ■ The database must be shutdown. ■ Create at least one additional volume. You must convert the single-volume file system on which you plan to implement Database Dynamic Storage Tiering. ■ The file system can be mounted or unmounted when you run the dbdst_convert command.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Usage notes 383 You must convert your VxFS file system to a multi-volume file system first. ■ Storage classes must be registered using the dbdst_admin command before assigning classes to volumes. ■ The database can be online or offline.
384 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To display the free space on a storage class ◆ Use the dbdst_show_fs command as follows: $ /opt/VRTS/bin/dbdst_show_fs -S $ORACLE_SID -o volume \ -m mount_point $ /opt/VRTS/bin/dbdst_show_fs -S FLAS10r2 -m /snap_data10r2 MAXCLASS=4 MINCLASS=2 TOTAL CLASS=3 VOLUME NAME ----------- SIZE ---- USED ---- AVAILABLE --------- CLASS=FAST datavol1 1024000 20692 1003308 CLASS=MEDIUM datavol2 4608000 221075
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 385 Removing volumes from a storage class for Database Dynamic Storage Tiering using dbdst_rmvol You may need to remove a volume from a volume set. To remove a volume, use the dbdst_rmvol command. Before removing a volume, review the following information: Usage notes The database must be inactive when removing volumes from a storage class.
386 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Statistic Datafile ----------------------------------------------/datavol/orcldb/system01.dbf Relocating files for Database Dynamic Storage Tiering using dbdst_file_move Use the dbdst_file_move command to relocate flashback logs, archive logs, datafiles, and external files if the files are no longer being used frequently. Table A-13 shows the Oracle dbdst_file_move command options.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface 387 To relocate a file ◆ Use the dbdst_file_move command as follows: /opt/VRTS/bin/dbdst_file_move -S $ORACLE_SID -o datafile \ -f listfile -c storage_class For example: $ /opt/VRTS/bin/dbdst_file_move -S FLAS10r2 -c MEDIUM -o datafile -f /home/extern Assign placement policy file successful on filesystem /snap_data10r2 Begin enforcing filesystem /snap_data10r2 ...
388 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Relocating table partitions for Database Dynamic Storage Tiering using dbdst_partition_move Use the dbdst_partition_move to move table partitions. The command queries the database to validate the names of the table and partition. From this information, a list of datafiles is derived and a one-time move of the files to the desired class is executed.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Table A-14 389 dbdst_preset_policy command options Option Description -d directory Indicates the directory on which the placement policy will be applied. -e Enforces the file system of the specified directory. Use this option if there was an error in the previous enforcement that has been corrected and needs to be enforced again. -R Removes all pattern-based placement policies related to this directory.
390 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface Recreating Quick I/O files using qio_recreate You can use the qio_recreate command to automatically recreate Quick I/O files when the database is recovered. Before converting files to Quick I/O, the following conditions must be met: Prerequisites ■ To use this command for Oracle, the ORACLE_SID environment variable must be set. ■ You may be logged in as either the database administrator or root.
Veritas Storage Foundation for Oracle Command Line Interface About the command line interface To automatically recreate Quick I/O files when the database is recovered ◆ Use the qio_recreate command as follows: # /opt/VRTSdbed/bin/qio_recreate -T ora 391
392 Veritas Storage Foundation for Oracle Command Line Interface About the command line interface
Appendix B Using third-party software to back up files This appendix includes the following topics: ■ About backing up and restoring Quick I/O files using Oracle RMAN ■ About backing up and restoring Oracle Disk Manager files using Oracle RMAN ■ About backing up and restoring Quick I/O files using Legato NetWorker ■ About using backup software other than Veritas NetBackup to back up and restore ODM files About backing up and restoring Quick I/O files using Oracle RMAN Quick I/O files are treated a
394 Using third-party software to back up files About backing up and restoring Oracle Disk Manager files using Oracle RMAN Because Quick I/O files are treated as raw devices, the Quick I/O file must exist and have the necessary space preallocated to it before the file is restored using RMAN. Space can be preallocated to the file when the file is created using the qiomkfile command.
Using third-party software to back up files About backing up and restoring Quick I/O files using Legato NetWorker See the odmmkfile(1) manual page.
396 Using third-party software to back up files About using backup software other than Veritas NetBackup to back up and restore ODM files -rw-r--r-- 1 oracle dba 1048576 lrwxrwxrwx 1 oracle dba 22 Oct 20 17:39 Oct 20 17:39 .dbfile dbfile ->\ .dbfile::cdev:vxfs: The command for backing up the /db01 directory using rawasm would look like: << /db01 >> rawasm: dbfile skip: .
Appendix C Veritas Database FlashSnap status information This appendix includes the following topics: ■ Database FlashSnap snapshot status and database status Database FlashSnap snapshot status and database status The Veritas Database FlashSnap functionality provides both snapshot status information and snapshot database status information for various stages of snapplan and snapshot procedures. You can view the status information through the CLI and through the GUI.
398 Veritas Database FlashSnap status information Database FlashSnap snapshot status and database status Table C-1 Snapshot status values SNAP_STATUS Completed operations Allowed operations init_full ■ init_db ■ dbed_vmchecksnap -o validate ■ Ensure that your storage configuration has been set up correctly. -f snapplan (failed) snapshot_start ■ dbed_vmsnap -o snapshot (failed) ■ Contact your system administrator for help.
Veritas Database FlashSnap status information Database FlashSnap snapshot status and database status Table C-1 SNAP_STATUS Snapshot status values (continued) Completed operations Allowed operations reverse_resync_begin_start ■ dbed_vmsnap -o reverse_resync_begin (failed) ■ Contact Veritas support.
400 Veritas Database FlashSnap status information Database FlashSnap snapshot status and database status Table C-1 Snapshot status values (continued) SNAP_STATUS Completed operations Allowed operations recoverdb_end ■ dbed_vmclonedb -o recoverdb (successful) ■ dbed_vmclonedb -o umount umount_start ■ dbed_vmclonedb -o umount (failed) ■ Verify that your file system(s) are not busy and retry the command.
Glossary address-length pair Identifies the starting block address and the length of an extent (in file system or logical blocks). archived log mode Used to retrieve information on transactions that occur during a hot backup. asynchronous I/O A format of I/O that performs non-blocking reads and writes. This enables the system to handle multiple I/O requests simultaneously.
402 Glossary cluster A set of hosts that share a set of disks. cluster-shareable disk A disk group in which the disks are shared between more than one host. group cold backup The process of backing up a database that is not in active use. command launcher A graphical user interface (GUI) window that displays a list of tasks that can be performed by Veritas Volume Manager or other objects. Each task is listed with the object type, task (action), and a description of the task.
Glossary DB2), where data is stored in tables and generally accessed by one or more keys and Flat File Databases, where data is not generally broken up into tables and relationships. Databases generally provide tools and/or interfaces to retrieve data. datafile A physical database attribute that contains database data. An Oracle datafile can only be associated with a single database. One or more datafiles form a logical database storage unit called a tablespace. DCO See "data change object (DCO).
404 Glossary internally defined unique ID. The root disk group (rootdg) is a special private disk group disk name A Veritas Volume Manager logical or administrative name chosen for the disk, such as disk03. The term disk media name is also used to refer to the disk name. DMP See “Dynamic Multipathing.” DSS See “Decision Support Systems.
Glossary gigabyte A measure of memory or storage. A gigabyte is approximately 1,000,000,000 bytes (technically, 2 to the 30th power, or 1,073,741,824 bytes). Also GB, Gbyte, and G-byte. HFS High Performance File System. The HP-UX name for the file system derived from the 4.2 Berkeley Fast File System.
406 Glossary large file system A file system more than two gigabytes in size. VxFS, in conjunction with VxVM, supports large file systems. latency The amount of time it takes for a given piece of work to be completed. For file systems, this typically refers to the amount of time it takes a given file system operation to return to the user. Also commonly used to describe disk seek times.
Glossary NBU See “Veritas NetBackup (NBU).” node One of the hosts in a cluster. object (VxVM) An entity that is defined to and recognized internally by the Veritas Volume Manager. The VxVM objects include volumes, plexes, subdisks, disks, and disk groups. There are two types of VxVM disk objects—one for the physical aspect of the disk and the other for the logical aspect of the disk. OLTP See “Online Transaction Processing.
408 Glossary I/O and direct I/O to and from the disk device, as well as bypassing the UNIX single-writer lock behavior for most file system files. Quick I/O file A regular UNIX file that is accessed using the Quick I/O naming extension (::cdev:vxfs:). RAID A Redundant Array of Independent Disks (RAID) is a disk array set up with part of the combined storage capacity used for storing duplicate information about the data stored in that array.
Glossary snapped volume A volume whose exact image has been used to create a snapshot volume. snapshot A point-in-time image of a volume or file system that can be used as a backup. snapshot file system An exact copy of a mounted file system, at a specific point in time, that is used for online backup. A snapshot file system is not persistent and it will not survive a crash or reboot of the system. snapshot volume An exact copy of a volume, at a specific point in time.
410 Glossary tablespace In an Oracle database, an allocation of space used to hold schema objects (triggers, stored procedures, tables, etc.). A tablespace is associated with one or more datafiles. terabyte A measure of memory or storage. A terabyte is approximately 1,000,000,000,000 bytes (technically, 2 to the 40th power, or 1,000 GB). Also TB. throughput A measure of work accomplished in a given amount of time.
Index Symbols buffer cache 313 /etc/vx/vxdba/logs/ckptplan.
412 Index clone databases, creating 170, 278, 343, 363 cloning a database.
Index Database FlashSnap (continued) displaying a snapplan 267 host and storage requirements 231 options 228 Oracle RAC configuration 230 overview 38, 224, 249 planning considerations 229 removing a snapplan 267 removing a snapshot volume 292 removing a snapshot volumesnapshot volumes removing 292 resynchronizing 290 reverse resynchronizing 287 selecting the snapshot mode 229 setting up hosts 229 single-host configuration 230 two-host configuration 230 upgrading from Veritas Database Edition 3.
414 Index displaying (continued) tablespace 41 DMP 30 DMP-supported disk arrays 30 double buffering 77, 102 DRL 26, 52.
Index I I/O asynchronous 76 Cached Quick I/O 32, 39 direct 77 displaying Storage Mapping statistics 137 kernel asynchronous 76 load balancing 310 mapping and statistics 373 performance data 309 Quick I/O 32 sequential 33 statistics obtaining 300 improving database performance 76 incremental backups 42 initial_extent_size tunable parameter 305 K kernel asynchronous I/O 76 kernel write locks 77 L large file systems 35 support for 58 large files enabling 58 support for 35, 58 largefiles option 58 Legato Net
416 Index online transaction processing 25, 78 options largefiles and nolargefiles 35 Oracle autoextend feature 97 media recovery 175 recovery 174 Recovery Manager (RMAN) 393 Oracle configuration environment saving 326 Oracle datafile header size 80 Oracle Disk Manager 119 benefits 120 converting Quick I/O files 129 disabling 132 migrating files to 129 preparing existing databases for use with 128 restoring files using NetBackup 297, 394 setting up 125 Oracle Enterprise Manager 147 Oracle Managed Files 12
Index RAID-0 24 RAID-0+1 25 RAID-1 24–25 RAID-1+0 25 RAID-5 25, 52 choosing 52 performance 52 RAID-5 log 52 raw devices running databases on 32 rawasm directive 395 read-ahead algorithm for Cached Quick I/O 103 read_nstream 313 read_nstream tunable parameter 304 read_pref_io 313 read_pref_io tunable parameter 303 recovering using Storage Checkpoints 163 recreating data using RAID-5 25 recreating temporary tablespaces 92 redo logs 43 configuration guidelines 56 creating a file system 56 for Oracle recovery
418 Index snapshots aborting resynchronization 362 aborting reverse resynchronization 362 and FastResync 28 commiting reverse resynchronization changes 363 creating 270, 358, 360 resynchronizing 358, 361 reverse resynchronizing 358, 362 SORT_AREA_SIZE 312 space usage displaying statistics and monitoring 42 spanning 20, 23 defined 24 spare disks 29 sparse files 86, 90–91 starting Capacity Planning utility 211 statistics volume I/O 300 Storage Checkpoint Capacity Planning.
Index tunefstab file adding tuning parameters to 106 Tuning file I/O statistics 308 VxFS 301 VxFS I/O parameters 303 tuning for database performance 312 vxfs 301 VxVM 299 tuning I/O parameters 303 tuning parameters adding to tunefstab file 106 U umount command 60 unattended backups 42 unmounting a file system 60 Storage Checkpoints 41 unmounting file systems 60 upgrade from raw devices 129, 180 from UFS 178 upgrading from earlier VxFS layout versions 179 from UFS 179 using Database Dynamic Storage Tiering
420 Index vxstorage_stat command 135 vxstorage_stats 135 vxstorage_stats command 320, 373 vxtunefs command 113, 313 commands vxtunefs 106–107 vxupgrade command 180 VxVM . See Veritas Volume Manager overview 20 tuning 299 vxvmconvert 177 W workloads write-intensive 52 write_nstream tunable parameter 304 write_pref_io tunable parameter 304 write_throttle tunable parameter 307 X XOR .