In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 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.
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.