In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to write the oracle 11g automatic lock killing script, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Recently, with the approach of the Spring Festival, locks often appear in customers' 11gRAC sets in the afternoon, and developers are unable to modify the logic when they go home. In order to avoid broadcasting vpn processing every day during the Spring Festival, I hurriedly wrote a script to kill the lock automatically.
There are a few things to note about this script:
1. For linux system
Both 2.oracle 11g single instance and RAC can
3. Considering that active's lock can't be killed.
4. The source of some locks will be some system processes, worried that after killing the library will be directly down, the script also takes this into account.
5. There are two sets of RAC on this server, and for security reasons, I have export the environment variables before sqlplus.
You can send this script to the brothers in the duty room and run if there is a lock, or you can write it into crontab.
#! / bin/bash
# get lock infomation
Export ORACLE_SID=ogg1
Sqlplus-s "/ as sysdba" / home/oracle/killholder.sql
Export ORACLE_SID=ogg1
Sqlplus-s "/ as sysdba"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.