Oracle tablespace (view path, modify, create) 1 view tablespace path
select * from dba_data_files;
2. Modify the tablespace size.
ALTER TABLESPACE MAXDATA ADD DATAFILE '/oradata/XX/MAXDATA02.DBF' SIZE 1000M;
[SQL] can be viewed through PL/SQL. 1. view the size of all tablespaces. select tablespace_name, sum (bytes)/1024/1024 from dba_data_files group by tablespace_name; 2. select tablespace_name, sum (bytes)/1024/1024 from dba_free_space group by tablespace_name;
A: Check the space occupied by each table of the current user:
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name
3. Create a tablespace
[SQL] -- CREATE DZJC TABLESPACE CREATE SMALLFILE TABLESPACE "LHCZW" DATAFILE 'f: \ oracle \ product \ 10.2.0 \ oradata \ LH \ LHCZW 'size 100 m autoextend on next 100 m maxsize unlimited logging extent management local segment space management auto; -- CREATE DZJC_INDEX tablespace create smallfile tablespace "LHCZW_INDEX" DATAFILE 'f: \ oracle \ product \ 10.2.0 \ oradata \ LH \ LHCZW_index 'size 100 m autoextend on next 50 m maxsize unlimited logging extent management local segment space management auto; -- CREATE DZJC_TEMP tablespace create smallfile temporary tablespace "LHCZW_TEMP" TEMPFILE 'f: \ oracle \ product \ 10.2.0 \ oradata \ LH \ LHCZW_temp 'size 100 m autoextend on next 25 m maxsize unlimited extent management local uniform size 1 M; -- create user "LHCZW" PROFILE "DEFAULT" identified by "123456" default tablespace "LHCZW" temporary tablespace "LHCZW_TEMP" account unlock; GRANT "CONNECT" TO "LHCZW" with admin option; GRANT "DBA" TO "LHCZW" with admin option;