Re: Changing Table Ownership
Posted in 1997
In article <873562999.21459@dejanews.com>, sands@denver.k12.co.us writes
>In article <5up59r$mdb$1@tst.hk.super.net>,
> cklo@news.hk.super.net (Mr Cheuk Kong Lo) wrote:
>>
>> Herb Blacker (herbb@jcdcrs4.jobcorps.org) wrote:
>> : I have a *very* large database (~360 tables) which will be converted from
>> : 5.x to 7.x. In the interim, I would like to change the ownership of all
>> : tables in the database to a single user. DOes anyone know of a simpler
>> : way to do this besides doing a dbexport, vi'ing the file to substitute
>> : the new owner globally, and then dbimporting the whole darned thing?
>> : Thanks in advance,
>> : Herb
>>
>> I was told you can update the syscatalog and change the owner from there.
>> But I was also told it's dangerous because normally one would not go
>> to modify anything in sysmaster database...
>>
>> --
>> Chris Lo mailto: cklo@hk.super.net
>> System Administrator/Informix DBA mailto: cklo@cklo.hk.super.net
>> The Prudential Assurance (HK) Co. Ltd mailto: paclck@hk.net
>> ==============================================================================
>> -- Linux + FreeBSD + HPUX + Solaris + AIX
>> ==============================================================================
>> #include <std/disclaimer.h>
>
>DON'T DO IT!!!!! We were attempting to upgrade our databases from 5.0 to
>7.13, but it kept blowing up during the 'update indexes' step with error
>messages that said that the 'sysobjstate' and 'sysfragments' tables in
>sysmaster were corrupted. Informix could never tell us why this was
>happening. We finally figured out that it was caused by changing the
>ownership of the tables in the 5.0 database by updating the owner field
>in 'systables'. We were doing this because our software vendor said it
>was required. We never got around this problem since the damage had
>already been done. What we ended up doing was writing a script that would
>create a duplicate schema in the new 7.13 engine, then connect to the 5.0
>engine and do a 'select from ... insert into ...' between the two
>engines. (Normally you would be able to dbexport/dbimport between the
>two, but because our software vendor doesn't use informix data types
>properly, we couldn't do that, but that's another story). I'd recommend
>dbexporting your 5.0 database, vi'ing the owner field, dbimporting, and
>then perform your upgrade. Good luck!
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Informix specifically say you should not update system tables and
they mean it. Informix assumes sysmaster and things like systables
and sysindexes are updated correctly and only they know how to update
these things correctly. You may think you know how Informix works
internally but only Informix have the source code and can really
tell how it works! Please stop making it harder for them to support
us and wasting their time by doing things they tell us not to do.
Sorry but as a programmer who has custmoer doing the same thing to
me I hate it when people do things to our databases (i.e. internal
to out application and waste hours of my time having to fix it.
--
David Williams