How the session binding is determined

When a session is initiated, Adaptive Server checks to see if a binding is applicable. If more than one binding is applicable, the Cluster Edition determines which binding is used based on the following algorithm. Only one binding is supported per session.

  1. If a binding exists for the current login, that binding is used. Otherwise, the Cluster Edition searches for a binding for the current application. If both are found, use the binding for the login: a login binding takes precedence over an application binding.

    For example, if user “sa” is bound to tempdb1 on instance “ase1”, and isql is bound to tempdb2 on “ase1”, then, when user “sa” uses isql to initiate a session on “ase1”, only the “sa” user binding is used.

    NoteIf the first binding fails, the Cluster Edition automatically assigns a member of the default group. The Cluster Edition does not search for another binding.

  2. If the binding is to a database, the database is assigned. If the binding is to a database group, a member database from the current instance, selected in a round-robin fashion, is assigned. Local temporary databases that are members of a group can be assigned only to a session established on the owner instance. They cannot be assigned to a session on another instance using the group binding.

  3. If a binding is not found or an assignment cannot be made, an assignment is attempted for a member of the default group—selected in a round-robin fashion.

  4. If an assignment cannot be made to a member of the default group, the assignment is made to the local system temporary database.