Re: changing table ownership
Posted in 1993
In <memo.282066@cix.compulink.co.uk> shemminga@cix.compulink.co.uk (Stuart Hemming) writes: >In-Reply-To: <1ug5u3INN3r1@emory.mathcs.emory.edu> karla@group1.com (Karla Leibowitz) >In <1ug5u3INN3r1@emory.mathcs.emory.edu> Karla Leibowitz asks: >> I need to change permissions on some tables in our database. When the >> database was set up tables were added by several users, and so they >> have different owners, one of whom is no longer at the company. I would >> like to change the ownership of all tables to one user, because I can not >> guarantee that any of the staff will be here forever and because permissions >> can not be changed except by the original owner. How can I change the owners >> without dumping out the entire database? >One nice and simple way is to log on as user informix and then run >the following: > update systables > set owner = "informix" >You may also want to do the same for sysindexes. There may be a >couple of other tables to; syssynonyms springs to mind. FLAME ON: This sounds like very dangerous advice to me. You may want to twiddle this bit to superuser here ... oh and this bit there. Oh and you may want to hope it still works, and I'll leave it nice and vague, so if it f*cks things up, you can't blame me. FLAME OFF. What about all the views, which reference owner.table? What about the effect on your GRANTS and GRANTS AS? Stored Procedures? .dat and .idx files? (I don't remember whether Karla specified OnLine, but even if she did, a responsible posting should point out the implications for SE administrators). Sure, of course there is a way to massage the data dictionary, but I soon realised I didn't have the time to work out where all the beartraps were, and if Karla felt she knew enough to work it out for herself, she wouldn't have posted in the first place. Let us know when you've worked out a *complete* procedure, Stuart! graeme -- Disclaimer: The author's opinions are his own, and not necessarily those of Pyramid Technology Ltd. or Pyramid Technology Inc. --------------------------------------------------------------------------- -m------- Graeme Sargent Voice: +44 (0)252 373035 ---mmm----- Senior Database Consultant Fax : +44 (0)252 373135 -----mmmmm--- Pyramid Technology Ltd. Telex: Tell who??? -------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme@pyra.co.uk --------------------------------------------------------------------------- We have the technology. The tricky bit is learning how to use it.