>>-SNAPSHOT_FILEW----------------------------------------------->
>--(--requestType--,--dbname--,--dbpartitionnum--)-------------><
The SNAPSHOT_FILEW procedure writes system snapshot data
to a file located in the tmp subdirectory of
the instance directory.
- requestType
- An input argument of type SMALLINT that specifies a valid snapshot
request type, as defined in sqlmon.h.
- dbname
- An input argument of type VARCHAR(128) that specifies a valid
database name in the same instance as the currently connected database
when calling this procedure. Specify the null value to take the snapshot
from the currently connected database.
- dbpartitionnum
- An input argument of type SMALLINT that specifies
a valid database partition number. Specify -1 for
the current database partition, or -2 for all
active database partitions. An active database partition is a partition
where the database is available for connection and use by applications.
If
the null value is specified, -1 is set implicitly.
Authorization
One of the following
authorities is required to execute the procedure:
- EXECUTE privilege on the procedure
- DATAACCESS authority
To access snapshot monitor data, one of the following
authorities is required:
- SYSMON authority
- SYSCTRL authority
- SYSMAINT authority
- SYSADM authority
Note: If you do not have SYSMON, SYSADM, SYSCTRL, or SYSMAINT
authority, you can read the saved snapshot data by passing null values
as the inputs to snapshot functions.
Example: Take a snapshot of database manager information
by specifying a request type of 1 (which corresponds to SQLMA_DB2),
and defaulting to the currently connected database and current database
partition.
CALL SNAPSHOT_FILEW (1, CAST (NULL AS VARCHAR(128)), CAST (NULL AS SMALLINT))
This
will result in snapshot data being written to
/tmp/SQLMA_DB2.dat in
the instance directory on UNIX operating
systems or to
\tmp\SQLMA_DB2.dat in the instance
directory on a Windows operating
system.