I ran the following query to get the actual and max size of my datafiles:
select file_name, sum(bytes)/1024/1024 "actual size MB",
sum(maxbytes)/1024/1024 "max size MB"
from dba_data_files
group by file_name;
In the query result, I found some actual size greater than the max size (like for my rollback datafile:
Datafile : rbs1.dbf
Actual size : 300
Max size : 200
How can you get a file that exceed the max size specified during the tablespace's creation?
In the case you would need it, here's how I created the rollback datafile:
CREATE TABLESPACE ROLLBACK
DATAFILE 'rbs1.dbf' SIZE 10M REUSE AUTOEXTEND ON
NEXT 10M MAXSIZE 200M
DEFAULT STORAGE ...
I would think , that its because you have setup the tablespace with autoextend. By the way I tried running that query on one of my databases, but the field MAXBYTES doesnt exist, perhaps because its Oracle 7.3.4?
Why are you doing a sum() for each file_name? There should only be one row for each file. Admittedly you should not get a bytes>maxbytes as written regardless, but try doing it without the group functions to be sure you haven't introduced some weirdness. If it is really true, you might need to call Oracle.
P.S. to Paul: In 7.3.4 you have to look in sys.filext$ for max size, i think. The units may be blocks, not bytes. you'll have to check.
You are right DBAtrix, I didn't have to sum, so I get rid of it in my query, and I'm getting the same result as with the sum. So I have no idea why I'm getting an actual size bigger than the datafile's limit (MAXSIZE).
Are you sure somebody didn't futz with the parameters for that datafile? You can set the size of a datafile and then set an autoextend value less than the datafile size. In addition, you can manually resize past the maxsize parameter.
--
For example, you have a datafile (/u01/somefile.dbf) that is 32M. If somebody issues:
alter database datafile '/u01/somefile.dbf' autoextend on next 4M maxsize 16M
you will get entries in dba_data_files similar to what you are seeing.
--
example 2: You have a 32M datafile (/u01/somefile.dbf) that is 32M and has autoextend on, next 32M and maxsize of 64M. You can issue:
alter database datafile '/u01/somefile.dbf' resize 64M
and get similar results.
Bookmarks