[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
'+::DataBase:: > Oracle' 카테고리의 다른 글
[Oracle11g] 사용자암호만료 / 사용자잠김 / ORA-28001: the password has expired / 만료기한 설정 (0) | 2018.08.17 |
---|---|
오라클(oracle) 테이블스페이스 용량 변경 쿼리(query) (0) | 2014.03.27 |
http://download.oracle.com/otn-pub/java/jdk/6u34-b04/jdk-6u34-linux-x64.bin (0) | 2012.11.06 |
유용한 Oracle명령어 (0) | 2011.10.23 |
오라클 서비스 및 리스너 시작(관리자콘솔) (0) | 2011.10.23 |