Batch Query Delete

The query conversion results may not be satisfactory for various reasons, e.g. there was no need to convert queries for users who left the company, or some queries did not convert as expected. These reasons are often identified after the conversion is completed. To help solve this and other potential problems, there is a separate script to use in order to remove unwanted fcQueries:

The delete_queries.bat file should be modified before it is used.

All these files are located in $DovetailAgent\scripts folder.

Note: only the fcQueries will be deleted as a result of this script. The fcQuery objects with all their properties will remain in place and unchanged, same for the source Clarify queries.

Once the fcQuery is removed, it can be converted again by use of the convert_queries.js script if needed.

To run the script, execute a command:

CScript delete_queries.js [option...] parameters

where 'option' is any CScript option.

Note: all the reporting messages will appear on the console. Redirect this stream to a file for analysis.

The parameters include:

The script uses /directory:<dir> parameter to locate fc.env file with database connection credentials. This parameter is optional. If it's not present, current directory will be assumed.

If any combination of /supervisor, /user, and /query parameters is used they are prioritized as follows:

  1. /supervisor
  2. /user
  3. /query

Examples:

get help with parameters

CScript delete_queries.js ?

preview-only run, use fc.env file in the directory provided

CScript delete_queries.js /directory:my_path\my_directory

preview-only run, use fc.env file in current directory, examine only queries created by specified user

CScript delete_queries.js /user:<user>

deletion run, use fc.env file in the directory provided, delete specific query only

CScript delete_queries.js /directory:my_path\my_directory /delete:true /query:<objid>

a sample fc.env file is provided in the $DovetailAgent\scripts folder.

See Also

Query Converter

Query Conversion Workflow

Batch Query Conversion

Next

Flashes Anywhere

Batch Query Delete