How can you find out whether a database is primary or standby? | Oracle DBA

You can query the v$database view. The database_role column provides the relevant information.