Each row in Table 4-3 contains a combination of execution objects and their conflicting execution attributes.
The “Execution Class Attributes” columns show execution class values assigned to a process application “AP” belonging to login “LG”.
The remaining columns show how Adaptive Server resolves precedence.
Execution class attributes |
Adaptive Server-assigned values |
||||
---|---|---|---|---|---|
Application (AP) |
Login (LG) |
Stored procedure (sp_ec) |
Application |
Login base priority |
Stored procedure base priority |
EC1 |
EC2 |
EC1 (EC3) |
EC2 |
Medium |
High (Medium) |
EC1 |
EC3 |
EC1 (EC2) |
EC3 |
Low |
High (Medium) |
EC2 |
EC1 |
EC2 (EC3) |
EC1 |
High |
High (High) |
EC2 |
EC3 |
EC1 (EC2) |
EC3 |
Low |
High (Medium) |
EC3 |
EC1 |
EC2 (EC3) |
EC1 |
High |
High (High) |
EC3 |
EC2 |
EC1 (EC3) |
EC2 |
Medium |
High (Medium) |
To test your understanding of the rules of precedence and scope, cover the “Adaptive Server-Assigned Values” columns in Table 4-3, and predict the values in those columns. Following is a description of the scenario in the first row, to help get you started:
Column 1 – certain client application, AP, is specified as EC1.
Column 2 – particular login, “LG”, is specified as EC2.
Column 3 – stored procedure, sp_ec, is specified as EC1.
At run time:
Column 4 – task belonging to the login,” LG”, executing the client application AP, uses EC2 attributes because the class for a login precedes that of an application (precedence rule).
Column 5 – value of column 5 implies a medium base priority for the login.
Column 6 – execution priority of the stored procedure sp_ec is raised to high from medium (because it is EC1).
If the stored procedure is assigned EC3 (as shown in parentheses in column 3), then the execution priority of the stored procedure is medium (as shown in parentheses in column 6) because Adaptive Server uses the highest execution priority of the client application or login and stored procedure.