Ora 24345 ошибка усечения или извлечения пустой записи

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Closed

walpino opened this issue

May 24, 2016

· 7 comments

Comments

@walpino

I did this migration some weeks ago
and there were no problems
now I’m facing a problem like the following

[root@chbo1srv116 homegate_migration_prod_bigtables]# ora2pg -t COPY -o data.sql -b ./data -c ./config/ora2pg_data_hist.conf
[========================>] 1/1 tables (100.0%) end of scanning.
DBD::Oracle::st fetchall_arrayref failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 3 of 258, ora_type 1) [for Statement «SELECT «REF_PROPERTY»,»REF_HOUSE»,»REF_OBJECT»,»PUBLISHING_GROUP_ID»….ENERGY_DOC_FILENAME_ORIG_2″ FROM «xxx» a WHERE (TIME_STAMP < ‘2016-05-23’)»] at /root/perl5/lib/perl5/Ora2Pg.pm line 9958.
ERROR: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 3 of 258, ora_type 1)
[========================>] 21290000/21290000 rows (100.0%) Table IMMOPOOL_HISTORY (4446 sec., 4788 recs/sec)
[========================>] 21290000/21033059 rows (101.2%) on total estimated data (0 recs/sec)
[========================>] 21290000/21033059 rows (101.2%) on total estimated data (4447 sec., avg: 4787 tuples/sec)

I alread extended the value of
LONGREADLEN 100000000
but this doesn’t help

are there any other reason for this Problem ?

@darold

Hi,

Please use latest development code or the latest official release 17.4 and report the new error message. Here at line 9956 in Ora2Pg.pm there’s no call to the fetch method.

Best regards,

@walpino

I upgrade to the Version 17.4
but I still get this error
any ideas?

[root@chbo1srv116 homegate_migration_prod_bigtables]# ora2pg -t COPY -o data.sql -b ./data -c ./config/ora2pg_data_hist.conf
[========================>] 1/1 tables (100.0%) end of scanning.
DBD::Oracle::st fetchall_arrayref failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 3 of 258, ora_type 1) [for Statement «SELECT «REF_PROPERTY»,»REF_HOUSE»,»REF_OBJECT»,»PUBLISHING_GROUP_ID»….ENERGY_DOC_FILENAME_ORIG_2″ FROM «xxx» a WHERE (TIME_STAMP < ‘2016-05-23’)»] at /root/perl5/lib/perl5/Ora2Pg.pm line 10280.
ERROR: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 3 of 258, ora_type 1)
[========================>] 21290000/21290000 rows (100.0%) Table IMMOPOOL_HISTORY (3838 sec., 5547 recs/sec)
[========================>] 21290000/21033059 rows (101.2%) on total estimated data (0 recs/sec)
[========================>] 21290000/21033059 rows (101.2%) on total estimated data (3839 sec., avg: 5545 tuples/sec)

thanks

Kind regards

@darold

Can you, please, send me the description of the table? If you need privacy, send it to my private email?

Kind regards,

@darold

Hi,

I don’t think the issue comes from the LONGREADLEN value, you don’t have any LOB object in this table so the default value must be enough. The second error message reported by Oracle: «ERROR: ORA-01406 error on field 3 of 258, ora_type 1» look like a data type internal format problem. The error occurs on the third column that is defined as a VARCHAR2(80 BYTE) NOT NULL but I think you have made a binary upgrade of your data and the type have changed between the two database version. Something like in the report: http://siebelunleashed.com/truncation-or-null-fetch-error-occurred/

I’m afraid that this is an Oracle issue. What you can try is to enable LOG_ON_ERROR in ora2pg.conf and try to find what tuples are affected by this problem. On error, Ora2Pg will continue to try to fetch new DATA_LIMIT bulk of data. Adjust the WHERE clause and the DATA_LIMIT value (see ora2pg option -L) to try to find the affected data. Or you can use some query like «SELECT dump(COL3) FROM MYTABLE WHERE …» to look at the internal storage information and find the reason of the issue.

Let me know.

@walpino

Hi there
I changed the value of LOG_ON_ERROR 1
but I see no outputerror file

this is how I start the job

ora2pg -t COPY -o data.sql -b ./data -c ./config/ora2pg_data_hist.conf

Thanks

@darold

Ok that mean that the error appears immediatly and Oracle doesn’t return any rows. As I said, this is an Oracle internal type issue on your third column. You must try to identify the lines that have this corruption. If you can made an SQL export of the table using and other tool, recreate a new identical table and import data with the SQL import, Ora2Pg should be able to export the data from the new table. Otherwise the database corruption is worst.

@walpino

Hi
I exported the rows and inserted them in a new table
no problem

but the truncation is still happening on the new table

i guess I have to do some research more

but there is still a strange thing

the values in this table are the same as the values on other tables
and the other tables can be migrated to postgres

Thanks

Martin

2016-05-26 22:43 GMT+02:00 Darold notifications@github.com:

Ok that mean that the error appears immediatly and Oracle doesn’t return
any rows. As I said, this is an Oracle internal type issue on your third
column. You must try to identify the lines that have this corruption. If
you can made an SQL export of the table using and other tool, recreate a
new identical table and import data with the SQL import, Ora2Pg should be
able to export the data from the new table. Otherwise the database
corruption is worst.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#194 (comment)

2 participants

@darold

@walpino

May 31, 2021

I got ” ORA-24345: A Truncation or null fetch error occurred ”  error in Oracle database.

ORA-24345: A Truncation or null fetch error occurred

Details of error are as follows.

ORA-24345: A Truncation or null fetch error occurred

Cause: A truncation or a null fetch error

Action: Please ensure that the buffer size is long enough to store the returned data

A Truncation or null fetch error occurred

This ORA-24345 error is related to the truncation or a null fetch error.

Please ensure that the buffer size is long enough to store the returned data.

In order to fix this behavior, the incorrect mapping should be identified. Here are the steps to follow:

  1. Run the application with the /s parameter in order to trace the SQL statements generated. For more information, refer to 475564.1 or  477897.1.
  1. Navigate to the view where the behavior occurs and identify the applet raising the error.
  1. Note the applet and business component name using the menu File > Help > About View.

If the view contains several applets, to confirm which one is concerned, place the focus in one applet and press CTRL+Q then ENTER to run a query, the error will be displayed on the applet having the behavior.

  1. Open the trace file generated, and note the SQL generated by the faulty applet. The SQL statement is the one appearing just above the message:

An error has occurred executing a Sql statement.
Please continue or ask your systems administrator to check your application configuration if the problem persists.

  1. Open Siebel Tools and display the business component noted in step 3.
  1. One by one, take the columns listed in the SQL found in step 4, and search for the field that is mapped to this column. Compare the type between this field and the corresponding column in the table to search for discrepancies.

If the field type is DTYPE_TEXT, then compare the definition of the underlying column in the repository (with Siebel Tools) to the actual definition of the column in the database. Some fields come from the base table, that is, the table that the business component is based on. Some fields may also come from a joined table. In both cases, the field definition will be in the definition of the business component by looking at the Column and Join properties. However, some tables may appear in the SQL statement that are neither the base table nor join (explicit or implicit).

If this business component contains multi-value links with “Use Primary Join” properties set to “TRUE” and “Primary Id Field” set to an existing field, then the destination business component of the multi-value link should also be inspected for such discrepancies. The reason behind this is that the SQL generated will include columns related to multi-value fields of multi-value links set like this.

  1. Fix the discrepancies found. Most of the time, the field type is incorrect and should be corrected. Note, however, that not all discrepancies found have to be changed, especially regarding the standard Siebel field/column.

For example, if the field is of type DTYPE_BOOL, mapped to a column Varchar greater than 1 character, but functionally speaking is a Boolean, then, it should not be changed. If the error occurs because of this field, it means that a data was loaded with a value different than “Y” or “N”, which is not valid because a Boolean field works only with these values. This could happen for example, when in another business component based on the same table, has a field with a type DTYPE_TEXT mapped on the same column, hence, allowing an end-user to enter values different than “Y” or “N”. This could also happen because of an EIM load that put incorrect values. This is the case for the column ROW_STATUS in table S_ACCNT_POSTN, S_OPTY_POSTN and S_POSTN_CON that are Varchar with 10 characters but used by Boolean fields [Account Row Status], [Opportunity Row Status] and [Contact Row Status] in the Position business component (this is the flag “New” for Account, Opportunity and Contact). In this scenario, these columns should never contain something else than “Y” or “N”. If it is not the case, then the data should be corrected with an EIM batch for example.

In summary, if functionally speaking the type of the field is correct, then the data is incorrect. Therefore focus on determining how this data was loaded (another field, Workflow, EIM, etc.). If not, then the type is not correct.

The SQL script provided in Attachment 476591.1:1 may be useful for finding discrepancies in the repository. This script should be run with SQL*Plus, connected as the Siebel table owner. It generates a spool file with mappings for the cases mentioned previously. This list may be used during steps 6 and 7 to narrow down the column(s) generating the error. Once again, as explained in above step 7, all the discrepancies listed should not be considered. However, this script does not take into account the difference between the logical and physical repository.

Other possible causes for error ORA-24345

For Siebel Versions that use an Oracle 11 RDBMS, there is a related Oracle RDBMS product defect and Siebel product defect that can also cause this error, ORA-24345 “A Truncation or null fetch error occurred”.

A test case that illustrates this product defect is the following:

In Tools, create a new flag column with DataType – Character, Length – 1, Default Value – Y/N in an existing table. Apply the created column on the physical db using ddldict/ddlimp and verify the length of the default values populated in the column created. The column gets created with length 1 but the values have 3 trailing spaces making the length of the string = 4.

 The workaround is to change the session parameter for the Oracle Server DB as follows:

alter session set “_add_col_optim_enabled”=false ;

The above hidden parameter needs to be set up on the Oracle server to avoid the problem.

This is discussed in this document  1073581.1 – Siebel Merge or Delta Merge Fails With “Unable to connect to the database” And “ORA-24345: A Truncation or null fetch error occurred” In The MERGE Log

Also, for all Siebel versions supporting Oracle 10.2 databases, error message ORA-24345 can occur when using Oracle client version 10.2.0.2. Downgrading to 10.2.0.1 or upgrading to 10.2.0.3 fixes the problem.

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Ora-24345: ошибка усечения или нулевой выборки при импорте данных с sqluld2
После поисков в Интернете большую часть дня это в основном результат: safe = yes, но я установил его безрезультатно.

 safe    = use large buffer to avoid ORA-24345 error (Yes|No)   

После этой настройки буфер будет удвоен, и описание sqluldr2 также указывает на то, что установка yes может избежать ошибки ORA-24345, мне интересно, это ситуация бога-коня.
Сразу после того, как я неоднократно искал информацию, я оглянулся на статьи, которые читал ранее:https://wenku.baidu.com/view/dfc7ebd7f01dc281e53af0a0.html


Установка safe = yes перед этим и установка width также бесполезны. Если вы посмотрите поближе, кодировка символов преобразуется. Конечно, я изменил charset = UTF-8 на charset = ZHS16GBK.

Итак, это яма. Должно быть, что длина буфера увеличилась вдвое после safe = yes, но она все равно меньше фактической длины, поэтому настройка safe = yes по-прежнему недействительна. К счастью, автор (Лу Fangxin) написал более подробно. К счастью, я прочитал это больше, иначе я не могу найти проблему.

ora-24345: произошла ошибка усечения или нулевой выборки
Настройки:safe=yes charset=ZHS16GBK
Когда sqlldr импортирует настройки, файл конфигурации ctl также должен быть указан в следующей строке LOAD DATA:CHARACTERSET 'ZHS16GBK'

Оператор запроса кодирования базы данных:

 select * from nls_database_parameters where parameter ='NLS_CHARACTERSET';

Solution for error «fdlget failed due to ORA-24345 : A Truncation or Null fetch error occurs» for Table Type value set.

Suppose you define one concurrent program say «Custom Trial Balance Report».
For this program you have three parameter as below given.
a) Ledger Name
b) Period Name
c) Cost Center

While defining value set for Ledger name suppose you set its Maximum size as 20.



And same value set you attached to you concurrent program. While running concurrent program when you try to get value for Ledger Name parameter it may be give you above screenshot error. if it exist ledger name with size greater than 20.

Solution:

Kindly change your value set Maximum size to exact size for table column width.
in this case GL_LEDGERS.NAME column size is 30 char.

Once you made changes to value set. Kindly save the changes and try to run concurrent program.

Now you can see error for value set is resolved.

База данных: 12c Выпуск 1
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 12c Выпуск 1
Код ошибки: ORA-24345
Описание: A Truncation or null fetch error occurred
Причина: A truncation or a null fetch error»
Действие: Please ensure that the buffer size is long enough to store the returned data.

База данных: 10g Выпуск 1
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 10g Выпуск 2
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 11g Выпуск 1
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 11g Выпуск 2
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 12c Выпуск 2
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 18c Выпуск 1
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

База данных: 19c Выпуск 1
Код ошибки: ORA-24345
Описание: ошибка усечения или извлечения пустой записи
Причина: Обрезание или ошибка выборки «
Действие: Пожалуйста, убедитесь, что размер буфера достаточно велик для хранения возвращаемых данных.

Понравилась статья? Поделить с друзьями:
  • Ora 20999 описание ошибки
  • Ora 20500 ошибка
  • Opera gx прервано ошибка загрузки
  • Ora 20103 ошибка
  • Ora 20001 ошибка oracle