forked from oracle-devrel/oracle-autonomous-database-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow-adb-info.sh
More file actions
executable file
·23 lines (20 loc) · 895 Bytes
/
show-adb-info.sh
File metadata and controls
executable file
·23 lines (20 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Copyright (c) 2025 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
echo ""
echo "##"
echo "# show autonomous database info"
echo "##"
echo ""
# ensure you update the config file to match your deployment prior to running the deployment
source ./config
az oracle-database autonomous-database show \
--name $ADB_NAME \
--resource-group $RESOURCE_GROUP \
--query "connectionStrings.profiles[?consumerGroup=='Medium'] | [0]"
echo "JDBC Connection string:"
CONN_STR=`az oracle-database autonomous-database show --name $ADB_NAME --resource-group $RESOURCE_GROUP --query "connectionStrings.profiles[?consumerGroup=='Medium'] | [0].value"`
CONN_STR=${CONN_STR#?} # Remove first character
CONN_STR=${CONN_STR%?} # Remove last character
CONN_STR=jdbc:oracle:thin:@$CONN_STR
echo $CONN_STR