DBA Hub

📋Steps in this guide1/1

Create Table for Exchange With a Partitioned Table in Oracle Database 12c Release 2 (12.2)

Make sure a table is compatible for an EXCHANGE PARTITION operation by using CREATE TABLE ... FOR EXCHANGE WITH TABLE in Oracle Database 12c Release 2 (12.2).

oracle 12cconfigurationintermediate
by OracleDba
13 views
1

CREATE TABLE ... FOR EXCHANGE WITH TABLE

Make sure a table is compatible for an operation by using in Oracle Database 12c Release 2 (12.2). - The Problem - CREATE TABLE ... FOR EXCHANGE WITH TABLE Related articles. We have a partitioned table defined as follows. At some point, unknown to us, the table is modified to hide the and columns. This could be achieved by marking the columns as unused or invisible. In this case we do one of each. Remember, functionality like in-database archiving automatically generates invisible columns, so you may not even realise you have them. Now we want to perform an operation, so we create a new empty table as a copy of the destination table, populate it and attempt an exchange. Notice the partition exchange fails because the table segment doesn't match the partition segment structure, even though is was created using a or (CTAS). The only way to be sure the exchange will work is to make the segment structures match exactly. Oracle 12.2 makes it easy to create the new empty table with the correct structure, thanks to the clause. This clause duplicates a number internal settings and attributes including unusable columns, invisible columns, virtual columns etc. Notice the partition exchange is now successful. For more information see: Hope this helps. Regards Tim...
Step 1

Comments (0)

Please to add comments

No comments yet. Be the first to comment!