Oracle Database assigns each datafile two associated file numbers, an absolute file
number and a relative file number, that are used to uniquely identify it
Absolute:Uniquely identifies a datafile in the database. This file number can be used in many SQL statements that reference datafiles in place of using the file name. The absolute file number can be found in the FILE# column of the V$DATAFILE or V$TEMPFILE view, or in the FILE_ID column of the DBA_DATA_FILES or DBA_TEMP_FILES view
Relative:Uniquely identifies a datafile within a tablespace. For small and medium size databases, relative file numbers usually have the same value as the absolute file number. However, when the
number of datafiles in a database exceeds a threshold (typically 1023), the relative file number differs from the absolute file number. In a bigfile tablespace, the relative file number is always
1024 (4096 on OS/390 platform).
--2.修改最大文件数限制,否则,超过200就会报错
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 200
sql>alter system set db_files=5000 scope=spfile;
sql>startup force;
3.通过匿名块增加1020个数据文件.
begin
for i in 1..1020 loop
execute immediate 'alter tablespace ts_test add datafile ''/u01/app/oracle/oradata/sztech1/ts_test' || i || '.dbf'' size 1m';
end loop;
end;
SQL> select count(*) from v$datafile;
COUNT(*)
----------
1026
4.察看相对文件号和绝对文件号,不一样了
SQL> col file_name for a50
SQL> select * from (select file_name,file_id,relative_fno from dba_data_files where tablespace_name='TS_TEST' order by file_id desc)
where rownum<5