Skip to content

Commit

Permalink
pick latest changes for 19c and 21c scripts (#2864)
Browse files Browse the repository at this point in the history
* pick latest changes for 19c and 21c scripts

* pick latest changes for 19c and 21c scripts

* pick latest changes for 19c and 21c scripts

* pick latest changes for 19c and 21c scripts
  • Loading branch information
s1saurabh authored Sep 13, 2024
1 parent 7cd0e9f commit 0a4535a
Show file tree
Hide file tree
Showing 21 changed files with 1,507 additions and 333 deletions.
6 changes: 3 additions & 3 deletions OracleDatabase/RAC/OracleRealApplicationClusters/common/scripts/cmdExec
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
TIMESTAMP=$(date "+%Y-%m-%d")
LOGFILE="/tmp/oracle_rac_cmd_${TIMESTAMP}.log"
# shellcheck disable=SC2145
echo "$(date -u) : $@" >> "$LOGFILE"

echo "$(date -u) : $@" >> "$LOGFILE"
# shellcheck disable=SC2124
cmd=("$@")
# shellcheck disable=SC2128
$cmd
Expand All @@ -19,4 +19,4 @@ if [ $? -eq 0 ]; then
exit 0
else
exit 127
fi
fi
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/python3
#!/usr/bin/python

#############################
# Copyright (c) 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
# Copyright 2020 - 2024, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
# Author: [email protected]
# Contributor: [email protected]
############################

"""
Expand All @@ -21,7 +22,7 @@ def main():
# Checking Comand line Args
opts=""
try:
opts, args = getopt.getopt(sys.argv[1:], '', ['help','resetpassword=','delracnode=','addtns=', 'checkracinst=', 'checkgilocal=','checkdbrole=','checkracdb=','checkconnstr=','checkpdbconnstr=','setupdblsnr=','setuplocallsnr='])
opts, args = getopt.getopt(sys.argv[1:], '', ['help','resetpassword=','delracnode=','addtns=', 'checkracinst=', 'checkgilocal=','checkdbrole=','checkracdb=','checkracstatus','checkconnstr=','checkpdbconnstr=','setupdblsnr=','setuplocallsnr=','checkdbsvc=','modifydbsvc=','checkdbversion=','updatelsnrendp=','updateasmcount=','modifyscan=','updateasmdevices='])
except getopt.GetoptError:
pass

Expand Down Expand Up @@ -105,6 +106,16 @@ def main():
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--checkracstatus'):
file_name = oenv.logfile_name("CHECK_RAC_STATUS")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CHECK_RAC_STATUS","true")
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--checkdbrole'):
file_name = oenv.logfile_name("CHECK_DB_ROLE")
oralogger.filename_ = file_name
Expand Down Expand Up @@ -153,6 +164,76 @@ def main():
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--checkdbsvc'):
file_name = oenv.logfile_name("CHECK_DB_SVC")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CHECK_DB_SVC",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--modifydbsvc'):
file_name = oenv.logfile_name("MODIFY_DB_SVC")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("MODIFY_DB_SVC",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--checkdbversion'):
file_name = oenv.logfile_name("CHECK_DB_VERSION")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("CHECK_DB_VERSION",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--modifyscan'):
file_name = oenv.logfile_name("MODIFY_SCAN")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("MODIFY_SCAN",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--updateasmcount'):
file_name = oenv.logfile_name("UPDATE_ASMCOUNT")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("UPDATE_ASMCOUNT",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--updateasmdevices'):
file_name = oenv.logfile_name("UPDATE_ASMDEVICES")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("UPDATE_ASMDEVICES",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
elif opt in ('--updatelsnrendp'):
file_name = oenv.logfile_name("UPDATE_LISTENERENDP")
oralogger.filename_ = file_name
ocommon.log_info_message("=======================================================================",file_name)
oenv.add_custom_variable("UPDATE_LISTENERENDP",arg)
oenv.add_custom_variable("CUSTOM_RUN_FLAG","true")
if ocommon.check_key("OP_TYPE",oenv.get_env_dict()):
oenv.update_key("OP_TYPE","miscops")
else:
oenv.add_custom_variable("OP_TYPE","miscops")
else:
pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python3
#!/usr/bin/python

#############################
# Copyright (c) 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
# Copyright 2021, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
# Author: [email protected]
############################

Expand Down
Loading

0 comments on commit 0a4535a

Please sign in to comment.