Adding a Database file

Issue/Symptom/Question

Datafiles are filling up.

Applies To

Oracle Database

DBA privileges

Resolution/Fix/Answer

PENTA and OnBase have separate databases and separate tablespaces.

Databases are made of up tablespaces such as PENTA, DBSPACE1, etc.

Run the following in your PENTA database to see what size the datafiles are.

select tablespace_name, file_name, bytes, maxbytes, online_status from dba_data_files;

OR

select file_name, bytes, maxbytes, online_status from dba_data_files where tablespace_name =
'[Insert ex: DBSPACE1 or PENTA here]' order by 1, 2;



  • The BYTES column shows how much space is being used and the MAXBYTES column shows you how much space is available.
  • Over time, these database files will fill up to their maximum size of 8G.  
  • If the PENTA tablespace fills up, you will get an 'unable to extend' error message.  See ORA-01653 unable to extend table in tablespace
  • To prevent this error from happening, you can add datafiles to the a tablespace proactively, with the following commands.  
  • You must log in / as sysdba and have set the ORACLE_SID correctly.  See Set the ORACLE_SID for sqlplus / as sysdba

Log into the Penta (e.g. PROD) database with sqlplus / as sysdba.

alter tablespace penta add datafile size 100M autoextend on next 100M maxsize 8000M;

Log into the OnBase (e.g. PROD_H) database with sqlplus / as sysdba

alter tablespace dbspace1 add datafile size 100m autoextend on next 100m maxsize 8000m;


NOTE: The same can be done for the other tablespaces. Just change the name of the tablespace in the command. 

**unlike screenshot, only alter tablespace once if there are not as many full tablespaces. In example tablespace was entered three times due to many tablespaces being full.Â