Update remote table from within a procedure
Posted in 2005
Topics: Stored Procedures & SPL, Platform-Specific Issues, Versions, Editions & End-of-Life
Running IDS 9.40.FC5 on AIX 5.2.
I have a stored procedure which is supposed to update a row in a table
in another database. Whenever I try to run that part of it I get a "No
connect permission" error. If I run precisely the same update from
outside the procedure it works fine. After I began to get this narrowed
down I reduced the procedure to:
create procedure userupdate_dc()update cms_security:branch set logoid = logoid;
end procedure;
(the branch table is small, so this is easy)
I still get the error. Then I tried running this procedure from various
different databases on the same server. Out of five databases, I get the
error in four. The fifth works fine. All are trying to update the table
in the same database, and are running as the same user (me).
It gets weirder. If I run a script like this:
update cms_security:branch set logoid = logoid;
create procedure userupdate_dc()update cms_security:branch set logoid = logoid;
end procedure;
The procedure runs without error. If the update statement doesn't match
the one in the procedure it won't work:
update cms_security:branch set logoid = logoid where branchid = 1;
create procedure userupdate_dc()update cms_security:branch set logoid = logoid;
end procedure;
This fails with the same error.
All the database involved use buffered logging (and are non-ANSI). All
have the same users and permissions.
Has anyone seen this behavior before?
DC
sending to informix-list
Can you run the update manually? This sounds like the permissions are different across the databases. What permissions do the user have? Resource/dba on the database? update on the table?