Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: change owner of objects
On 2004-12-10, dbyy <noname_at_fooled.com> wrote:
> Is there a quick way to change the owner of all these objects?
> (Quick way might be w/o exporting all data and importing into the new
> schema)
Good question:-)
Proper way of doing that - yes, it is imp/exp However, it is not always suitable in real life So,
- create new_user - alter user current_owner account lock - create synonyms in new_user schema pointing to current_owner objects(obviously, by script - something like select 'create synonym dd2.'||object_name||' for dd1.'||object_name|| ';' from dba_objects where owner='DD1';)
Your idea about renaming user by updating data dictionary table directly is a VERY bad. You can do that and it *may* work (for a while), and then something will be broken beacuse of internal unintegrity of data in DB Dict
Never update data dictionary directly
Have a great day! Received on Thu Dec 09 2004 - 21:07:05 CST
![]() |
![]() |