forked from biemond/docker-database-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup.sh
18 lines (12 loc) · 640 Bytes
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# *************************************************************************
echo "Change hostname in the listener.ora"
dbhost=`uname -n`
sed -i "/(ADDRESS = (PROTOCOL = TCP)(HOST/c\ (ADDRESS = (PROTOCOL = TCP)(HOST = ${dbhost} )(PORT = 1521))" /oracle/product/12.1/db/network/admin/listener.ora
echo "Start the listener and database"
service dbora start
echo "just to be sure, start the listener again"
su oracle -c "export ORAENV_ASK=NO;export ORACLE_SID=orcl;source oraenv;/oracle/product/12.1/db/bin/lsnrctl start"
echo "Done"
echo "Show all ora processes, should see listener and ora db processes"
ps -ef | grep ora