Oracle Tablespace multiple datafile with autoextend and maxsize

I’m completely new to Oracle Database and I’m trying to learn it. My goal today is to create a simple tablespace with one datafile and then add a new datafile to that tablespace.
With this I understand that my tablespace will start at 1M and will automatically extend(50M each time) until it reaches 1000M.

CREATE TABLESPACE simple_tablespace DATAFILE '/oracle/app/oracle/oradata/ORACLE/datafile/simple_tablespace_01.dbf' SIZE 1M AUTOEXTEND ON NEXT 50M MAXSIZE 1000M;

Lets assume that my tablespace is already at 1000M and instead of having one single big datafile, i want to have multiple datafile.
What is the best way to handle this situation?
The relation between Tablespace MAXSIZE, datafile SIZE and the number of datafile in a tablespace is not 100% clear for me.

  1. SIZE is how big the new file should be when created, at the start.
  2. NEXT enables autoextend functionality to add that much more space
    every time the existing file is full.
  3. MAXSIZE is an autoextend
    parameter that tells the autoextend functionality when to stop
    extending the file, so sets a limit to how large the file can get.

None of the above have anything to do with the tablespace. They control the individual datafile. When you create a tablespace it needs at least one starting datafile, and that’s the one you’ve specified in your CREATE TABLESPACE command, so those size settings are all related to that first file, not the tablespace itself. There is no (within reason) maximum size for a tablespace, at least not one we define ourselves.

As long as you don’t define your tablespace as BIGFILE, you can add as many datafiles to it as you’d like whenever you’d like:

ALTER TABLESPACE simple_tablespace ADD DATAFILE '....' SIZE ....

With multiple files in a tablespace, Oracle will interleave extents across the files, causing any autoextending that you’ve enabled on any of them to continue increasing the file sizes up to their max, but more slowly. You don’t want lots of files – fewer is better. However, a traditional datafile is limited to 32G, so once you get to that point you’re forced to grow by adding more files.

Alternatively, you can create one huge tablespace with BIGFILE and then you are no longer limited to a 32G file size. But then you only get one file. Autoextend is necessary to keep it growing.

In most cases, BIGFILE (one file per tablespace) is preferrable in modern times. Adding datafiles when more space is needed becomes a management headache and requires custom scripting. And we rarely run on boxes with local storage where we have to manually manage I/O across different disks, which is the old reason for multiple files. Most of us are using storage arrays that handle all that for us, so a single file works just as performantly and is a lot easier to manage.

0

One correction. The max size of the tablespace is determined by the blocksize. With a default blocksize of 8k, the max size of a tablespace is 32G, regardless if it’s BIGFILE or SMALLFILE(s).
If it’s BIGFILE, the files can be 32TB. It’s small file, you can have up to 1023 files, each of about 4million blocks.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật