Re: Renaming Schemas

From: Ari Kaplan <akaplan_at_psycfrnd.interaccess.com>
Date: 1996/01/24
Message-ID: <4e6e8b$262_at_psycfrnd.interaccess.com>#1/1


heath_at_eve.cvm.msstate.edu (Peeples Heath) writes:

>Is there an easy way to rename a schema?

The easiest way is to export the user's objects, then import them again with the TOUSER option.

For more information on exp and imp, type: exp help=y
imp help=y

There are other ways to do this, which are easy if you just want to move table data. Log in as the new name, and type:

create table TABLE_NAME as select * from OLD_SCHEMA.TABLE_NAME;

This will create a duplicate of the table (but not any triggers, indexes, etc.), and you will need to DROP TABLE OLD_SCHEMA.TABLE_NAME;

This can become tedious if there are several tables, however.

Good luck!

-Ari Kaplan
Oracle DBA Consultant
akaplan_at_interaccess.com Received on Wed Jan 24 1996 - 00:00:00 CET

Original text of this message