It is important to follow configuration best practices when setting up an Oracle environment in anticipation for AppSync. This section includes design best practices to ensure smooth operation after AppSync is configured.
AppSync relies on the /etc/oratab file for discovering Oracle databases on a UNIX host. The file is present as part of Oracle Restart functionality, and it contains entries in the format $ORACLE_SID:$ORACLE_HOME:<N|Y>. An entry is automatically created if databases are created using the Oracle dbca utility. However, databases that are created using scripts must use the srvctl add database command to add an entry in the /etc/oratab file.
The following are best practices for avoiding any discovery challenges with AppSync:
- Avoid creating a duplicate entry or an entry in an incorrect format.
- Ensure the $ORACLE_HOME value matches the exact home location from where the database has been started. This factor is important if a soft link is used as ORACLE_HOME (common in SAP with Oracle environments).
- In Oracle RAC databases, Oracle adds the database name instead of the ORACLE_SID in the /etc/oratab file. You are not required to add entries for individual RAC instances because AppSync determines the actual instance on each of the RAC nodes that are registered with it.
- If a database is deleted on the host, you must remove the corresponding entry the /etc/oratab file also. AppSync continues to display the database in an offline state if the entry in the /etc/oratab file persists post deletion of the database.
- If the database ID or DBID of a database is changed on the host, but the database name remains the same, AppSync recognizes it as a new database altogether. This scenario leads the AppSync UI to display two entries with the same name. If you intend to remove the old entry, you must remove all copies and subscriptions from the old database, and comment out the entry in the /etc/oratab file (using a #). Then, in the AppSync UI > Copy Management, you must run the Oracle Discover Databases option. Both the entries are removed from the UI. Next, remove the # preceding the entry in the /etc/oratab file, and rerun a discovery. Only the new database is visible thereafter.
- AppSync adds an entry in the /etc/oratab file for a mounted and recovered database using the srvctl add database command. This operation can succeed for Oracle 11g R2 configurations only when Oracle Grid is installed on the mount host.
- If an entry corresponding to a database is deleted from the /etc/oratab file, AppSync treats that database as deleted. It either marks that database as pending delete, if copies and subscriptions are present, or removes the entry from UI.