Can one resize tablespaces and data files?

santosh
Posts: 1311
Joined: Wed Sep 07, 2016 4:43 pm

Can one resize tablespaces and data files?

Postby santosh » Sat Nov 12, 2016 2:52 pm

Can one resize tablespaces and data files?

raoneel2016
Posts: 824
Joined: Wed Oct 05, 2016 2:40 pm

Re: Can one resize tablespaces and data files?

Postby raoneel2016 » Sat Nov 12, 2016 2:55 pm

You can manually increase the size of a datafile

ALTER DATABASE DATAFILE 'filename2' RESIZE 100M;
Because you can change the sizes of datafiles, you can add more space to your database without adding more datafiles. This is beneficial if you are concerned about reaching the maximum number of datafiles allowed in your database.
Manually reducing the sizes of datafiles allows you to reclaim unused space in the database. This is useful for correcting errors in estimates of space requirements.
Also, datafiles can be allowed to automatically extend if more space is required. Look at the following command:

CREATE TABLESPACE pcs_data_ts
DATAFILE 'c:\ora_apps\pcs\pcsdata1.dbf' SIZE 3M
AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED
DEFAULT STORAGE ( INITIAL 10240
NEXT 10240
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0)
ONLINE
PERMANENT;


Return to “Oracle”

Who is online

Users browsing this forum: No registered users and 1 guest