DB2

Integration to provide connectivity to IBM DB2 using the python ibm_db2 library.

Database · DB2

Details

IDDB2
ProviderIBM
CategoryDatabase
From Version6.0.0
Docker Imagedemisto/ibm-db2:1.0.0.9067966
Supported ModulesAgentix XSIAM

README

Integration to provide connectivity to IBM DB2 using the python ibm_db2 library.
This integration was integrated and tested with version 0.1 of DB2

Configure DB2 in Cortex

Parameter Required
Database host True
Port False
Database Name False
Username True
Password True
Connection Arguments (ex: arg1=val1&arg2=val2) False
Use an SSL connection False
Use Persistent Connection False

Commands

You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

db2-query


Running a DB2 query command

Base Command

db2-query

Input

Argument Name Description Required
query The DB2 query to run. Required
limit The maximum number of results. Default is 50. Optional
skip The offset at which to start the result. Default is 0. Optional
bind_variables_name A comma separated list of names which will be replaced in query having ‘:<name>’. Optional
bind_variables_values A comma separated list of values corresponding to bind_variables_name or values in order of ‘?’ mark to be replaced in query. Optional

Context Output

There is no context output for this command.

Command Example

!db2-query query="CREATE TABLE publishers(publisher_id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(publisher_id))"

Human Readable Output

Configuration parameters

  • host — Database host (required)
  • port — Port
  • dbname — Database Name
  • credentials — Username (required)
  • connect_parameters — Connection Arguments (ex: arg1=val1&arg2=val2)
  • ssl_connect — Use an SSL connection
  • use_persistent — Use Persistent Connection

Commands (1)

  • db2-query

    Running a DB2 query command

category: Database
provider: IBM
commonfields:
  id: DB2
  version: -1
configuration:
- display: Database host
  name: host
  required: true
  type: 0
- display: Port
  name: port
  type: 0
  required: false
- display: Database Name
  name: dbname
  type: 0
  required: false
- display: Username
  name: credentials
  required: true
  type: 9
- display: 'Connection Arguments (ex: arg1=val1&arg2=val2)'
  name: connect_parameters
  type: 0
  required: false
- display: Use an SSL connection
  name: ssl_connect
  type: 8
  required: false
- display: Use Persistent Connection
  name: use_persistent
  type: 8
  required: false
description: Integration to provide connectivity to IBM DB2 using the python ibm_db2 library.
display: DB2
name: DB2
script:
  commands:
  - arguments:
    - description: The DB2 query to run
      name: query
      required: true
    - defaultValue: '50'
      description: The maximum number of results
      name: limit
    - defaultValue: '0'
      description: The offset at which to start the result
      name: offset
    - description: A comma separated list of names which will be replaced in query having ':<name>'.
      name: bind_variables_name
    - description: A comma separated list of values corresponding to `bind_variables_name` or values in order of '?' mark to be replaced in query.
      name: bind_variables_values
    description: Running a DB2 query command
    name: db2-query
  dockerimage: demisto/ibm-db2:1.0.0.9067966
  script: ''
  subtype: python3
  type: python
fromversion: 6.0.0
tests:
- No tests (auto formatted)