Oracle: Move Table to new Schema and Tablespace

thatjeffsmith Database Stuff 5 Comments

A Toad user posed this question today: Is there a way to move a (marked) TABLE mytable123 from Tablespace AAA and Schema BBB to another Tablespace USERS and Schema MYSCH? Let’s tackle the 2nd and easiest part first! Moving a table or partition to a new tablespace is pretty straightforward: ALTER TABLE table_name MOVE TABLESPACE tablespace_name; The ALTER TABLE MOVE …

Foreign Keys, a Foreign Concept?

thatjeffsmith Database Stuff 4 Comments

Relational databases are powerful for many reasons, but you cannot deny the ‘relational’ part is pretty compelling. Rows or ‘tuples’ in a table are comprised of related data. So for one row in an Employee table, you can assume that each value or column pertains to that particular Employee. Of course you can’t – or rather shouldn’t – put everything …

Partitioning and DBMS_REDEFINITION

thatjeffsmith Database Stuff 1 Comment

Unscientific research and Twitter gossip reveals that fewer than 15% of folks out there take advantage of Oracle’s partitioning (Oracle Docs) support for tables and indexes. Folks that build their own solutions in-house are more likely to discover and use partitioning. If you use a packaged 3rd-party database solution and it uses partitioning, then I would love to hear about …