In order to start a DG database automatically you can use DGMGRL. You must have parameter dg_broker_start=true,
You can set it to true using:
SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
When database is started from DGMGRL, it starts the database in mode according to database_role.
For Primary, it will start database in open read write stage.
For Physical Standby, it will start database in mount stage and also start the managed recovery.
For Logical Standby, it will start database in open stage and also start the SQL apply.
Steps for Windows:
1- Set ORA_SID_AUTOSTART to false in windows registry.
2- Create a batch job on the both primary and standby database:
start1.bat
=========
set ORACLE_SID=
dgmgrl / “startup”
start2.bat
======
set ORACLE_SID=
dgmgrl sys/ “startup”
++ Use either of 2 (start1.bat or start2.bat), only difference in these is OS and database authentication.
3- Now schedule this bat file to execute automatically at the system reboot to start the database automatically