<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Oracle: How to move a table to another schema?</title>
	<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema</link>
	<description>News and views from Pythian DBAs</description>
	<pubDate>Thu, 20 Nov 2008 14:57:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-135934</link>
		<dc:creator>Christo Kutrovsky</dc:creator>
		<pubDate>Fri, 30 Nov 2007 18:10:23 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-135934</guid>
		<description>Hi Matt,

Based on your error I think the indexes are not the same. Probably not on the same columns, not the same compression. Check that you have the exact same indexes on both tables.</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>Based on your error I think the indexes are not the same. Probably not on the same columns, not the same compression. Check that you have the exact same indexes on both tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Tordoff</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-135899</link>
		<dc:creator>Matt Tordoff</dc:creator>
		<pubDate>Fri, 30 Nov 2007 16:38:34 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-135899</guid>
		<description>Hi Christo,

I followed your article with some interest, thankyou for providing this ingenious approach. I have attempted to mimic the situation shown here, but with a slightly more complicated example. I am trying to move a table from one schema to another, and at the stage where i issue the following command:

&#62; alter table t1_temp exchange partition dummy with table t1 including indexes without validation;

I receive the following error from Oracle:

&#62; ORA-14098: index mismatch for tables in ALTER TABLE EXCHANGE PARTITION

The table I am trying to move has both primary key and foreign key constraints. I have created these constraints for the temporary table t1_temp, however, am still getting the above complaint. Is the only solution to drop all constraints, move the table, and then recreate the constraints once moved?

Any help would be greatly appreciated.

Matt</description>
		<content:encoded><![CDATA[<p>Hi Christo,</p>
<p>I followed your article with some interest, thankyou for providing this ingenious approach. I have attempted to mimic the situation shown here, but with a slightly more complicated example. I am trying to move a table from one schema to another, and at the stage where i issue the following command:</p>
<p>&gt; alter table t1_temp exchange partition dummy with table t1 including indexes without validation;</p>
<p>I receive the following error from Oracle:</p>
<p>&gt; ORA-14098: index mismatch for tables in ALTER TABLE EXCHANGE PARTITION</p>
<p>The table I am trying to move has both primary key and foreign key constraints. I have created these constraints for the temporary table t1_temp, however, am still getting the above complaint. Is the only solution to drop all constraints, move the table, and then recreate the constraints once moved?</p>
<p>Any help would be greatly appreciated.</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90681</link>
		<dc:creator>Christo Kutrovsky</dc:creator>
		<pubDate>Tue, 28 Aug 2007 14:45:56 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90681</guid>
		<description>Marco,

You forgot "including indexes". You must have a primary key. Look at my example move in the post.</description>
		<content:encoded><![CDATA[<p>Marco,</p>
<p>You forgot &#8220;including indexes&#8221;. You must have a primary key. Look at my example move in the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90674</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Tue, 28 Aug 2007 14:01:06 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90674</guid>
		<description>Hi, is great to found what a look specifically, but when run this, sqlplus give the next error message:

SQL&#62; alter table prodinsumo_temp exchange partition dummy with table dbasit.prodinsumo without validation;
alter table prodinsumo_temp exchange partition dummy with table dbasit.prodinsumo         without validation
                                                                       *
ERROR at line 1:
ORA-28653: tables must both be index-organized</description>
		<content:encoded><![CDATA[<p>Hi, is great to found what a look specifically, but when run this, sqlplus give the next error message:</p>
<p>SQL&gt; alter table prodinsumo_temp exchange partition dummy with table dbasit.prodinsumo without validation;<br />
alter table prodinsumo_temp exchange partition dummy with table dbasit.prodinsumo         without validation<br />
                                                                       *<br />
ERROR at line 1:<br />
ORA-28653: tables must both be index-organized</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Misha</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90594</link>
		<dc:creator>Misha</dc:creator>
		<pubDate>Tue, 28 Aug 2007 09:50:04 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90594</guid>
		<description>Yes, this method is unsupported. But a bit alike thing is about outlines : exchanging them is done by directly updating data dictionary tables that is not documented in official Oracle documentation, but has a metalink note.</description>
		<content:encoded><![CDATA[<p>Yes, this method is unsupported. But a bit alike thing is about outlines : exchanging them is done by directly updating data dictionary tables that is not documented in official Oracle documentation, but has a metalink note.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Fatkulin</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90361</link>
		<dc:creator>Alex Fatkulin</dc:creator>
		<pubDate>Tue, 28 Aug 2007 00:43:34 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90361</guid>
		<description>Misha, you should probably be aware that it's a big no-no to hack the data dictionary with your bare hands?

Never ever do like that, unless you are planing to use that database for practicing your restore and recovery skills.</description>
		<content:encoded><![CDATA[<p>Misha, you should probably be aware that it&#8217;s a big no-no to hack the data dictionary with your bare hands?</p>
<p>Never ever do like that, unless you are planing to use that database for practicing your restore and recovery skills.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Misha</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90191</link>
		<dc:creator>Misha</dc:creator>
		<pubDate>Mon, 27 Aug 2007 16:52:03 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-90191</guid>
		<description>Hi, 

I have tested another method :

update obj$ set OWNER#=x where  name='y';
commit;
alter system flush shared_pool;

this works !</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I have tested another method :</p>
<p>update obj$ set OWNER#=x where  name=&#8217;y';<br />
commit;<br />
alter system flush shared_pool;</p>
<p>this works !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tahir</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-49345</link>
		<dc:creator>Tahir</dc:creator>
		<pubDate>Sat, 12 May 2007 18:04:49 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-49345</guid>
		<description>How to import tables from one owner abc/xyz to another owner kee/nee with all constraints.</description>
		<content:encoded><![CDATA[<p>How to import tables from one owner abc/xyz to another owner kee/nee with all constraints.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fielding</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-4842</link>
		<dc:creator>fielding</dc:creator>
		<pubDate>Wed, 25 Oct 2006 01:24:52 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-4842</guid>
		<description>joytao,
SYS.I_OBJ2 is the index on object owner/name, so it looks like the clone is erroring out due to a duplicate destination object name.  Might there have already been objects in SAPTST prior to the clone?</description>
		<content:encoded><![CDATA[<p>joytao,<br />
SYS.I_OBJ2 is the index on object owner/name, so it looks like the clone is erroring out due to a duplicate destination object name.  Might there have already been objects in SAPTST prior to the clone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joytao</title>
		<link>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-4175</link>
		<dc:creator>joytao</dc:creator>
		<pubDate>Sun, 15 Oct 2006 04:43:55 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/218/oracle-how-to-move-a-table-to-another-schema#comment-4175</guid>
		<description>Dan,
   when run this procedures,display infomatin folllow,can you help ?
BEGIN
dbms_schema_copy.clone('SAPDEV', 'SAPTST',2,FALSE);
dbms_schema_copy.clean_up('SAPDEV', 'SAPTST');
END;
/

ERROR at line 1:
ORA-00001: unique constraint (SYS.I_OBJ2) violated
ORA-06512: at "SYS.DBMS_UPGRADE_INTERNAL", line 2481
ORA-06512: at "SYS.DBMS_UPGRADE_INTERNAL", line 3909
ORA-06512: at "SYS.DBMS_UPGRADE_INTERNAL", line 4150
ORA-06512: at "SYS.DBMS_UPGRADE_INTERNAL", line 2168
ORA-06512: at "SYS.DBMS_UPGRADE_INTERNAL", line 2236
ORA-06512: at "SYS.DBMS_SCHEMA_COPY", line 628
ORA-06512: at "SYS.DBMS_SCHEMA_COPY", line 743
ORA-06512: at line 2</description>
		<content:encoded><![CDATA[<p>Dan,<br />
   when run this procedures,display infomatin folllow,can you help ?<br />
BEGIN<br />
dbms_schema_copy.clone(&#8217;SAPDEV&#8217;, &#8216;SAPTST&#8217;,2,FALSE);<br />
dbms_schema_copy.clean_up(&#8217;SAPDEV&#8217;, &#8216;SAPTST&#8217;);<br />
END;<br />
/</p>
<p>ERROR at line 1:<br />
ORA-00001: unique constraint (SYS.I_OBJ2) violated<br />
ORA-06512: at &#8220;SYS.DBMS_UPGRADE_INTERNAL&#8221;, line 2481<br />
ORA-06512: at &#8220;SYS.DBMS_UPGRADE_INTERNAL&#8221;, line 3909<br />
ORA-06512: at &#8220;SYS.DBMS_UPGRADE_INTERNAL&#8221;, line 4150<br />
ORA-06512: at &#8220;SYS.DBMS_UPGRADE_INTERNAL&#8221;, line 2168<br />
ORA-06512: at &#8220;SYS.DBMS_UPGRADE_INTERNAL&#8221;, line 2236<br />
ORA-06512: at &#8220;SYS.DBMS_SCHEMA_COPY&#8221;, line 628<br />
ORA-06512: at &#8220;SYS.DBMS_SCHEMA_COPY&#8221;, line 743<br />
ORA-06512: at line 2</p>
]]></content:encoded>
	</item>
</channel>
</rss>
