Linux 平台误删 home oracle 根目录的解决方法

1 背景说明

[root@dg1 ~]# cp /etc/skel/.* /home/oracle/

cp: omitting directory `/etc/skel/.’

cp: omitting directory `/etc/skel/..’

cp: omitting directory `/etc/skel/.gnome2′

cp: omitting directory `/etc/skel/.mozilla’

[root@dg1 ~]#

[root@dg1 home]# ls -la /home/oracle

total 24

drwxr-xr-x2 root root 4096 Aug 27 14:47 .

drwxr-xr-x. 4 root root 4096 Aug 27 14:47..

-rw-r–r–1 root root 18 Aug 27 14:47.bash_logout

-rw-r–r–1 root root 176 Aug 27 14:47.bash_profile

-rw-r–r–1 root root 124 Aug 27 14:47.bashrc

-rw-r–r–1 root root 121 Aug 27 14:47.kshrc

[root@dg1 home]#

[root@dg1 home]# chown -R oracle:oinstall/home/oracle

[root@dg1 home]# cd /home/oracle

[root@dg1 oracle]# ls -la

total 24

drwxr-xr-x2 oracle oinstall 4096 Aug 27 14:47 .

drwxr-xr-x. 4 root root4096 Aug 27 14:47 ..

-rw-r–r–1 oracle oinstall 18 Aug 2714:47 .bash_logout

-rw-r–r–1 oracle oinstall 176 Aug 2714:47 .bash_profile

-rw-r–r–1 oracle oinstall 124 Aug 2714:47 .bashrc

-rw-r–r–1 oracle oinstall 121 Aug 2714:47 .kshrc

[root@dg1 oracle]#

//修改oracle 用户的环境变量:

[oracle@dg1 ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

.~/.bashrc

fi

# User specific environment and startupprograms

PATH=$PATH:$HOME/bin

export PATH

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=dave; exportORACLE_HOSTNAME

ORACLE_UNQNAME=dave; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; exportORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;exportORACLE_HOME

ORACLE_SID=dave; export ORACLE_SID

PATH=/u01:/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;exportLD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;exportCLASSPATH

[oracle@dg1 ~]$

恢复正常。 但如果有数据文件,,那么恢复就比这里更复杂。

——————————————————————————————–

版权所有,文章禁止转载,否则追究法律责任!

AboutDave:

——————————————————————————————–

QQ: 251097186

Email: tianlesoftware@gmail.com

Blog:

Weibo:

Twitter:

Facebook:

Linkedin:

Dave 的QQ群:

——————————————————————————————–

注意:加群必须注明表空间和数据文件关系 | 不要重复加群

CNDBA_1: 62697850 (空) CNDBA_2: 62697716 (满)CNDBA_3: 283816689

CNDBA_4: 391125754 CNDBA_5:104207940 CNDBA_6: 62697977 CNDBA_7: 142216823(满)

人格的完善是本,财富的确立是末。

Linux 平台误删 home oracle 根目录的解决方法

相关文章:

你感兴趣的文章:

标签云: