[-문구-Compeople-문구-]

+::DataBase::/Oracle2014. 3. 27. 15:33

[oracle@gangjin bin]$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
....
....
oracle:x:501:501::/oracle/product/11.2:/bin/bash
....
....

## Oracle Default .bash_profile
[oracle@gangjin /]$ cd /oracle/product/11.2/
[oracle@gangjin ~]$ cat .bash_profile
export PS1='[\u@\h \W]\$ '
export ORACLE_HOME=/oracle/product/11.2
export PATH=$PATH:$ORACLE_HOME/bin:.
export NLS_LANG=.AL32UTF8
export ORACLE_SID=celadon
alias sql='sqlplus "/as sysdba"'
export LANG=C
echo " =============================== "
echo " Oracle Database Start $ dbstart "
echo " Oracle Database Stop  $ dbstop  "
echo " Oracle Database SQL>  $ sql     "
echo " =============================== "

 

[oracle@gangjin ~]$ cd bin
[oracle@gangjin bin]$ pwd
/oracle/product/11.2/bin
[oracle@gangjin bin]$ ls -al dbst*
-rwxr-xr-x 1 oracle dba    68 Nov 17 02:19 dbstart
-rwxr-x--- 1 oracle dba 13855 Jan  1  2000 dbstart.old
-rwxr-xr-x 1 oracle dba   104 Nov 17 02:20 dbstop

 

## Oracle Start Script..
[oracle@gangjin bin]$ cat dbstart
#!/bin/sh
lsnrctl start
sqlplus "/as sysdba" <<EOF
startup
exit
EOF
[oracle@gangjin bin]$ pwd
/oracle/product/11.2/bin

 

## Oracle Stop Script..
[oracle@gangjin bin]$ cat dbstop
#!/bin/sh
lsnrctl stop
sqlplus "/as sysdba" <<EOF
alter system checkpoint;
shutdown immediate;
exit
EOF

 

 

Posted by Compeople