How Can We Help?

Search for answers or browse our knowledge base.

Documentation | Demos | Support

< All Topics
Print

How to Extend Oracle tablespace (LOB_TABLESPACE, USERS, etc.) when almost full

Caution: Pay close attention to which tablespace names the logs or alerts identify for extension. LOB_TABLESPACE is usually affected, but it can be USERS or other tablespaces. All tablespaces are extended the same way; substitute the appropriate tablespace name.

Tablespace summary

In DLP 14.x and later, you can view the “Tablespace Summary” in the DLP Enforce console.

Note: This summary does not fully describe the tablespace, such as the location of the database files.

Locate the Oracle database files

Before you can extend the tablespace, you need to know where the current Oracle database files are located.

Use the following command:

select file_name from sys.dba_data_files;

The resulting output is similar to the following, which indicates each database file’s directory and file name (.DBF extension):

E:ORACLEORADATAPROTECTSYSTEM01.DBF
E:ORACLEORADATAPROTECTSYSAUX01.DBF
E:ORACLEORADATAPROTECTUNDOTBS.DBF
E:ORACLEORADATAPROTECTDRSYS01.DBF
E:ORACLEORADATAPROTECTLOB01.DBF
E:ORACLEORADATAPROTECTLOB02.DBF
E:ORACLEORADATAPROTECTLOB03.DBF
E:ORACLEORADATAPROTECTUSERS01.DBF
E:ORACLEORADATAPROTECTUSERS02.DBF
E:ORACLEORADATAPROTECTUSERS03.DBF

Note: You can also use Oracle Enterprise Manager to locate the database files.

Extend the tablespace

To add tablespace through SQL, log inconnecting to the database using sys as sysdbaand enter the following:

ALTER TABLESPACE <tablespace name>
ADD 
DATAFILE '<directory and datafile name>' SIZE 138240K
REUSE AUTOEXTEND 
ON NEXT 10240K MAXSIZE 32767M; 

Based on the sample output under “Locate the Oracle database files”, if it is “LOB_TABLESPACE” which is full, the newly created database file is named “LOB04.DBF”.

Here is a specific example that adds a new database file to the “LOB_TABLESPACE”:

ALTER TABLESPACE LOB_TABLESPACE
ADD 
DATAFILE 'D:ORACLEORADATAPROTECTLOB04.DBF' SIZE 138240K 
REUSE AUTOEXTEND 
ON NEXT 10240K MAXSIZE 32767M;

Additional information

  • On some systems using Oracle 11g, you may need to omit the quotes surrounding the tablespace name (e.g. ALTER TABLESPACE LOB_TABLESPACE ADD DATAFILE…).
  • You can gain tablespace by deleting incidents, as Oracle overwrites the deleted data when new incidents come in. However, deleting incidents will not work if your tablespace is already full. For more information
Was this article helpful?
4.7 out of 5 stars
5 Stars 33%
4 Stars 67%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents