| Previous | Next |
| DB_S_CANTRELEASE | DB_S_UNWANTEDOPERATION |
DB_S_GOALCHANGED
OLE DB adjusted an unsupported optimization goal
DB_S_GOALCHANGED is HRESULT 265931 (0x00040ECB) from Microsoft OLE DB. The documented description is “Weight is not supported or exceeded the supported limit, and was set to 0 or the supported limit.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.
The provider accepted the request but changed a requested weight or goal to zero or to the nearest supported limit.
Where the result is encountered
- This result can appear in query optimization properties; record the producing interface and method.
- This result can appear in index or command cost goals; record the producing interface and method.
- It can appear in provider-specific tuning controls with bounded numeric ranges; record the producing interface and method.
Diagnostic sequence
- Capture the raw HRESULT
0x00040ECBimmediately after the returning method and record whether the caller usedSUCCEEDED,FAILED, equality testing, or exception translation. - Verify the method-specific state: the effective goal is read back and is acceptable for the workload rather than assumed equal to the requested value.
State to verify
The central question is whether the effective goal is read back and is acceptable for the workload rather than assumed equal to the requested value.
Correct handling, retry, and recovery
Read the effective property value and adapt expectations. If the exact goal is required, choose a provider or strategy that supports it instead of repeatedly setting the same value.
Evidence to preserve
- Preserve property set and property ID.
- Preserve requested and effective numeric values.
- Preserve provider-supported range.
- Preserve per-property status.
- Preserve execution plan or behavior after adjustment.
Difference from nearby HRESULT values
DB_S_PROPERTIESCHANGED is a general property-adjustment result; it specifically describes a weight or goal clamped to a supported value.
Developer and administrator guidance
Practical validation scenario
A consumer requests an optimization weight above the provider maximum. The provider clamps it, the application records the effective value, and performance tests use that real setting.
References
Looking for a different code? Search another status or error code.