Re: Changing Ownership

From: Alex Ivascu <alex_at_ivascu.comNOSPAM>
Date: Wed, 11 Sep 2002 02:20:18 GMT
Message-ID: <3D7EA850.3080204_at_ivascu.comNOSPAM>


Matt Goyer wrote:
> I erroneously created a bunch of tables with system and I'd like to change
> their ownership. Is that possible?
>
> Or should I just re-create the tables and dump the data in?
>
> Thanks,
> Matt
>
>

Change schema??

from sqlplus: create newschema.table_name as select * from oldschema.table_name

or

SET LINES 100 PAGES 0
SPOOL CREATE_NEWTABLES.SQL
select 'create NEWSCHEMA.'||TABLE_NAME||' as select * from OLDSCHEMA.'||TABLE_NAME||';'
from dba_tables where owner='OLDSCHEMA'
/
SPOOL OFF
_at_CREATE_NEWTABLES

(or you can select from USER_TABLES if the connected user is the OLDSCHEMA owner).

Hope this is what you're looking for.

Regards,

Alex Ivascu Received on Wed Sep 11 2002 - 04:20:18 CEST

Original text of this message