acpextract utility

The acpextract utility extracts the access control policy and access group information in the database and generates files that capture the information in XML format. It uses an input filter XML file to specify the data to extract from the database.

Diagram showing the syntax of the acpextract utility.
Notes:
  1. Apache Derby The acpextract utility requires only the input_filename parameter.
  2. Apache Derby Stop the test server before running the utility.
  3. To run the utility, you must log in with the non-root WebSphere Commerce user ID.

    LinuxAIX The user ID must have the following permissions:

    • Read/write/execute authority to the directories, subdirectories, and files of WC_installdir/xml/policies and WC_installdir/logs.
    • Read/execute authority to the WC_installdir/bin directory and its files.

      If the user does not have the required authority, you need to grant this authority with the chmod command.

    For IBM i OS operating system You must log in with a profile which has the following permissions:
    • Read/write/execute authority to files under WC_installdir/xml/policies, WC_userdir /instances, and WC_userdir /instances/ instance_name/logs.
    • Read/execute authority to the WC_installdir/bin directory and its files.

      For example, define the profile with USRCLS *SECOFR.

  4. Check for errors in the log files. Errors might not appear on the command line.
    1. LinuxAIXWindows Check the acpextract.log and messages.txt files in the following directory: WC_installdir/logs
    2. For IBM i OS operating system
      • WC_userdir/instances/acpextract.log
      • WC_userdir/instances/instance_name/logs/messages.txt
    3. Any error files generated in WC_installdir/xml/policies/xml directory.

Parameter values

database
Required: Name of the database from which to extract the policy and access group information.
DB2Note: For DB2 UDB databases, the DB2 Type 4 JDBC driver is used, where the Type 4 database name is prefixed with the database server and port. For example, db_server:db_port/db_name.
database_user
Required: Name of the database user who can connect to the database.
database_user_password
Required: The associated password for the database user.
input_filename
Required: The input filter XML file that specifies what data to extract from the database.
ACPoliciesfilter.xml
This file is used to extract all access group and policy data.
ACUserGroupsFilter.xml
This file is used to extract all access group data.
OrganizationPoliciesFilter.xml
This file is used to extract all access group and policy data for a particular organization. Before using this file, you must edit this file to specify the required organization ID. The policy data owned by this organization ID is extracted.
schema_name
Optional: The name of target database schema. This name is normally the same as database_user.

This parameter is required if there are multiple schemas in the database into which you are loading data.

Example

From the WC_installdir/bin, run:
  • LinuxAIXFor IBM i OS operating system./acpextract.sh mall dbuser dbusrpwd ACPoliciesfilter.xml
  • Windowsacpextract.cmd mall dbuser dbusrpwd ACPoliciesfilter.xml
  • DB2./acpextract.sh localhost:50000/mall dbuser dbusrpwd ACPoliciesfilter.xml
  • Apache Derbyacpextract ACPoliciesfilter.xml
The following files are created:
ExtractedACPolicies.xml
This file contains data extracted by the Extract command for the specified filter criteria.
ExtractedACPolicies.dtd
The DTD for the ExtractedACPolicies.xml file.
AccessControlUserGroups.xml
The file contains the access group definitions.
AccessControlPolicies.xml
The file contains the language-independent access control policy information.
AccessControlPolicies_ locale.xml
The language-dependent access control policies file that contains the display names and descriptions.