Source : https://www.orafaq.com/forum/t/122395/
to start a standby database :
#!/bin/bash ORA_HOME="/opt/oracle/920" ORA_OWNER="oracle" SQLCMD="sqlplus '/as sysdba'" LOGFILE="strt.log" cat startup.sql | su - $ORA_OWNER -c "$SQLCMD" > $LOGFILE
to shutdown a standby database :
#!/bin/bash ORA_HOME="/opt/oracle/920" ORA_OWNER="oracle" SQLCMD="sqlplus '/as sysdba'" LOGFILE="sht.log" cat shutdown.sql | su - $ORA_OWNER -c "$SQLCMD" > $LOGFILE
startup.sql :
startup nomount; alter database mount standby database; alter database recover managed standby database disconnect from session;
shutdown.sql:
alter database recover managed standby database cancel; shutdown immediate; exit