Cheat sheet
Activate license¶
Import license into the workspace¶
Info
See import-license.
Use external license file without importing¶
Info
See global options.
Organize environments with projects¶
Create logical environments such as Test and Prod:
List projects:
Configure connections¶
Review authentication models and network handlers before creating datasources.
List available authentication models:
List supported network handlers:
Create a datasource in the Test project:
dbvr datasource create \
--driver=postgres-jdbc \
--project=Test \
--name=pg-test \
--host=test-db.internal \
--database=appdb \
--user=app \
--password=secret
Create a datasource in the Prod project:
dbvr datasource create \
--driver=postgres-jdbc \
--project=Prod \
--name=pg-prod \
--host=prod-db.internal \
--database=appdb \
--user=app \
--password=secret
List datasources:
Info
See:
Execute SQL¶
Run a query using an existing datasource:
Run SQL from a file:
Run with inline connection:
dbvr sql \
--driver=postgres-jdbc \
--host=localhost \
--database=testdb \
--user=app \
--password=secret \
"select * from users;"
Info
See sql.
Export results¶
Export query results to CSV:
Info
See sql.
Use cloud storage¶
Write results to Azure, GCP, or S3 using cloud URIs:
dbvr sql -ds=pg-prod -in=gs://my-bucket/script.sql -out=gs://my-bucket/output.txt
dbvr sql -ds=pg-prod -in=s3:///my-bucket/script.sql -out=s3:///my-bucket/output.txt
dbvr sql -ds=pg-prod -out=azb:///output.txt?endpoint=https://myaccount.blob.core.windows.net "select * from orders;"
List and test configured clouds:
Info
See cloud.