oracle tablespace full

Today, Oracle's table space is suddenly full. When the table is built, it is automatically expanded, but there is still a problem. Check the information.
The capacity of the tablespace data file is related to the setting of DB_BLOCK_SIZE, which is specified when the database instance is created. The DB_BLOCK_SIZE parameter can be set to 4K, 8K, 16K, 32K, 64K, etc. Oracle's physical file only allows 4,194,304 data blocks at most (this parameter is determined by the operating system, and should generally be this number). The maximum value corresponding relationship can be calculated by 4194304×DB_BLOCK_SIZE/1024M.

The maximum table space of 4k is: 16384M

The maximum table space of 8K is: 32768M

The maximum table space of 16k is: 65536M

The maximum table space of 32K is: 131072M

The maximum table space of 64k is: 262144M

The default allocation of Oracle is 8K, which corresponds to the space size of about 32768M. If you want to continue to increase the table space, you only need to add the data file through alter tablespace name add datafile 'path/file_name' size 1024M; span


Try the solution
alter tablespace USERS add datafile 'user02.dbf' size 100g;
but error
ORA-01144: file size (13107200 blocks) exceeds the maximum number of 4194303 blocks The solution
can be as follows
alter tablespace USERS add datafile 'user02.dbf' size 30g;


select f.tablespace_name,a.total,u.used,f.free,round((u.used/a.total)*100) "% used",  round((f.free/a.total)*100) "% Free"  from (select tablespace_name, sum(bytes/(1024*1024)) total  from dba_data_files group by tablespace_name) a,  (select tablespace_name, round(sum(bytes/(1024*1024))) used from dba_extents group by tablespace_name) u,  (select tablespace_name, round(sum(bytes/(1024*1024))) free from dba_free_space group by tablespace_name) f WHERE a.tablespace_name = f.tablespace_name and a.tablespace_name = u.tablespace_name;


SQL>  show parameters db_block_size;

NAME      TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_size      integer 8192

db_block_size can be modified

However, once the database is created, db_block_size cannot be changed. db_block_size is determined when the database is built, not when Oracle is installed. If you want to modify its value, you must rebuild the database, otherwise only modifying init<SID>.ora will not work. . Because oracle stores data in blocks, any storage element occupies at least one block. If you change the db_block_size, some blocks cannot be used normally.
In fact, in Unix-like operating systems, the relationship between file blocks and oracle blocks is very close (recommended to be equal), so as to ensure the execution efficiency of the database. It may not be so particular about Windows. Blocks above 8k are recommended,

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326996667&siteId=291194637