Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pdb list in 12.1 #30

Merged
merged 3 commits into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ocenv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
################################################################################

## Version of this script. Simply uses the date in YYYY-MM-DD format
GV_OCENV_VERSION="2023-11-29"
GV_OCENV_VERSION="2023-12-10"

###############################################################################
## Environment support homogenization
Expand Down Expand Up @@ -1876,14 +1876,20 @@ vilsnr(){
fi
}
fill_pdb_details_list () {
if [[ "${GV_DB_VERSION:0:6}" == "12.1.0" ]]
then
local LV_QUERY="SELECT name ||'|'|| open_mode ||'|'|| restricted ||'|'|| TO_CHAR(open_time, 'YYYY-MM-DD HH24:MI:SS') ||'|'|| 'N/A' FROM v\$pdbs WHERE name <> 'PDB\$SEED' ORDER BY name"
else
local LV_QUERY="SELECT name ||'|'|| open_mode ||'|'|| restricted ||'|'|| TO_CHAR(open_time, 'YYYY-MM-DD HH24:MI:SS') ||'|'|| DECODE(local_undo, 1, 'YES', 'NO') FROM v\$pdbs WHERE name <> 'PDB\$SEED' ORDER BY name"
fi
unset GV_PDB_LIST_DETAILS

if [[ "${GV_IS_CDB}" == "YES" ]]
then
while read -r LV_PDB_ELEM
do
GV_PDB_LIST_DETAILS[${#GV_PDB_LIST_DETAILS[@]}]="${LV_PDB_ELEM}"
done <<< "$(exec_sql_data "SELECT name ||'|'|| open_mode ||'|'|| restricted ||'|'|| TO_CHAR(open_time, 'YYYY-MM-DD HH24:MI:SS') ||'|'|| DECODE(local_undo, 1, 'YES', 'NO') FROM v\$pdbs WHERE name <> 'PDB\$SEED' ORDER BY name")"
done <<< "$(exec_sql_data "${LV_QUERY}")"
fi
}
list_pdbs() {
Expand Down
Loading