Ошибка ora 01691

I get the below error when I try to insert data in the database.

ORA-01691: unable to extend lob segment XXXXXX by 8192 in tablespace USERS

I’m using an Oracle database (express 12c version). Googling the error I found that it means that there no more space in the tablespace and you need to increase the dimension of your datafile or the number of datafile you are using. I have 5 datafile of 30 GB and one of them is empty so I don’t understand what the problem is.

Edit

SYSTEM      793,19      800     99,15   32768   2,42

SYSAUX      2203,56     2320    94,98   32768   6,72

UNDOTBS1    48,13       23345   0,21    32768   0,15

USERS       153534,5    30720   499,79  30720   499,79

USERS       153534,5    30720   499,79  30720   499,79

USERS       153534,5    30720   499,79  30720   499,79

USERS       153534,5    30720   499,79  30720   499,79

USERS       153534,5    30720   499,79  30720   499,79

Описание фона: веб-сервер пользователя внезапно появляется данные, которые не могут быть написаны, и журнал проверки см. В разделе, что проблема выглядит следующим образом:

ORA-01691: лоб сегментUSERS.SYS_LOB0000087483C00004$$Невозможно расширить 8192 (в пользователей табличного пространства).в результате чегоДанные не могут быть написаны.

Обработка аварийной аварийной аварийной обработки: Запрос информации, связанной с ошибкой, ответ недостаточен, а файл данных добавляется. Используйте этот метод для успешного решения его. После запроса автоматическое расширение было установлено.

Позже я вдруг подумал, что это будет ограничение по размеру файла, поэтому используйте ключевые слова: Одиночный запрос Ограничение Ограничения Ограничение Техническая документация, результаты находят следующие:

Когда табличное пространство Maxsize Unlimited:

В системе Linux в случае размера блока 8k максимальный размер файла данных составляет 32 ГБ.

Когда размер пространства таблицы установлен (Maxsize 4096m):

Значение размера данных предварительно установлено.

3. Решение:

A. Когда размер файла данных имеет значение настройки (MAXSIZE 4096M): увеличить размер файла данных, максимум не превышает 32G.

alter database datafile 'Путь файла' autoextend on next 100m maxsize 10240M;

B. Когда пространство таблицы Maxsize Unlimited: вы можете добавить только файл данных.

alter tablespace xxx add datafile 'Путь файла данных 'Размер 1000 м Autoextend на следующий 100 м Maxsize Unlimited

В случае размера блока данных Data Oralce по умолчанию один файл до 32G; файл данных может достигать корпуса 32T в 8K, используя большой файл.

Размер блока по умолчанию не может быть изменен, если вам нужно изменить базу данных;

Это зависит от этого задачи решения: 1, добавьте файлы данных. 2, используйте большие файлы. 3, измените размер блока данных.

Вот подробное решение:

Окружающая среда: Linux.системаИнструмент: PL / SQL разработчик

Шаг 1: Просмотр имени и файла табличного пространства:

select tablespace_name, file_id, file_name,

round(bytes/(1024*1024),0) total_space

from dba_data_files

order by tablespace_name

Шаг 2: Увеличьте желаемое табличное пространство:

Изменение базы данных DataFile «Табличное пространство» Расположение «Изменение размера нового размера»

Например:

alter database datafile ‘oracleoradataanita_2008.dbf’ resize 4000m

Для оракулабаза данныхТабличное пространство, в дополнение к ручному увеличению, увеличьте файл данных или тому подобное, чтобы расширить размер табличного пространства.

Метод 1: Добавить номер файла данных

Изменить имя таблицы табличного пространства
Добавить файл данных «Новый файл файла данных» Размер файла данных

Например:

alter tablespace ESPS_2008
     add datafile ‘oracleoradataanita_2010.dbf’ size 1000m

Способ 2: Установить табличное пространство автоматического расширения

Изменение базы данных DataFile «Файл данных»
AUTOVEXTENC на следующий автоматический расширенный размер Maxsize максимальный размер расширения

Например:

alter database datafile ‘oracleoradataanita_2008.dbf’

      autoextend on next 100m maxsize 10000m

Метод 3: Использование таблицы запросов:

select a.tablespace_name,a.bytes/1024/1024 «sum MB»,

(a.bytes-b.bytes)/1024/1024 «used MB»,b.bytes/1024/1024 «free MB»,

round (((a.bytes-b.bytes)/a.bytes)*100,2) «used%» from

(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,

(select tablespace_name,sum(bytes) bytes,max (bytes) largest from dba_free_space group by tablespace_name)b

where a.tablespace_name=b.tablespace_name

order by ((a.bytes-b.bytes)/a.bytes) desc;

 

Autoextensible datafiles still have a size limit.

select file_id, bytes, maxbytes from dba_data_files where tablespace_name = 'XYZ';

Maxbytes is the maximum size of the datafile, it can not grow beyond that. If bytes = maxbytes, you have two options:

1) increase the maximum size (maxbytes) as (15 is the file_id from above query), for example to 10G:

alter database datafile 15 autoextend on maxsize 20G;

Datafiles have a hard limit for the maximum size, it is 2^22 * block_size for smallfile tablespaces, and 2^32 * block_size for bigfile tablespaces.

If you use a tablespace with 8K block size, then the maximum size of your datafile is 32 GB. If your datafile is already at that size, you can not increase it any further, there comes option number two:

2) add a new datafile to the tablespace, for example:

alter tablespace xyz add datafile '/path/to/datafiles/xyz02.dbf' size 100M autoextend on next 100M maxsize unlimited;

This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:

  • Auto-Correlating Session IDs in Oracle Application Test Suite (OATS)
  • Removing «Compatibility setting is not supported» Warning before You Do OpenScript Recording
  • How to Configure Scripts to use Databanks in OATS
  • How to Create Load Testing Scripts Using OpenScript

Today, I have seen the following message:

ORA-1691: unable to extend lobsegment OLT.SYS_LOB0000079598C00002$ by 128 in tablespace USERS

from alert/log.xml, which was reported by the Oracle DB of OATS.[1]

In this article, we will show:

  1. How to investigate
  2. How to provide the solution

ORA-01691

If you see «ORA-01691» error, normally this means that the tablespace is full or that there is not an extent (aka chunk) available that fits the size needed.[2]

To investigate further, you can query the DB with the following SQL commands:[2]

SQL> set long 100000
SQL> select dbms_metadata.get_ddl('TABLESPACE','USERS') from dual;

DBMS_METADATA.GET_DDL('TABLESPACE','USERS')
--------------------------------------------------------------------------------

  CREATE TABLESPACE "USERS" DATAFILE
  '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users01.dbf' SIZE 5242880

  AUTOEXTEND ON NEXT 1310720 MAXSIZE 32767M
  LOGGING ONLINE PERMANENT BLOCKSIZE 8192
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT
NOCOMPRESS  SEGMENT SPACE MANAGEMENT AUTO
   ALTER DATABASE DATAFILE
  '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users01.dbf' RESIZE 34359
214080

When I checked the used% of tablespace USERS, it showed that it’s almost 100% full. So, the error is due to the tablespace being full.

SQL>  select * from dba_tablespace_usage_metrics order by used_percent desc;

TABLESPACE_NAME                USED_SPACE TABLESPACE_SIZE USED_PERCENT
------------------------------ ---------- --------------- ------------
USERS                             4194128         4194302   99.9958515

The Solution

You can find out what schema (or user) uses tablespace USERS by issuing the following SQL command:

SQL> select owner, table_name,tablespace_name from dba_tables where tablespace_name='USERS';

From the output, we know tablespace USERS is shared by the following users:

  • OATS
  • OLT
  • OTM

In our environment, we have used OLT to run load tests. For OLT, typically it is the session data that is taking most of the space in the DB. As an immediate workaround, you can try removing sessions from OLT Controller
UI. However, it may run very slowly because tablespace USERS has already run out of space. To facilitate the session-removing task from OLT Controller UI, I have added 100MB to the tablespace USERS by giving it a second datafile:

SQL> ALTER TABLESPACE users ADD DATAFILE '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users02.dbf' size 100m;

Tablespace altered.

By adding some space to the tablespace, it helped smooth out the task of session removing. Admittedly, it was still a slow process. But, the solution worked.

References

  1. Oracle Application Testing Suite
  2. ORA-01691: unable to extend lob segment (OTN)
  3. Administering Tablespaces
  4. SQL Purge command
  5. Folllow @OracleAskTom
  6. Oracle Load Testing Overview
  7. Oracle Test Manager Overview

Error: «ORA-01691: unable to extend lob segment»

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

Symantec Data Loss Prevention (DLP) Enforce server is filling up with .bad files located in your Data Directory:

  • ProgramDataSymantecDataLossPreventionServerPlatformCommonIncidents
  • var/Symantec/DataLossPrevention/ServerPlatformCommon/Incidents

Additionally, a 404 browser redirect error may be present when navigating in the Enforce Server console.

IncidentPersister0.log

Caused by: com.vontu.incidenthandler.TransientPersistingException: com.vontu.model.DataAccessRuntimeException: org.apache.ojb.odmg.TransactionAbortedExceptionOJB: Can't commit objects:
* SQLException during execution of sql-statement:
* sql statement was 'INSERT INTO MessageLob (messageLobID,messageID,networkOriginalMessage,keyAlias) VALUES (?,?,?,?) '
* Exception message is [ORA-01691: unable to extend lob segment PROTECT.SYS_LOB00000216545649C00003$$ by 2768 in tablespace LOB_TABLESPACE
]
* Vendor error code [1691]
* SQL state code [72000]

IncidentPersister.log may also contain following entries as well.

Unable to extend Tablespace USERS
Unable to extend Tablespace LOB_TABLESPACE

Cause

This is due to the named TABLESPACE in the DLP Oracle database running out of space which then prevents the Enforce Server from processing incidents.

Resolution

Confirm whether either the LOB or USERS TABLESPACE is full:

  1. Log into the Enforce console.
  2. Go to  System > Database > Tablespaces Summary
  3. Find the entries for LOB_TABLESPACE or USERS in the Tablespaces Allocation table.

NOTE: If you cannot access the console, you may run the following query in sqlplus as sysdba to see tablespace usage instead: 

-------------------------------------------------------------------------------

set pages 100
set lines 100
SELECT d.status "Status",
  d.tablespace_name "Name",
  TO_CHAR(NVL(a.bytes / 1024 / 1024, 0),'99999990D900') "Size (M)",
  TO_CHAR(NVL(NVL(f.bytes, 0), 0)/1024/1024 ,'99999990D900') "Free (MB)",
  TO_CHAR(NVL((NVL(f.bytes, 0)) / a.bytes * 100, 0), '990D00') "Free %"
 FROM sys.dba_tablespaces d,
  (select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name) a,
  (select tablespace_name, sum(bytes) bytes from dba_free_space group by tablespace_name) f
  WHERE d.tablespace_name = a.tablespace_name(+)
  AND d.tablespace_name = f.tablespace_name(+)
  AND NOT (d.extent_management like 'LOCAL'  AND d.contents like 'TEMPORARY')
 order by "Free %";

-------------------------------------------------------------------------------

You should see an output similar to the following with a lower FREE % nearing 0%:

To resolve the issue:

  1. Increase the size of the LOB_TABLESPACE (see Oracle tablespace (LOB_TABLESPACE, USERS, etc.) for DLP is full, almost full, or critically full (broadcom.com)).
  2. You have the following two options to clear up the .bad files
    1. Rename the .bad files  to .idc which should allow the incidents to be processed (Recommended)
    2. Delete the .bad files (These incidents will be permanently lost)

References:

What is a .bad file? (broadcom.com)

Where is the Oracle alert_protect.log? (broadcom.com)

Information about the LOB_TABLESPACE in DLP (broadcom.com)

Oracle tablespace (LOB_TABLESPACE, USERS, etc.) for DLP is full, almost full, or critically full (broadcom.com)

Attachments

Feedback

thumb_up
Yes

thumb_down
No

Понравилась статья? Поделить с друзьями:
  • Ошибка ora 01652 невозможно увеличить временный сегмент
  • Ошибка ora 01476
  • Ошибка ora 01427
  • Ошибка ora 01400 cannot insert null into
  • Ошибка ora 01110