Oracle Database
Tablespace
Eryk Budi Pratama – Dimas Aryo Anggoro
Advanced Database Lab
Informatics Engineering –Bakrie University
Tablespace
Oracle stores data logically in tablespaces
and physically in datafiles associated with
the corresponding tablespace.
List tablespaces
select * from user_free_space;
Create Tablespace
Create tablespace nama-tablespace
datafile ‘nama-datafile.dat’
size 2M autoextend on next 500K
maxsize 4M;
Altering Tablespace
alter database
datafile ‘nama-datafile.dat’
resize 6M;
Adding Datafile
alter tablespace dataku add datafile
‘nama-datafile.dat’ size 2M;
Drop Tablespace
drop tablespace nama-tablespace
including contents;
Create User
create user nama_user
identified by password-user
default tablespace dtpraktek;
Grant & Resource
grant connect to user01;
grant resource to user01;
Q&A

Oracle Tablespace - Basic

Editor's Notes

  • #2 http://docs.oracle.com/cd/B19306_01/server.102/b14220/physical.htm#CNCPT003http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7003.htm