Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Using Snapplans

A snapplan specifies snapshot scenarios for an Oracle database (such as online or offline, and so forth). The user specifies the name of the snapplan. You can use the dbed_vmchecksnap -o setdefaults option to create the snapplan and set the default values of the parameters.


Prerequisites

  • Before using the dbed_vmsnap command to create the snapshot image, you must use dbed_vmchecksnap to create and validate the snapplan. Each entry in the snapplan file is a line in parameter=argument format.


Usage Notes

  • See the dbed_vmsnapplan(1M) manual page for more information.

When using dbed_vmchecksnap to create (or validate) a snapplan, the following parameters are set:

Parameter Value

PRIMARY_HOST

The name of the host where the primary database resides.

SECONDARY_HOST

The name of the host where the database will be imported. If the primary and secondary hosts are the same, the snapshot volumes will not be deported.

PRIMARY_DG

The name of the VxVM disk group used by the primary database.

SNAPSHOT_DG

The name of the disk group containing the snapshot volumes.

The snapshot volumes will be put into this disk group on the primary host and deported if the primary and secondary hosts are different. The secondary host will import this disk group to start a clone database.

ORACLE_SID

The Oracle system identifier.

ORACLE_HOME

The Oracle home directory.

ARCHIVELOG_DEST

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.

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. When using the Oracle remote archive log destination feature to send the archive logs to the secondary host, you can specify no to save some space.

Because the archive logs may not always be delivered to the secondary host reliably, it is recommended that you specify yes.

SNAPSHOT_MODE

online or offline

Specifies whether the database should be online or offline when the snapshot is created.

If the snapshot is created while the database is online, the dbed_vmsnap command will put the tablespaces into backup mode. After dbed_vmsnap finishes creating the snapshot, it will take the tablespaces out of backup mode, switch the log files to ensure that the extra redo logs are archived, and create a snapshot of the archived logs.

If the database if offline, it is not necessary to put the tablespaces into backup mode.

SNAPSHOT_PLAN_FOR

database or tablespaces or tables

Specifies the database object for which you want to create a snapshot. You can create a snapshot of the database, a list of the tablespaces, or a list of tables.

TABLESPACES

Specifies the list of tablespaces for which to create a snapshot. When you specify tablespaces for the SNAPSHOT_PLAN_FOR parameter, list the tablespaces here. Use a space to separate multiple tablespace names.

TABLES

Specifies the list of tables for which to create a snapshot. When you specify tables for the SNAPSHOT_PLAN_FOR parameter, list the tables here. Use a space to separate multiple table names

SNAPSHOT_ORACLE_HOME

yes or no

Specifies whether to create a snapshot for the Oracle installation. You should specify no for this parameter if a compatible Oracle release is already installed on the secondary host. If not, specify yes to create a clone database on the secondary host.

SNAPSHOT_VOL_PREFIX

Specifies the snapshot volume prefix. Use this variable to specify a prefix for the snapshot volumes split from the primary disk group. A volume name cannot be more than 32 characters.

Managing Log Files Using edgetmsg2

You can use the edgetmsg2 utility to manage message log files. You can use the edgetmsg2 utility to write a message to a log file or to the console, read the log file and print to the console, and display the available log files.


Prerequisites

  • You must be logged in as the Database Administrator or root to use this command.


Usage Notes

  • The default log file for a database is located in the following directory:
  • /etc/vx/vxdba/logs/sfua_database.log
    where database is the ORACLE_SID.
  • By default, only messages with a severity greater than ERROR will be logged.
  • The -s set_num option specifies the message catalogue set number. The default is 1.
  • The -M msgid[:severity] option specifies the message ID and severity to be printed.
  • The -f msg_catalog | logfile | log_directory option specifies the message catalogue path, log file, or log directory.
  • The -v severity | severity option is used to overwrite the minimum log severity or to create a severity filter. The severity values are either 0-8 or 100-108.
  • The -p option pauses the cursor at the end of a display message. By default, a line feed is added to each display message. Use the -p option to indicates that no line feed is to be added.
  • The -m value option is for internal use only. This option overwrites certain internal settings for the edgetmsg2 utility.
  • The -o list[,suppress_time] option displays the content of a log file. You can specify ,suppress_time to exclude time information in the utility output.
  • The -o report[,no_archive] displays the available log files. You can specify ,no_archive to exclude log files from the utility output.
  • The -t from_time[,to_time] reduced the length of the utility output by specifying the time range to include. This option must be used together with the -o list option. Use the following format: yyy-mm-dd HH:MM:SS.
  • The -S ORACLE_SID option specifies the ORACLE_SID for an Oracle database.
  • "default format string" option specifies the C language printf() format string.
  • [args] specifies arguments for the format string conversion characters.
  • See the edgetmsg2(1M) manual page for more information.

  To print a message

Use the edgetmsg2 command as follows:


$ /opt/VRTSdbed/bin/edgetmsg2 [-s set_num] [-M msgid[:severity]] \
[-f msg_catalog] [-v severity] [-p] [-m value] \
["default format string" [args]]

  To read a message log file

Use the edgetmsg2 command as follows:


$ /opt/VRTSdbed/bin/edgetmsg2 -o list[,suppress_time] \
-S ORACLE_SID | [-f logfile] \
[-v severity] [-t from_time,to_time]

Output similar to the following is displayed:


edgetmsg2 -o list -S t10 -t "2004-10-14 13:44:45,2004-10-14 14:46:31"
2004-10-14 13:44:45 SFORA vxsnapadm ERROR V-81-5542 Snapback datavol failed. 2004-10-14 13:44:45 SFORA vxsnapadm ERROR V-81-5542 Snapback archvol failed.
2004-10-14 13:44:45 SFORA dbed_vmsnap ERROR V-81-5617 snapback failed.
2004-10-14 13:56:46 SFORA dbed_vmsnap ERROR V-81-5255 sp2 does not exist.
2004-10-14 14:46:16 SFORA dbed_vmclonedb ERROR V-81-4833 There already appears to be a database T1 running.
2004-10-14 14:46:31 SFORA dbed_vmclonedb ERROR V-81-5713 The database name exceeds the maximum length of 8 characters.

  To list available log files

Use the edgetmsg2 command as follows:


$ /opt/VRTSdbed/bin/edgetmsg2 -o report[,no_archive] \
[-f log_directory]

Output similar to the following is displayed:


dbid     begin           end           size(K)    file
----     -----           ---           ----    ----
default     2004-10-25 09:50:17           2004-10-25 11:04:00           0    /etc/vx/vxdba/logs/sfua_default.log
t10     2004-09-09 08:54:59           2004-10-21 14:19:35           10    /etc/vx/vxdba/logs/sfua_t10.log
clone2     2004-10-11 09:22:35           2004-10-11 09:22:35           0    /etc/vx/vxdba/logs/sfua_clone2.log
T1     2004-10-14 14:51:33           2004-10-14 14:51:33           0    /etc/vx/vxdba/logs/sfua_T1.log
Tiff1     2004-10-21 14:24:27           2004-10-21 14:24:27           0    /etc/vx/vxdba/logs/sfua_Tiff1.log
clone     2004-08-05 09:23:19           2004-10-21 17:45:19           11    /etc/vx/vxdba/logs/sfua_clone.log

Displaying I/O Mapping and Statistics Using vxstorage_stats

You can use the VERITAS Storage Foundation for Oracle vxstorage_stats command to display I/O mapping and statistics about VERITAS File System files one file at a time. The statistics are recorded only for VxFS files and VxVM volumes. These statistics show I/O activity.


Prerequisites

  • You may be logged in as either the database administrator or root.


Usage Notes

  • The -m option displays the I/O topology for the specified file.
  • The -s option displays the file statistics for the specified file.
  • The -c count option specifies the number of times to display statistics.
  • 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.

Command usage for vxstorage_stats is as follows:


$ /opt/VRTS/bin/vxstorage_stats [-m] [-s] \
[-i interval -c count ] -f file_name

  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

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

  To display the entire I/O mapping and statistics for each I/O stack

Use the vxstorage_stats command with the -m and -s options as follows:


 $ /opt/VRTS/bin/vxstorage_stats -m -s -f /data/system01.dbf

Example

To display statistics two times with a time interval of two seconds:


$ /opt/VRTSdbed/bin/vxstorage_stats -s -i2 -c2 \
-f /data/system01.dbf

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com