误删除Oracle家目录的恢复方法
来源:互联网 发布:计时器软件下载 编辑:程序博客网 时间:2024/06/01 09:06
--创建oracle目录
[root@zw home]# mkdir oracle
[root@zw home]# ll
total 8
drwxr-xr-x 2 root root 4096 Jan 7 21:22 oracle
drwx------ 3 oracle dba 4096 Jan 7 19:25 oracle.bak
[root@zw home]# chown -R oracle:dba oracle
[root@zw home]# ll
total 8
drwxr-xr-x 2 oracle dba 4096 Jan 7 21:22 oracle
drwx------ 3 oracle dba 4096 Jan 7 19:25 oracle.bak
[root@zw home]#
--复制骨架文件:
[root@zw home]# cp /etc/skel/.* /home/oracle/
cp: omitting directory `/etc/skel/.'
cp: omitting directory `/etc/skel/..'
cp: omitting directory `/etc/skel/.mozilla'
[root@zw home]#
[root@dg1 home]# ls -la /home/oracle
[root@zw home]# ls -la /home/oracle
total 28
drwxr-xr-x 2 oracle dba 4096 Jan 7 21:23 .
drwxr-xr-x 4 root root 4096 Jan 7 21:22 ..
-rw-r--r-- 1 root root 33 Jan 7 21:23 .bash_logout
-rw-r--r-- 1 root root 176 Jan 7 21:23 .bash_profile
-rw-r--r-- 1 root root 124 Jan 7 21:23 .bashrc
-rw-r--r-- 1 root root 515 Jan 7 21:23 .emacs
[root@zw home]# chown -R oracle:dba /home/oracle
[root@zw home]# cd /home/oracle
[root@dg1 oracle]# ls -la
total 28
drwxr-xr-x 2 oracle dba 4096 Jan 7 21:23 .
drwxr-xr-x 4 root root 4096 Jan 7 21:22 ..
-rw-r--r-- 1 oracle dba 33 Jan 7 21:23 .bash_logout
-rw-r--r-- 1 oracle dba 176 Jan 7 21:23 .bash_profile
-rw-r--r-- 1 oracle dba 124 Jan 7 21:23 .bashrc
-rw-r--r-- 1 oracle dba 515 Jan 7 21:23 .emacs
//修改oracle 用户的环境变量:
[root@zw oracle]# cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_1
export ORACLE_SID=ogg02
#export NLS_LANG=american_america.zhs16gbk
#PATH=$PATH:$HOME/bin
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
export PATH=$ORACLE_HOME/bin:$PATH
export PATH
[root@zw oracle]# . ./.bash_profile --使文件生效
切换一下用户看有没有问题
[root@zw home]# cd oracle
[oracle@zw ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 21:31:28 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
恢复成功!
0 0
- 误删除Oracle家目录的恢复方法
- oracle用户目录误删除的恢复
- ORACLE误删除数据的恢复方法
- ORACLE误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- oracle误删除数据的恢复方法
- svn 目录删除后的恢复方法
- Oracle数据库中误删除数据后恢复的方法
- Android的组件管理(Android N)--Process管理(一)
- 关于同步,异步,阻塞,非阻塞,IOCP/epoll,select/poll,AIO ,NIO ,BIO的总结
- Android中自动跳转到系统设置界面
- Jquery的html方法里包含特殊字符的处理,类似双引号之类的
- GB28181注册流程讲解
- 误删除Oracle家目录的恢复方法
- rawNAND、ClearNAND、eMMC的区别
- Phalcon ajax防 csrf 提交方法
- java synchronized详解
- Android 常用类库
- js中几种实用的跨域方法原理详解
- 二叉树的遍历总结
- nodejs代码初探
- Vue进阶之组件(二)