开发者

How to move a table from system schema to scott schema in Oracle?

In some days ago...i was converting some Large MySQL Database to Oracle 10g R2 by using Oracle SQL Developer database migration tools.But unfortunately it was migrated on system schema.bu开发者_开发百科t i need to it on scott schema. After Googling i found this two links OraFAQ Forum and ASK TOM Q&A.But I cannot find any appropriate answer. Any one Can help me to do , How it is possible.

Thanks In Advance.


IIRC the MySQL backup tool spits out plain SQL. As it would be in the form of fairly vanilla SQL -- just create and insert, I guess -- it ought to be able to be run against your Oracle schema with the minimum of alteration.

Having said that, in the SQL Developer migration wizard, the second step allows you to select the target schema. If you have a connection setup to scott, why doesn't that work for you?


If the table isn't too large (dependent upon your system resources and server horsepower etc.) then you could simply rebuild the table in the desired schema with the following. N.B. You need to be logged in as either the target schema's user (with select permission on the table in the SYSTEM tablespace) or as system:

CREATE TABLE <newschema>.<tablename>
AS
SELECT *
  FROM system.<tablename>;

Then remove the original table once the new table has been created.

If the table is large then you could use DATAPUMP to export and import it into the desired schema.

Here is an article on using Data Pump for this purpose: http://oraclehack.blogspot.com/2010/06/data-pump-moving-tables-to-new-schema.html

Hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜