Domains

Both the primary and the secondary companions can have stored procedures, users, and devices with the same names. Adaptive Servers configured for failover use domains to determine which database these objects belong to. For example, using the financial/human resources configuration outlined in Figure 3-1 and Figure 3-2, suppose both Adaptive Servers MONEY1 and PERSONEL1 have a stored procedure named sp_getcash, as described in Figure 4-2:

Figure 4-2: Domains during failover

In MONEY1, sp_getcash (which issues a secondary stored procedure named sp_balancesheet) is defined in the domain of sybsystemprocs. In PERSONEL1, sp_getcash (which issues a secondary stored procedure named sp_payemployee) is defined in the domain of the database personnel. During failover, even though sybsystemprocs for MONEY1 migrates to PERSONEL1 as sybsystemprocs_companion, its domain does not change, nor do the objects that are defined for this domain. Users that issue sp_getcash in sybsystemprocs for MONEY1 during failover mode still issue the correct secondary-stored procedure, sp_balancesheet.

The concept of domains is transparent to the users; they issue the same stored procedure or use their same login and login password.

System procedures that are stored in the master database are not controlled by domains. System procedures should never have a dependency on an object that are stored in the master database.