Re: Ownership Informix Tables
Posted in 1995
Robert Bailey <sysadmin@perceptics.com> writes: >Is there any way to change ownership of informix tables other >than to drop the table and recreate them as the correct >person. >Thanks in advance for any help. >John Hough Sort of. You can do it, but it involves manual updating of Informix's system tables, which you really shouldn't be doing. I've done it on a number of occasions, though, and it does work. Specifically, under OnLine 5.x, you need to update the "owner" field in systables. Optionally, you might want to update sysindexes, sysconstraints, and systriggers. Under 7.11, there's also a "sysobjstate" table that needs to be updated. It is important that you keep sysobjstate consistent with systables; nasty "system table corrupt" messages start showing up if you don't. There is 1 catch: only user informix can update any of the system tables, regardless of permissions. I've got a little C/4GL proggy that sets UID to informix then does the updates... Again, I don't recommend this (mostly because I don't pretend to understand all the system tables), but if you have a real need to change owners in a development environment, this may be the lesser of 2 evils. As an aside, does anyone know what the point of sysobjstate is? It's not covered in my documentation, and I think it just showed up in 7.11 (i.e. not in 7.10). It appears to be a kludgey way of associating a "state" variable with each table, index, and constraint without altering the structure of systables, sysindexes, or sysconstraints. Can everybody say "third normal form"?? -- --- - Derrek (dirk@xmission.com)