Skip to content

Binary Scanning via Command Line (SQL)

You must use credentials that can read metadata about the databases being scanned.

Analyze a relational database

Terminal window
analyze -a yourApp -c jdbc:postgresql://localhost:5432/sampledb -u postgres_user -pwd postgres_password

Help options for the Lineai SQL Agent

Terminal window
lineai-sql:>help analyze
NAME
analyze - Analyze a database by the given connection.
SYNOPSYS
analyze [-c] string [[-u] string] [[-pwd] string] [[-o] string] [-a] string [[-d] string] [-e] [[-s] string]
OPTIONS
-c or --connection-url or --jdbc-url string
The connection url, with no extra parameters, to use to connect to the database.
Warning: The --jdbc-url parameter is deprecated and will be removed in a future release.
[Relational Databases] Use a JDBC connection string to analyze relational databases such as PostgreSQL, Oracle, MySql.
Example: jdbc:postgresql://localhost:5432/myDatabase
[MongoDB] Use a Mongo connection string to analyze Mongo databases.
Example: mongodb://localhost:27017/
[Neo4j] Use a Bolt connection string to analyze Neo4j databases.
Example: bolt://localhost:7687
[Mandatory]
-u or --user string
The user to use while connecting to the database. It is recommended to provide a user with read-only permissions.
[Optional, default = <none>]
-pwd or --password string
The password for the given user.
[Optional, default = <none>]
-o or --output string
'API_CSV' - Batch data locally in CSV. Upload to api as single batch.
'CSV' - write results to CSV files in the auxiliary directory. Zip the results once finished.
[Optional, default = API_CSV]
-a or --application string
The Application node to create that will be the parent of all objects found in the scan.
The value is a comma separated list of 'Application' semantic names.
Semantic names may be anything you wish if creating a new application.
If linking grouping to an existing application, use its semantic identity (the value without the `grouping:` prefix).
[Mandatory]
-d or --database string
Only use for Oracle databases. For all other JDBC databases, please specify the database in the connection string.
This will override the detected database name. This is also useful if the name could not be determined.
It is necessary to set this if your are scanning an Oracle database.
[Optional, default = <none>]
-e or --expunge-scan-sessions
Instruct the server to delete all other scan sessions created
by this agent and its configuration after the current scan
session has completed successfully.
[Optional, default = false]
-s or --scan-space-name string
The name of the scan space that the data will be saved to.
If specified, a ScanSpace with this name will be created if not found.
If not specified, information will be saved to the default ScanSpace.
[Optional, default = <none>]