Main | September 2006 »

Prev 1 2 3 4 5

August 2006 Archives

August 23, 2006

What did "SET UNUSED COLUMN" do in Oracle? Just a Guess.

    This command is used to quickly remove a column from a table with reorganize all the blocks, And you could do the blocks reorganization when system is free. I noticed the problem when someone set unused a column by mistake and asking "Can I rollback the operation when no backup available?". Let's start with the following example:

SQL> DESC T_FID
Name                    Null?    Type
----------------------- -------- -------
COL1                            NUMBER
COL2                            NUMBER
COL3                            NUMBER
SQL> ALTER TABLE T_FID SET UNUSED (COL3);
Table altered.
SQL> alter system checkpoint;
System altered.

    Then you could query the COL$ directly (Columns: COL#, SEGCOL# and NAME), what's the new values for this columns? Here I will use AUL/MyDUL's DESCRIBE command to display the table structure after the operation.

View Full Article ...

Prev 1 2 3 4 5

About August 2006

This page contains all entries posted to AnySQL.net English in August 2006. They are listed from oldest to newest.

September 2006 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.36