Create a tablespace in oracle

Source: Internet
Author: User
Expand the tablespace first, check the tablespace name and file selecttablespace_name, file_id, file_name, round (bytes (1024*1024), 0) partition; 1. Add the data file ALTERTABLESPACEgameADDDATAFILEoracleoradatadb

Expand the tablespace first, check the tablespace name and its file select tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) total_space from dba_data_files order by tablespace_name; 1. ADD the data file alter tablespace game add datafile '/oracle/oradata/db

Extended tablespace

First, check the name and file of the tablespace.

Select tablespace_name, file_id, file_name,
Round (bytes/(1024*1024), 0) total_space
From dba_data_files
Order by tablespace_name;

1. Add data files
Alter tablespace game
Add datafile '/oracle/oradata/db/game02.dbf' SIZE 1000 M;

2. manually add data file size
Alter database datafile '/oracle/oradata/db/GAME. dbf'
RESIZE 4000 M;

3. Set automatic expansion of data files
Alter database datafile '/oracle/oradata/db/GAME. dbf
Autoextend on next 100 M
MAXSIZE 10000 M;

View tablespace information after setting

Select a. TABLESPACE_NAME, A. bytes total, B. BYTES USED, C. BYTES FREE,
(B. BYTES * 100)/A. BYTES "% USED", (C. BYTES * 100)/A. BYTES "% FREE"
From sys. SM $ TS_AVAIL A, SYS. SM $ TS_USED B, SYS. SM $ TS_FREE C
Where a. TABLESPACE_NAME = B. TABLESPACE_NAME AND A. TABLESPACE_NAME = C. TABLESPACE_NAME;

JSP Blog
Expand the tablespace first, check the tablespace name and its file select tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) total_spacefrom dba_data_filesorder by tablespace_name; 1. add the data file alter tablespace gameADD DATAFILE '/oracle/oradata/db/GAME02.dbf 'size 1000 M; 2. manually add the data file size alter database datafile '/oracle/oradata/db/GAME. dbf'resize 4000 M; 3. set the data file to automatically expand alter database datafile '/oracle/oradata/db/GAME. dbfAUTOEXTEND on next 100 MMAXSIZE 10000 M; check the tablespace information after setting select. TABLESPACE_NAME,. bytes total, B. bytes used, C. bytes free, (B. BYTES * 100)/. BYTES "% USED", (C. BYTES * 100)/. BYTES "% FREE" from sys. SM $ TS_AVAIL A, SYS. SM $ TS_USED B, SYS. SM $ TS_FREE cwhere. TABLESPACE_NAME = B. TABLESPACE_NAME and. TABLESPACE_NAME = C. TABLESPACE_NAME;

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.