-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oracle user creation with custom bash script.
Additional option for makefile. #2183
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# adding users through compose does not work | ||
# tried different options, this is the one that finally worked... | ||
|
||
# Wait for the Oracle database to fully initialize | ||
echo "Waiting for the Oracle database to start..." | ||
sleep 30 | ||
|
||
SQL0='alter session set "_ORACLE_SCRIPT"=true; | ||
CREATE USER compose IDENTIFIED BY password1; | ||
GRANT ALL PRIVILEGES TO compose; | ||
exit; | ||
' | ||
docker exec -it -e SQL0="$SQL0" oracle bash -c 'echo "$SQL0" | sqlplus SYS/Oradoc_db1 AS SYSDBA' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters