In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces "how to write shell script operation oracle delete table space, create table space, delete user" related knowledge, in the actual case operation process, many people will encounter such a dilemma, then let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Export of table space under oracle, deletion of user, deletion of table space, user creation, table space creation, shell of data import
Execute the script using a non-oracle user
parameter name
$1: User name of base tablespace
$2: User name for synchronization tablespaces
usage scenarios
For testing, the base table space is used to upgrade and build some hardened data. Synchronous tablespaces are used for testing, flattening data each time you go to and base tablespaces
The code is as follows:
#!/ bin/sh
oraclehome=$ORACLE_HOME
echo $oraclehome
localdir="/oracle/data"
echo $localdir
#Delete existing temporary dmp files
rm -rf $localdir/$2temp.dmp
rmresult=$?
echo "rm $2temp.dmp result:$rmresult"
#Export User $1 Tablespace
su - oracle -c "exp dba/dba file=$localdir/$2temp.dmp owner=$1"
expresult=$?
if [ "$expresult" != "0" ];then
echo "exp $1 tablespace failure!!! "
fi
#Delete User $2 and its Tablespace before creating a new one
su - oracle -c "${ORACLE_HOME}/bin/sqlplus /nolog"
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.