Posts

Showing posts from August, 2016

Transportable Tablespaces

Transportable Tablespaces Transportable tablespaces were introduced in Oracle 8i to allow whole tablespaces to be copied between databases in the time it takes to copy the datafiles. In Oracle 8i one of the restrictions was that the block size of both databases must be the same. In Oracle 9i the introduction of multiple block sizes has removed this restriction. In this article I will run through a simple example of transporting a tablespace between two databases. Setup For this example I'm going to create a new tablespace, user and table to work with in the source database. CONN / AS SYSDBA CREATE TABLESPACE test_data DATAFILE '/u01/app/oracle/oradata/DB11G/test_data01.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M; CREATE USER test_user IDENTIFIED BY test_user DEFAULT TABLESPACE test_data TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON test_data; GRANT CREATE SESSION, CREATE TABLE TO test_user; CONN test_user/test_user CREATE TABLE test_tab ( id NUMBE...

PARTITION IN ORACLE

Image
What is a PARTITION in Oracle?Why to use Partition And Types of Partitions PARTITIONS Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, enabling these database objects to be managed and accessed at a finer level of granularity. When to Partition a Table?? Tables greater than 2 GB should always be considered as candidates for partitioning. Tables containing historical data, in which new data is added into the newest partition. A typical example is a historical table where only the current month's data is updatable and the other 11 months are read only. When the contents of a table need to be distributed across different types of storage devices. TYPES 1       Range partitions 2       List partitions 3       Hash partitions 4       Sub partitions     ADVANTAGES OF PARTITIONS   Redu...