Re: Changing table owner
Posted in 1999
Engines can get confused if you manually alter the owner on tables, indexes
or constraints. Mostly, you will not be able to drop them. Ownership is
maintained both by the database as well as the sysmaster database. Be sure you
understand the relationships before attempting to change ownership.
Typically, it is lot less fuss to unload the table, drop it, then recreate it
with
the new owner.
Bill
Scott Henderson wrote:
> You can also alter the table owner directly by updating the OWNER column in
> SYSTABLES, like this:
>
> UPDATE informix.SYSTABLES SET OWNER = 'newowner' WHERE TABNAME =
> (tablename);
>
> Other object tables in which you can update the owner directly are
> sysindexes, syssynonyms, syssyntable, sysconstraints, sysprocedures,
> sysopclstr, systriggers, and sysobjstate.
>
> I was never able to alter the owner of views so easily. The owner of a view
> is stored within the view definition which is stored in one or many rows of
> sysviews.viewtext. The easiest way I found to alter the owner of a view was
> to use dbschema to dump the view DDL to ASCII, edit the owner name, and
> recreate the view.
>
> Alas, I've never found a way to alter the owner of a database directly
> (there's probably a good reason for that!).
>
> Randall Young <ryoung@BIX.com> wrote in message
> news:7h04mg$kes@lotho.delphi.com...
> > GQG wrote:
> > >How can I change the owner of a table?
> >
> > dbexport the table, alter the schema, and dbimport the table. It's that
> hard.
> >
> > Randall Young
> > ryoung@bix.com