Home > Veritas Storage Foundation™ for DB2 Manual Pages

DBDST_PRESET_POLICY (1)

User Commands

Table of contents


NAME

dbdst_preset_policy - set policy based on file name patterns before the file is created.

SYNOPSIS

dbdst_preset_policy -D DB2DATABASE \[ -I DB2INSTANCE -d directory -e | -R | -P pattern_spec \[ -E ] | -f pattern_file \[ -E ] | -l

dbdst_preset_policy -D DB2DATABASE \[ -I DB2INSTANCE -o ats -e | -R | -P pattern_spec \[ -E ] | -f pattern_file \[ -E ] | -l

dbdst_preset_policy -D DB2DATABASE \[ -I DB2INSTANCE -o sms -t sms_tablespace_name -e | -R | -P pattern_spec \[ -E ] | -f pattern_file \[ -E ] | -l

dbdst_preset_policy -D DB2DATABASE \[ -I DB2INSTANCE -s -o sms | ats


AVAILABILITY

This command is part of Veritas Storage Foundation for DB2. To determine whether this product is installed on an \1 system, type:

lslpp -L VRTSdb2ed


DESCRIPTION

The dbdst_preset_policy command is used to set placement policy based on file name patterns before the file is actually created. It also moves existing file with the specified patterns in the specified directory to the assigned class. For -o sms option, this command retrieves the repository for the directories used for the sms tablespace, then set the placement policy for the directories. For -o ats option, this command queries the database for the automatic storage path, then set the placement policy for the directories

OPTIONS

The following options are supported:
.\" $Id: dbdst_options.inc,v 1.1 2006/02/16 01:33:08 susanl Exp $
-D DB2DATABASE Specifies the name of the DB2 database for which information will be retrieved.
-I DB2INSTANCE
Specifies the name of the DB2 instance. If the instance is not specified, the current user will be used as the instance name.
-d directory
Specifies the directory that user wants to set the policy.
-e
Specify this option to enforce the file system of the specified directory again. In the case when there was an error in previous enforcement and DBA has fixed the problem. This option can be used to enforce again.
-R
Remove all the pattern based placement policies related to the specified directory.
-l
lists the existing policy that is set to the specified directory.
-P pattern_spec
specified file patterns and class assignment. Class assignment affects both existing and future files. Using this option, future files with specified pattern will be created in the specified class. Existing files with the specified pattern will be moved to the specified class. The pattern_spec can be specified using the following format. Note that the pattern_spec has to be enclosed by "". Wildcard can be used in pattern below but only 1 wildcard can be used in each pattern. "class=pattern,pattern,:class=pattern,pattern,:"
-f pattern_file
Specify a file which contains the class and pattern assignment. Using this option, future files with specified pattern will be created in the specified class. Existing files with the specified pattern will be moved immediately to the specified class. The pattern_file will contain one or more of the following line. Wildcard can be used in pattern below but only 1 wildcard can be used in each pattern. class=pattern,pattern,
-E
This option can be specified optionally with -P or -f option. By default if there is any existing file that matches the specified pattern in the specified directory, the file will be moved to the assigned class immediately. If -E is specified, the existing files will not be moved immediately to the assigned class. Instead, a one-time move will be scheduled at a later time to perform the move. The sweeptime specified in the dbdst_admin command is used as the time to schedule this one-time move.
-s
DBA may not know the specific file patterns normally used by DB2 to create files in automatic storage path or files in SMS tablespace containers, this option list the suggested pattern normally used by DB2.
-o sms
Specify the operation is used for DB2 SMS tablespace. This option has to be used together with -s option or -t sms_tablespace_name option. If used together with -s option, list the suggested file patterns for SMS tablespace files. If use together with -t sms_tablespace_name option, preset the file placement policy for the DB2 SMS tablespace files.
-o ats
If used together with -s option, list the suggested file patterns for DB2 automatic storage path. Otherwise, preset the file placement for the DB2 automatic storage path.
-t sms_tablespace_name
Preset the placement policy for the DB2 SMS tablespace container path. This option has to be used together with the -o sms option.

Real Application Clusters (RAC) Considerations

This command is supported in a RAC environment. This command can be run on any node of the RAC.

EXAMPLES

This example shows how to create policy for a directory based on file name patterns specified in pattern_spec. Existing files which match the pattern will be moved immediately


$ /opt/VRTS/bin/dbdst_preset_policy -D prod -P -d /db2db/tbs \"PRIMARY=SQL*.DAT,SQL*.INX: SECONDAY=SQL*.LB,SQL*.LBA,SQL*.LF"

Future files in /db2db/tbs with patterns SQL*.DAT, SQL*.INX will be created in class PRIMARY and existing files with these patterns will be moved to class PRIMARY. Future files in /db2db/tbs with pattern SQL*.LB, SQL*.LBA, and SQL*.LF will be created in class SECONDARY and existing files with these pattern will be moved to class SECONDARY.

This example shows how to create policy using a pattern file. Using the -E option, existing files will not be moved immediately, instead it will be moved in the sweeptime specified in dbdst_admin command.


$cat ./pattern_file
PRIMARY=SQL*.DAT,SQL*.INX
SECONDARY=SQL*.LB,SQL*.LBA,SQL*.LF

$ /opt/VRTS/bin/dbdst_preset_policy -D prod -o sms -t TBS1 -f ./pattern_file -E

Future files in SMS tablespace TBS1 directories with patterns SQL*.DAT, SQL*.INX will be created in class PRIMARY and existing files with these patterns will be moved to class PRIMARY. Future files in SMS tablespace TBS1 directories with pattern SQL*.LB, SQL*.LBA, and SQL*.LF will be created in class SECONDARY and existing files with these pattern will be moved to class SECONDARY. The existing files will be moved in the scheduled sweeptime.

This example shows the suggested patterns for DB2 automatic storage path


$ /opt/VRTS/bin/dbdst_preset_policy -D prod -I inst01 -s -o ats

Suggested patterns for DB2 Automatic Storage
pattern         table space type
-------         ----------------
*.CAT           System catalog table space
*.TMP           System temporary table space
*.UTM           User temporary table space
*.USR           User or regular table space
*.LRG           Large table space

NOTES

dbdst_preset_policy must be run as DB2 instance owner. This command can be executed when the database is down, except for -o ats option. db2ed_update must be run at least once before this command to ensure an up-to-date repository. The -R option removes all policies for all file name patterns related to the specified directory. It cannot remove some patterns and keep the rest of them. If you want to keep some of the name patterns policies, you need to re-apply the policy for the file name patterns that you want to keep after using the -R option.


ENVIRONMENT

Please set LIBPATH to include /opt/VRTSdbms3/lib32


EXIT STATUS

0
Command executed successfully.
1
An Error Occured.
101
Licence check failed.
102
No license to execute this command.
103
Invalid Storage Class
104
The device or mount point is not owned by user

SEE ALSO

dbdst_classify(1M), dbdst_admin(1M), dbdst_convert(1M), dbdst_file_move(1M), dbdst_fstat(1M), dbdst_makelbfs(1M), dbdst_partition_move(1M), dbdst_preset_policy(1M), dbdst_report(1M), dbdst_rmvol(1M), dbdst_show_fs(1M), dbdst_addvol(1M), db2_edition(7)

Veritas Storage Foundation for DB2 Administrator's Guide

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