Oracle tablespace (view path, modify, create)

Source: Internet
Author: User

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;

 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.