Informix Error -26071: Update statistics is not allowed on cross database or cross server objects
Cause and resolution
Update statistics is not allowed on cross database or cross server objects
You can only update statistics on objects that reside in the local database. To update statistics on objects in a remote database, connect to that database directly.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26071 fires when UPDATE STATISTICS targets an object outside the local database — per
the official guidance.
- The target object is in a remote database or on a remote server, per the official
guidance — the direct, only cause;
UPDATE STATISTICSonly works on local-database objects.
Solutions / Resolution
- Connect directly to the remote database and run
UPDATE STATISTICSthere, per the official guidance.
Examples
UPDATE STATISTICS on a remote object
UPDATE STATISTICS FOR TABLE orders@remote_server;
-- -26071: orders is on a remote server
Corrected
DATABASE mydb@remote_server;
UPDATE STATISTICS FOR TABLE orders;
Diagnostic Checks
- Check whether the target table is qualified with a remote database/server name, and connect directly to that database instead.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -26071 in this set yet.
UPDATE STATISTICS was targeted at a cross-database/cross-server object — connect to that
database directly instead.