Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll ignore
scroll-viewporttrue
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-htmltrue
scroll-epubtrue

Open in new tab

About Collectors

Insert excerpt
Collector Method
Collector Method
nameabout

...

Pre-requisites

...

Python 3.6 - 3.10

...

Collector Server Minimum Requirements

Insert excerpt
Collector Method
Collector Method
nameCollectorServerSpec
nopaneltrue

Oracle Database requirements

  • Access toOracle (see section below)

...

...

  • Oracle user with read access to following tables

    • dba_hist_active_sess_history

    • dba_hist_snapshot

    • dba_users

    • dba_hist_sqltext

    • dba_mviews

    • dba_views

    • dba_procedures

    • dba_constraints

    • dba_cons_columns

    • dba_tab_columns

    • dba_audit_trail (If you do not have Auditing configured, speak to KADA about it.)

    • dba_tab_privs

    • dba_role_privs

    • dba_roles

    • proxy_users_and_roles

    • dba_synonyms

Check the MAX_STRING_SIZE option in the database , if it is not of type EXTENDED and you are unable to change it, you will need to alter the DDL_SQL used by the extractor and change from 32767 to the maximum supported value in MAX_STRING_SIZE instead. If this is not aligned you will see an ORA-00910: specified length is too long for its datatype will be thrown.

...

The collector requires a set of parameters to connect to and extract metadata from Oracle

FIELD

FIELD TYPE

DESCRIPTION

EXAMPLE

username

string

Username to log into Oracle

“myuser”

password

string

Password to log into Oracle

 

dsn

string

Datasource Name for Oracle, this can be one of the following forms

<tnsname>
<host/servicename>

“preprod”

local.example.com/oraservice”

oracle_client_path

string

Full path to the location of the Oracle Client libraries

“/tmp/drivers/lib/oracleinstantclient_11_9”

oracle_major_version

string

We currently support 11g and 12c and 12c+ for 12c greater, 11g has different SQL scripts so be very careful when setting this value

12c

database_name

string

The database name as onboarded in K, it is important that it matches so the objects are created correctly

“mykdatabase”

host_name

string

The host name as onboarded in K, it is important that it matches so the objects are created correctly

“mykhost”

wallet_path

string

If you use Oracle wallets, then this is the location of the wallet, ensure that the sqlnet.ora file references the wallet locaton correctly.

The DIRECTORY location needs to change to the fully qualified path to the wallet itself (the unzipped wallet location). By default the value is ?/network/admin this should be updated to match the wallet_path value

If you do not use wallets, leave this blank.

“/tmp/drivers/oracle/wallet”

meta_only

boolean

If you do not want to enable auditing, option to extract meta only

false

output_path

string

Absolute path to the output location where files are to be written

“/tmp/output”

mask

boolean

To enable masking or not

true

compress

boolean

To gzip the output or not

true

These parameters can be added directly into the run or you can use pass the parameters in via a JSON file. The following is an example you can use that is included in the example run code below.

...

Code Block
languagepy
import os
import argparse
from kada_collectors.extractors.utils import load_config, get_hwm, publish_hwm, get_generic_logger
from kada_collectors.extractors.oracle import Extractor

get_generic_logger('root') # Set to use the root logger, you can change the context accordingly or define your own logger

_type = 'oracle'
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, 'kada_{}_extractor_config.json'.format(_type))

parser = argparse.ArgumentParser(description='KADA Oracle Extractor.')
parser.add_argument('--config', '-c', dest='config', default=filename, help='Location of the configuration json, default is the config json in the same directory as the script.')
parser.add_argument('--name', '-n', dest='name', default=_type, help='Name of the collector instance.')
args = parser.parse_args()

start_hwm, end_hwm = get_hwm(_typeargs.name)

ext = Extractor(**load_config(args.config))
ext.test_connection()
ext.run(**{"start_hwm": start_hwm, "end_hwm": end_hwm})

publish_hwm(_type, end_hwm)

...