Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: changing a table owner name

Re: changing a table owner name

From: Trifon Anguelov <trifona_at_pacbell.net>
Date: Mon, 26 Nov 2001 20:14:28 GMT
Message-ID: <DoxM7.1704$9t2.239768704@newssvr13.news.prodigy.com>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US