Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: changing a table owner name
"Kevin Delsh" <kevin_delsh_at_yahoo.com> wrote in message
news:fca3c675.0111260819.7e2ad14e_at_posting.google.com...
> Is there an Oracle SQL command to change the owner of a table.
>
> Thanks,
> Kevin
Kevin,
If it is a small table, then extract the SQL for constraints, triggers, public synonyms, sequences on this table. Make sure to packages, functions or procedures are using this table definition, otherwise you have to change them as well:
Then grant "SELECT" on this table to the new user. As the new user run:
create table <table_name> as select * from <old_user>.<table_name>;
Recreate any constraints, ... with the new user.
Just one more way of doing it.
Trifon Anguelov
Senior Oracle DBA
http://www.dbaclick.com Received on Mon Nov 26 2001 - 14:14:28 CST