asnanalyze: Operating the Analyzer

Use the asnanalyze command to generate reports about the state of the replication control tables. This command analyzes replication control tables that reside on any operating system, including IBM® i, however, you must invoke the command from Linux®, UNIX, or Windows.

Prerequisite for Db2 for Linux, UNIX, and Windows V10.5 Fix Pack 10 and later: To use this command on Db2 for Linux, UNIX, and Windows V10.5 or later, you must create a system temporary table space with a page size of 8K in the Apply control server. This change is required because the PREDICATES and UOW_CD_PREDICATES columns in the IBMSNAP_SUBS_MEMBR table were lengthened to VARCHAR(2048). You can use the following statements (adjust the path for Linux and UNIX):
CONNECT TO database_name;
CREATE BUFFERPOOL BUF8K SIZE 100 PAGESIZE 8K;
FORCE APPLICATIONS ALL;
TERMINATE;
CONNECT TO database_name;
CREATE SYSTEM TEMPORARY TABLESPACE TEMPSPACE2 PAGESIZE 8K MANAGED BY SYSTEM
    USING ('C:\TEMPSPACE2') BUFFERPOOL BUF8K;

You must type a space between the asnanalyze command and the first parameter to invoke the command. If you issue the command without any parameters, you receive command help on the screen.

Syntax

Read syntax diagramSkip visual syntax diagramasnanalyze-db db_alias -lastandarddetailedsimple-tln-atn-ctn-cmn-sgn-aqapply_qualifier-cscapture_schema-odoutput_directory-fnoutput_filename-pwpassword_filepath

Parameters

Table 1 defines the invocation parameters.

Table 1. asnanalyze invocation parameter definitions for Linux, UNIX and Windows operating systems
Parameter Definition
-db db_alias Specifies the Capture control server, target server, and Apply control server.

You must provide at least one database alias. If there is more than one database alias, use blank spaces to separate the values.

-la level_of_analysis Specifies the level of analysis to be reported:
standard (default)
Generates a report that includes the contents of the control tables and status information from the Capture and Apply programs.
detailed
Generates the information in the standard report and:
  • Change-data (CD) and unit-of-work (UOW) table pruning information
  • Db2® for z/OS® table space partitioning and compression information
  • Analysis of target indexes for subscription keys
simple
Generates the information in the standard report, but excludes the detailed information from the IBMSNAP_SUBS_COLS table.
-tl n Specifies the date range (0 to 30 days) of entries to be retrieved from the IBMSNAP_APPLYTRAIL table. The default is 3 days.
-at n Specifies the date range (0 to 30 days) of entries to be retrieved from the Apply trace IBMSNAP_APPLYTRACE table. The default is 3 days.
-ct n Specifies the date range (0 to 30 days) of entries to be retrieved from the IBMSNAP_CAPTRACE table. The default is 3 days.
-cm n Specifies the date range (0 to 30 days) of entries to be retrieved from the IBMSNAP_CAPMON table. The default is 3 days.
-sg n Specifies the date range (0 to 30 days) of entries to be retrieved from the IBMSNAP_SIGNAL table. The default is 3 days.
-aq apply_qualifier Specifies the Apply qualifier that identifies the specific subscription sets to be analyzed.

You can specify more than one Apply qualifier. If there is more than one Apply qualifier, use blank spaces to separate the values. If no Apply qualifier is specified, all subscription sets for the specified database aliases are analyzed.

-cs capture_schema Specifies the name of the Capture schema that you want to analyze.

If you use this parameter, you can specify only one Capture schema.

-od output_directory Specifies the directory in which you want to store the Analyzer report. The default is the current directory.
-fn output_filename Specifies the name of the file that will contain the Analyzer report output.

Use the file naming conventions of the operating system that you are using to run the Analyzer. If the file name already exists, the file is overwritten. The default file name is asnanalyze.htm.

-pw password_filepath Specifies the name and path of the password file. If you do not specify this parameter, the Analyzer checks the current directory for the asnpwd.aut file.

Examples for asnanalyze

The following examples illustrate how to use the asnanalyze command.

Example 1

To analyze the replication control tables on a database called proddb1:


asnanalyze -db proddb1

Example 2

To obtain a detailed level of analysis about the replication control tables on the proddb1 and proddb2 databases:


asnanalyze -db proddb1 proddb2 -la detailed

Example 3

To analyze the last two days of information from the IBMSNAP_APPLYTRAIL, IBMSNAP_APPLYTRACE, IBMSNAP_CAPTRACE, IBMSNAP_CAPMON, and IBMSNAP_SIGNAL tables on the proddb1 and proddb2 databases:


asnanalyze -db proddb1 proddb2 -tl 2 -at 2 -ct 2 -cm 2 -sg 2

Example 4

To obtain a simple level of analysis about the last two days of information from the IBMSNAP_APPLYTRAIL, IBMSNAP_APPLYTRACE, IBMSNAP_CAPTRACE, IBMSNAP_CAPMON, and IBMSNAP_SIGNAL tables on the proddb1 and proddb2 databases for only the qual1 and qual2 Apply qualifiers:


asnanalyze -db proddb1 proddb2 -la simple -tl 2 -at 2 -ct 2 -cm 2 -sg 2
  -aq qual1 qual2 -od c:\mydir -fn anzout -pw c:\SQLLIB

This command example writes the analyzer output to a file named anzout under the c:\mydir directory and uses the password information from the c:\SQLLIB directory.

Example 5

To analyze a specific Capture schema:


asnanalyze -db proddb1 proddb2 -cs BSN

Example 6

To display command help:


asnanalyze