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 to which database these objects belong. For example, suppose both Adaptive Servers MONEY1 and PERSONNEL1 have a stored procedure named sp_getcash, as described in Figure 4-2:

Figure 4-2: Domains during failover

Image shows two servers in a high available system, Money1 and Personnel1. Each has its own domain which includes own stored procedures. During failover mode, each servers stored procedures stay in their appropriate domain, and are not available to the other server.

In MONEY1, sp_getcash (which issues a secondary stored procedure named sp_balancesheet) is defined in the sybsystemprocs domain. In PERSONNEL1, sp_getcash (which issues a secondary stored procedure named sp_payemployee) is defined in the personnel1 domain. During fail over, even though sybsystemprocs for MONEY1 migrates to PERSONNEL1 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 fail over mode still issue the correct secondary stored procedure, sp_balancesheet.

The concept of domains is transparent to users.

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 is stored in the master database.