--- Shell script to Start database ------
vi start_database.sh
export ORACLE_SID=PROD
echo $ORACLE_SID
sqlplus '/as sysdba'<<!
startup
show parameter db_name
select open_mode from v\$database ;
exit
!
--- Shell script to Stop database ------
vi stop_database.sh
export ORACLE_SID=PROD
echo $ORACLE_SID
sqlplus 'sys/oracle as sysdba'<
show parameter db_name
shutdown immediate
exit
eof
--- Start/Stop/Status Listener ------
lsnrctl stop
lsnrctl start
lsnrctl status
No comments:
Post a Comment