Oracle tablespace operations

Source: Internet
Author: User


Database usage: oracle tablespace operations
1. view the space used by the database table select tablespace_name, sum (bytes)/1024/1024 from dba_data_files group by tablespace_name;
2. view the remaining tablespace in the database SELECT tablespace_name, sum (blocks * 8192/1000000) FROM dba_free_space group by tablespace_name;
3. add the tablespace alter tablespace TBS_AR_I01 add datafile '/tellin/oracle/ll/TBS_AR_I01 'size 200 M;
4. create tablespace TBS_BILL_D01 datafile '/tellin/oracle/ll/TBS_BILL_D01.bdf' size 200 M;
5. query the specific location of the data file in the table space. select name from v $ datafile
6. query the specific location and file name of the data file in the table space, and Select * FROM DBA_DATA_FILES such as the tablespace name;
Add a tablespace 1. First find the data file corresponding to the tablespace and the path www.2cto.com -- find the full path of the data file in the corresponding tablespace, which corresponds to the FILE_NAME field. Select * from dba_data_files t where t. tablespace_name = 'Enter the tablespace to be searched '; solution 1: increase data files-increase the size of a data file in the corresponding tablespace to *** M alter database datafile' full path data file name 'resize *** M; solution 2: add the data file alter tablespace name add datafile 'full path data file name 'size *** M; -- add a new data file, the full path data file name is the full path File Name of the new data file. The size is *** M, and the value is set. Author: wangliya110

Related Article

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.