Oracle
Tips by BurlesonOracle10g bigfile Examples
Example 1: Create a database with default bigfile tablespace.
CREATE DATABASE GRID
SET DEFAULT BIGFILE TABLESPACE
DATAFILE ‘/u02/oradata/grid/system01.dbf’ SIZE 500 M,
SYSAUX DATA FILE ‘/u02/oradata/grid/sysaux01.dbf’ SIZE 500 M
DEFAULT TEMPORARY TABLESPACE tbs01
TEMPFILE ‘/u02/oradata/grid/temp01.dbf’ SIZE 1024 M
UNDO TABLESPACE undo01
DATAFILE ‘/u02/oradata/grid/undo01.dbf’ SIZE 1024 M;
Example 2: Moving data between smallfile and bigfile
tablespaces.
ALTER TABLE employee MOVE
TABLESPACE bigfile_tbs;
Example 3: Create a bigfile tablespace and change its size.
CREATE BIGFILE TABLESPACE
user_tbs
DATAFILE ‘/u02/oradata/grid/user_tbs01.dbf’ SIZE 1024 M;
ALTER TABLESPACE user_tbs RESIZE 10G;
In the previous release of Oracle server, K and M were used to
specify storage size. Notice in this DDL statement, a user can
specify size in gigabytes and terabytes using G and T
respectively.
Example 4: Use DBVERIFY utility with bigfile. With smallfile
tablespace, you can run multiple instances of DBVERIFY in parallel
on multiple datafiles to speed up integrity checking for a
tablespace. You can achieve integrity checking parallelism with
BFTs by starting multiple instances of DBVERIFY on parts of the
single big file.
$dbv FILE=bigfile01.dbf
START=1 END=10000
$dbv FILE=bigfile01.dbf START=10001
Note: START = Start Block; END = End Block |