#!/bin/ksh
###############################################################################################################
#Script name: show_oracle_mode.sh
#Script description: show oracle pdb name for multi pdbs.
#Current Release Version: 1.0.0
#Script Owner:
#Latest editor:
#Support platform: Linux & AIX.
#Change log:first version.
#
#Descript:date 2021/8/17
#
#
###############################################################################################################
load_sql="select cdb from v\$database;"
show_pdbs="SELECT NAME FROM V\$PDBS where name not like 'PDB\$SEED';"
open_mode=`sqlplus -S "/ as sysdba" <<EOF
set feed off
set heading off
$load_sql
exit;
EOF`
open_mode=`echo $open_mode | sed 's/[ \t]//g'`
#echo $open_mode
#res=`echo
shell脚本获取oracle pdb
最新推荐文章于 2022-10-13 21:42:49 发布