Use the Datastore Client administration scripts

Axway Datastore supplies a set of scripts for the Datastore Client that clean Queries and Folders. See Execute a Datastore Client script.

It also provides a batch command that executes a long duration query that will be available to users. See Use the Datastore Client commands.

Execute a Datastore Client script

Using the command tool

  1. Navigate to the [InstallPath]/Datastore/DatastoreClient/extra/aisclient-tools directory.
  2. Start the console:
    • startConsole.bat (Windows)
    • startConsole.sh (UNIX)
  3. Enter a command and its parameters.

Using the command tool in batch mode

Launch the Datastore tools using the command parameter. Depending on the executed command, you can use other available parameters.

Syntax

Windows: startConsole.bat -c COMMAND

Unix: startConsole.sh -c COMMAND

Example

startConsole.bat -c war

Available script commands

Script Description
clean all

Cleans all the folders and the queries, along with their history entries and preferences.

clean folders [-F|–force] FOLDERS

FOLDERS is the list of folders separated by a space. If the folder name contains a space character, the character must be in quotation marks.

For each folder on the list, it cleans the folder and its queries, along with their history entries and preferences. If a folder does not exist and the option force is enabled, the process continues. If a folder does not exist and the option force is disabled, the process is terminated with an error code.

Example: clean folders --force folder1 folder2

clean queries [-F|–force] QUERIES

QUERIES is the list of queries separated by a space. If the query name contains a space character, the character must be in quotation marks.

For each query on the list, it cleans the query, along with its history entries and preferences. If a query does not exist and the option force is enabled, the process continues. If a query does not exist and the option force is disabled, the process is terminated with an error code.

Example: clean queries --force query1 query2

war

Archives the contents of the war folder located in the installation directory into a ".war" file.

Use the Datastore Client commands

Datastore provides a batch command that executes a long duration query that will be available to users. This batch command must execute an existing query.

Execution parameters (full name of query, user name) are provided in the command line or in a property file. The values given as parameters in the command line do not override the values set in the query. For example, if the query has a start date and end date defined, the values given for these parameters in the command line are ignored. Only the missing elements in the query definition are taken from the command line or from the context file.

Example of context file

user=abc

domain=Accounting

query=Query executed nightly

path=./Audit

startDate=2004-02-10

endDate=2013-04-03

queryArguments=EUR

queryContextArguments=ACC_ME

Restrictions:

  • Only request-type queries can be executed.
  • If no query is found or if the user does not have the right to access to the query, then a specific error is raised and the command fails.

Using the command tool

  1. Navigate to the [Installation_Path]/Datastore/DatastoreClient/extra/aisclient-tools directory.
  2. To start the command tool and display the list of available commands, type: startConsole.bat or startConsole.sh

Execute query

Description Execute the query
Syntax

executeQuery

--query | -q

--path | -p

--startDate | -sd

--endDate | -ed

--queryArguments | -qArgs

--queryContextArguments | -qCtxArgs

--user | -u

--domain | -d

--contextFile | -ctxFile

--timeout

Parameter
  • query – Query name
  • path - Path to query
  • startDate - Query start date
  • endDate - Query end date
  • queryArguments - Query arguments for missing values
  • queryContextArguments - Query arguments for input values
  • user - User name
  • domain - Domain
  • contextFile - Path to the file that contains the values for the missing arguments. This path can be provided in the command or in the clientTools.properties file.
  • timeout - The time in minutes after which the command is stopped. By default, timeout is infinite.
Example

executeQuery

--query Query_1

--path ./Archive

--startDate 2004-02-10

--endDate 2013-02-01

--queryArguments "EUR,RO123456,USD”

--queryContextArguments "EU12345”

--user Adi

--domain Audit

--contextFile D:/Documents/contextValues.properties

--timeout 120

Related Links