Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#
# Print current instances for autonomous db
# Uses $OCI_TENANCY for compartment id since that is the "root"
#
cat > db.jq <<EOF
.data[] |
."db-name" ,
"\t" + .id ,
"\t" + ."db-name" + "_low" ,
"\n\tSDW: " + ."connection-urls"."sql-dev-web-url",
"\tAPEX: " + ."connection-urls"."apex-url",
"\n\toci db autonomous-database generate-wallet --autonomous-database-id " + .id + " --file mywallet.zip --password <YOURPASSWORD>",
"\n\toci db autonomous-database generate-wallet--region --file mywallet.zip --password <YOURPASSWORD>",
"\n\t sql -cloudconfig mywallet.zip admin@" +."db-name" + "_low"
EOF
oci db autonomous-database list --compartment-id $OCI_TENANCY | jq -r -f db.jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.