forked from oracle-devrel/oracle-autonomous-database-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-adb.sh
More file actions
executable file
·37 lines (32 loc) · 1.14 KB
/
create-adb.sh
File metadata and controls
executable file
·37 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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 "# create autonomous database"
echo "##"
echo ""
# ensure you update the config file to match your deployment prior to running the deployment
source ./config
# ADB requires the IDs of the networking components
VNET_ID=$(az network vnet show --resource-group $RESOURCE_GROUP --name $VNET_NAME --query id -o tsv)
SUBNET_ID=$(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME --query id -o tsv)
# create the database
az oracle-database autonomous-database create \
--location $LOCATION \
--autonomousdatabasename $ADB_NAME \
--resource-group $RESOURCE_GROUP \
--vnet-id $VNET_ID \
--subnet-id $SUBNET_ID \
--display-name $ADB_NAME \
--compute-model ECPU \
--compute-count 4 \
--cpu-auto-scaling true \
--data-storage-size-in-gbs 500 \
--store-auto-scaling true \
--backup-retention-period-in-days 7 \
--license-model BringYourOwnLicense \
--db-workload OLTP \
--db-version 23ai \
--regular \
--admin-password $USER_PASSWORD