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