The information you are about to copy is INTERNAL!
DO NOT share it with anyone outside Check Point.
How to use the 'cpmiquerybin' command to list objects and their attributes
Technical Level
Solution ID
sk65181
Technical Level
Product
Multi-Domain Security Management
Version
All
OS
Gaia, SecurePlatform, SecurePlatform 2.6, Linux
Platform / Model
Intel/PC, Smart-1
Date Created
08-Sep-2011
Last Modified
21-Jul-2019
Solution
Table of Contents:
Introduction
Usage
Examples
Related Solutions & Documentation
Introduction
Structure of Database Query Tool on Multi-Domain Security Management Server:
File
Description
$MDSDIR/scripts/mdsquerydb
Script wrapper for loading pre-defined queries and calling $MDSDIR/bin/cpmiquerybin
$MDSDIR/bin/cpmiquerybin
Binary CPMI Client - core of the Database Query Tool
$MDSDIR/conf/queries.conf
File containing pre-defined queries
Description of $MDSDIR/bin/cpmiquerybin:
This command-line CPMI client connects to the specified database, executes a free-format query (first-level fields query/list only), and displays results as either a collection of FW-1 Sets, or as a tab-delimited list of requested fields from each retrieved object.
The target database of the query tool depends on the environment settings of the shell being used by the user.
Usage
[Expert@HostName]# mdsenv <IP address of Name of Domain Management Server> [Expert@HostName]# $MDSDIR/bin/cpmiquerybin <Query_Result_Type> <Database_Name> <Table_Name> <Query> [-a <List_of_Attributes>]
Argument
Description
Query_Result_Type
Requested format of the query result. Possible values:
attr - display values of specified (with "a" parameter) field of each retrieved object
object - display FW-1 sets containing data of each retrieved object
Database_Name
Name of the database to connect to, in double-quotes. Possible values:
""
"mdsdb"
Table_Name
Name of the table from which to retrieve the data. Possible values:
Query all objects whose names start with capital letter "A": "name='A*'"
Query all objects of the specified types: "type='gateway'|type='gateway_cluster'|type='host'"
-a List_of_Attributes
If <Query_Result_Type> was specified as 'attr', then <List_of_Attributes> should contain a comma delimited list (without spaces) of object's fields to display.
Note: To see all the attributes, go to the $FWDIR/conf/objects_5_0.C file on the Security Management Server / Domain Management Server and search for ": (Name_of_Object".