Issuing User-defined Stored Procedures in Proxy Databases

Whether you issue a user-defined stored procedure from the primary database or the proxy database, the user-defined stored procedure performs its tasks within the primary database. That is, regardless of whether you issue user_created_proc on the pubs2 primary database or from the pubs2 proxy database, it always executes on the pubs2 primary database.

If you issue a system procedure from within a proxy database, it is treated differently depending on the following:

This behavior applies only to “system” proxy databases – that is, those that are created automatically by the HA configuration. User proxy databases do not exhibit this behavior.

Generally, users do not see any difference whether they issue the system procedure from within the proxy or primary database.

System procedures issued in a companion configuration are processed according to the same rules as for a single server. For a description of how system procedures are processed, see the Adaptive Server Reference Manual.


sp_dboption Does Not Update Proxy Databases

If you use sp_dboption to change the database options on the primary database, these changes are not automatically forwarded to the proxy databases on the secondary companion. You must set the sp_dboption on the proxy database as well.

For example, if you use sp_dboption to change the pubs2 database so that select into bulkcopy/pllsort is on the primary companion, the pubs2 proxy database on the secondary companion is not set.