Oracle Database TablespaceEryk Budi Pratama – Dimas Aryo AnggoroAdvanced Database LabInformatics Engineering –Bakrie University
Tablespace
Oracle stores data logically in tablespacesand physically in datafiles associated with the corresponding tablespace.
List tablespaces
select * from user_free_space;
Create Tablespace
Create tablespace nama-tablespacedatafile ‘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-tablespaceincluding contents;
Create User
create user nama_user
identified by password-user
default tablespace dtpraktek;
Grant & Resource
grant connect to user01;
grant resource to user01;