← Todas as utilidades

NSAdaDB

Versão 26.1 (build 80) Ver a PPT

Esta documentação ainda não existe em português: a mostrar inglês.

Índice

Commercial deck: View the presentation · Get the PDFs

What NSAdaDB is

nsadadb copies an Adabas file to a relational or document database, verifies that source and destination hold the same data, and syncs only what changed. Three commands:

  • copy — initial load (merge, empty, drop modes).
  • compare — read-only diff report (equal / missing / changed / extra). Exits 0 when equal, 1 on differences.
  • sync — applies only missing and changed rows; with -delete-missing it also deletes destination-only rows.

Destinations: sqlite · postgres · mariadb (mysql) · mssql (sqlserver) · oracle · mongo (mongodb) · elasticsearch · cassandra (scylla) · kafka (copy only; db2 unsupported).

Database numbers, files, fields and paths in the examples are fictional.

Use cases

1. Operational replica on SQLite

Initial load with table recreate, then nightly diff sync.

nsadadb copy -dbid 50 -fnr 15 -kind sqlite -path ./replica.db -table CUSTOMERS -mode drop
nsadadb sync -dbid 50 -fnr 15 -kind sqlite -path ./replica.db -table CUSTOMERS -delete-missing

2. Migration to PostgreSQL with DDM names

Copy through the logical dictionary with a target file so the DSN never hits the shell history.

# dst.yaml
kind: postgres
dsn: postgres://user:pass@host:5432/demo?sslmode=disable
table: CUSTOMERS
nsadadb copy -dbid 50 -config ddm50.json -ddmname MY-FILE -target dst.yaml -mode drop
nsadadb compare -dbid 50 -config ddm50.json -ddmname MY-FILE -target dst.yaml -json

3. Publishing to Kafka for the data lake

Every ISN travels as JSON keyed by ISN (deletes are tombstones).

nsadadb copy -dbid 50 -fnr 15 -kind kafka -dsn kafka://host:9092/adabas -table CUSTOMERS

4. Auditable reconciliation

compare with a JSON summary proves source and destination match, ISN by ISN.

nsadadb compare -dbid 50 -fnr 15 -kind oracle -dsn "oracle://u:p@host:1521/svc" -table CUSTOMERS -json -outfile diff.json

5. MU/PE in child tables

With -mu-pe child, groups normalize into <table>__<group> with PK(isn, idx); scalar MUs map to a VALUE column. Deletes cascade.

nsadadb copy -dbid 50 -fnr 15 -kind postgres -dsn "..." -table CUSTOMERS -mu-pe child -mode drop

Option reference

OptionDescription
copy|compare|syncCommand to run (first argument).
-dbidSource Adabas database. Required.
-fnr / -ddmname -configFile by number or by logical DDM name.
-kind, -dsn/-path, -tableDestination, connection and table/collection/index/topic. Or all in -target YAML.
-fields, -search, -sortbySource selection (no -fields with -mu-pe child).
-fromisn, -toisn, -limitISN window and record cap.
-mode merge|empty|dropcopy mode (default merge).
-delete-missingAlso handle destination-only rows (skipped with a filtered source).
-mu-pe json|childMU/PE groups as JSON (default) or child tables (relational only).
-batch, -workersRows per bulk write (500) and parallel workers (4).
-state, -resumeCheckpoint every 5000 records and resume.
-dry-runPreview without writing.
-json, -outfileMachine summary and detail file (up to 10,000 lines).
-multifetch, -blocksizeAdabas read tuning.
-silence, -debugSilence and diagnostics.

Exit codes

  • 0 — success (compare: same data).
  • 1 — parameter error, or compare found differences.
  • 2 — configuration, connection or apply error.

License

Per-product signed license (app=nsadadb) at $NS_HOME/licenses/nsadadb.key (mode 0600). Without a valid license the binary does not run; there is no automatic trial (a trial is a signed license issued with nslm issue --trial). -license-status shows the status, validity and this application’s fingerprint on this machine. Demo builds stop after 50 records.

Também disponível em: es

Utilizamos armazenamento local (localStorage) para recordar o seu idioma e tema visual. Não instalamos cookies de terceiros. Se o Google Analytics estiver configurado, só será ativado após aceitar. Mais informações na nossa Política de Cookies.