Thinking Out Loud

December 4, 2020

DBSAT Error: Data collection was not successful.

Filed under: 19c — mdinh @ 6:29 pm

First time running DBSAT for 19.8 RAC CDB and it failed miserably.

Create TNS entry for PDB and connect as system@PDB_service failed.

Many have tried and failed and thanks to Roy Salazar who came up with a work around.

Here is a demo for error and work around.

### Error: Data collection was not successful.
$ export TNS_ADMIN=/u01/app/grid/19.0/network/admin
$ ./dbsat collect  "/ as sysdba" dbsat_$ORACLE_SID
Setup complete.
SQL queries complete.
OS commands complete.
Disconnected from Oracle Database 19c Enterprise Edition Release - Production
Error: Data collection was not successful.

### There should have been dbsat_$ORACLE_SID.json; however, nowrap.json exist due to error.
$ ls -l *.json
-rw-------. 1 oracle oracle 486835 Dec  5 04:34 nowrap.json

### Create report using nowrap which will create and rename accordingly. Unfortunately, the report contents are still named nowrap.
$ ./dbsat report nowrap
 Database Security Assessment Tool version 2.2.1 (May 2020)
 This tool is intended to assist you in securing your Oracle database
 system. You are solely responsible for your system and the effect and
 results of the execution of this tool (including, without limitation,
 any damage or data loss). Further, the output generated by this tool may
 include potentially sensitive system configuration data and information
 that could be used by a skilled attacker to penetrate your system. You
 are solely responsible for ensuring that the output of this tool,
 including any generated reports, is handled in accordance with your
 company's policies.
 DBSAT Reporter ran successfully.
 Calling /usr/bin/zip to encrypt the generated reports…
 Enter password:
 Verify password:
   zip warning: not found or empty
   adding: nowrap_report.txt (deflated 77%)
   adding: nowrap_report.html (deflated 83%)
   adding: nowrap_report.xlsx (deflated 3%)
   adding: nowrap_report.json (deflated 81%)
 zip completed successfully.

$ ls -ltrh
 total 6.1M
 -r-xr-xr-x. 1 oracle oracle  14K May  6  2020 dbsat
 -rw-rw-r--. 1 oracle oracle 290K May  6  2020
 -rw-rw-r--. 1 oracle oracle  61K May  6  2020 sat_collector.sql
 -rw-rw-r--. 1 oracle oracle  26K May  6  2020
 -r-xr-xr-x. 1 oracle oracle  14K May  6  2020 dbsat.bat
 -rw-r--r--. 1 oracle oracle 4.5M Dec  3 04:33
 drwxr-xr-x. 5 oracle oracle   40 Dec  3 04:33 Discover
 -rw-------. 1 oracle oracle  26K Dec  4 09:40 sat_analysis.pyc
 drwxr-xr-x. 2 oracle oracle 4.0K Dec  4 09:40 xlsxwriter
 -rw-------. 1 oracle oracle 476K Dec  5 04:34 nowrap.json
 -rw-------. 1 oracle oracle 105K Dec  5 04:36

Blog at