Professional Documents
Culture Documents
2. Go next.
8. Click "Finish".
Create Database IN ORACLE 11g (graphical)-:
1. Login X terminal with Oracle user and input command "dbca", then following screen is
shown. Go next.
4. Input global database name and SID. ex: (any name you like).(domain name)
5. Go next.
6. Set password.
7. Go next.
8. Go next.
9. Go next.
10. Go next.
11. Go next.
12. Go next.
13. Go next.
14. Go next.
15. Go next.
16. Click "OK".
20. Logined.
CREATING STARTUP SCRIPT IN DATABASE ORACLE 11g.
1. Change settings like below.
1. vi /etc/oratab
testdb:/usr/oracle/app/product/11.1.0/db_1:Y # change
testdb2:/usr/oracle/app/product/11.1.0/db_1:N
2. Set ORACLE_SID
1. vi .bash_profile
# add at the bottom
export ORACLE_SID=testdb
1. Create start-script.
1. vi /etc/rc.d/init.d/dbora
#! /bin/bash#
# oracle: Starting Oracle database 11g
# chkconfig: 345 95 94
# description: Oracle Database Server
# processname: ora_
. /etc/rc.d/init.d/functions
lockfile=/var/lock/subsys/dbora
ORACLE_HOME=/usr/oracle/app/product/11.1.0/db_1
ORACLE=oracle
case "$1" in
'start')
if [ -f $lockfile ]; then
echo $0 already started.
exit 1
fi
echo -n $"Starting Oracle Database:"
su - $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE -c "$ORACLE_HOME/bin/emctl start dbconsole"
touch $lockfile
;;
'stop')
if [ ! -f $lockfile ]; then
echo $0 already stopped.
exit 1
fi
echo -n $"Stopping Oracle Database:"
su - $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE -c "$ORACLE_HOME/bin/emctl stop dbconsole"
rm -f $lockfile
;;
'restart')
$0 stop
$0 start
;;
'status')
if [ -f $lockfile ]; then
echo $0 started.
else
echo $0 stopped.
fi
;;
*)
echo "Usage: $0 [start|stop|status]"
exit 1
esac
exit 0