DB2-Admin

 view release on metacpan or  search on metacpan

lib/DB2/Admin.pm  view on Meta::CPAN


=item Description

A description of the utility or parameters for the utility

=item Priority

The utility priority (0 means unthrottled)

=item StartTime

The utility start time in text format

=item StartTimeVal

The utility start time, in numeric format suitable for use with
C<localtime> or C<gmtime>.

=back

=head2 ClientInfo

This method is used to get or set client information for a connection.
This cannot be used to override the information that the DB2 server
lists for a connection, but it can be used to provided additional
information that is recorded by the audit and monitoring tools.  Under
the covers, this method calls the DB2 C<sqleseti> and C<sqleqryi>
functions.

This method takes the following parameters, all optional:

=over 4

=item Database

The database name for which the client information should be set. A
connection to this database must exist, i.e. C<Connect> must have been
called beforehand.

If no database name is provided, the client information applies to all
connections, existing and future, for which no connection-specific
client information has been set.

=item ClientUserid

The client userid.  A useful case to set this is when the application
using the DB2::Admin module runs under a generic (production) userid, but
is performing an action for a known human userid.  By setting the
ClientUserid option, DB2 monitoring data will list both the generic
and human userids.

Note that setting the ClientUserid does not change any DB2-level
permissioning or authorization.  It only provides additional
monitoring information.

=item Workstation

The workstation name.  A useful case to set this is when the application
using the DB2::Admin module is part of a three-tier application, and is
performing an action on behalf of a user at a specific known
workstation, e.g. a client desktop name or remote IP address.

=item Application

The application name.  A useful case to set this is when the
application using the DB2::Admin module is part of a three-tier
application, and is performing an action on behalf of a known
requesting application, e.g. a specific web or client application.

=item AccountingString

The accounting string.

=back

The return value from this method is a hash with the same four fields,
all of which will be present only if the value is non-empty.

=head2 Backup

This method performs a database backup.  For a DPF database, it backs
up the node specified in the C<DB2NODE> environment variable.  In DB2
V9.5, it can back up all nodes of a DPF database.

This method takes four named parameters and returns a hash reference,
described in more detail after the parameters.

=over 4

=item Database

The database name or alias.  This parameter is required.

=item Target

The database target.  This can either be a string (a directory name)
or a reference to an array of directory names.  This parameter is
required.

=item Tablespaces

An optional array reference with a lkist of tablespace names to back
up.  Specifying this parameter switches from a database backup to a
tablespace backup.

=item Options

A required hash reference with backup options.

=over 4

=item Type

The type of backup.  This cna be C<Full>, C<Incremental> or C<Delta>.

=item Action

The backup action.  Technically, the abckup cna either eb fully
automated (the default), or it can go through multiple phases:
parameter check, start, promt, continue, etc.  This parameter allows
the user to specify the backup type/stage.  Supported values are



( run in 0.700 second using v1.01-cache-2.11-cpan-e1769b4cff6 )