cancel
Showing results for 
Search instead for 
Did you mean: 

Error during upgrade Database to 8.82 PL4 version

Former Member
0 Kudos

Hi all, I am trying to upgrade some database to 8.82 version from 2007 A SP01 PL 11, on 2 databases the upgrade process fail. In the attachment you will find the log. Someone never had same problem? I search in the SDN but I didn't find anything about it.

SAP 8.82 PL04

SQL 2008

WINDOWS SERVER 2008

Best regards, Antonio.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The solution proposed by sap

Restoring the numbering file will solve this issue.


In order to successfully upgrade the databases, please follow the below steps:


- back up the database before running the restore

- Open Business One -> Help -> Support Desk-> Restore-> Restore Numbering File

- Run this utility

- back up the database

- Proceed with the upgrade, which should be successful

The database was succesfully upgraded.

Antonio.

former_member186095
Active Contributor
0 Kudos

Hi,

Congrats to your successful upgrade.

Pls close this thread answered.

Rgds,

JimM

Former Member
0 Kudos

Sorry but with this new SCN version I don't know how I made to close it.

Can you explain me?

Thank's Antonio.

former_member193355
Contributor
0 Kudos

Hi Antonio,

You can close the thread by click correct answer to one of the most correct reply.

Steve

Answers (4)

Answers (4)

former_member186095
Active Contributor
0 Kudos

Hi,

You can try to use this following SAP note to solve your problem :

1645439  - Upgrade fails: String or binary data would be truncated    
Version   2   Validity: 08.02.2012 - active
Language   English 
    

Content:      Summary    |    Header Data    |    References    |    Validity 

 

Symptom

Upgrade to SAP Business One 8.81 patch 10 or later can fail with following error raised by SQL Server (can be found in upgrade log file):

[SQL Server]String or binary data would be truncated.

This can be caused by incorrect definition of length limit for User-Defined Field (UDF), when string stored in database contains more characters then allowed by length limit. In such case, string length limit for the affected UDF needs to be increased.

Following SQL query will help you to detect such UDFs. Please note that the query execution can take from minutes to several hours depending on number of UDFs in your database:

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

                  declare @TableID nvarchar(20);

                  declare @AliasId nvarchar(18);

                  declare @EditSize smallint;

                  declare @RealSize smallint;

                  declare @statement nvarchar(max);

                  declare @params nvarchar(max);

                  declare alfa_udfs cursor for

                  select TableID, AliasID, EditSize from cufd where TypeID = 'A';

                  open alfa_udfs;

                  FETCH NEXT FROM alfa_udfs

                  INTO @TableID, @AliasId, @EditSize;

                  WHILE @@FETCH_STATUS = 0

                  BEGIN

                        IF  EXISTS (SELECT * FROM sys.tables WHERE name = @TableId)

                        BEGIN

                              set @RealSize = 0

                              set @params = '@RealSizeOut smallint output';

                              set @statement = 'select @RealSizeOut = max(len(U_' + @AliasID + ')) from [' + @TableId + '] where U_' + @AliasID +' is not null';

                              EXECUTE sp_executesql @statement, @params, @RealSizeOut = @RealSize OUTPUT;

                              if @RealSize is not null

                              BEGIN

                                    if @EditSize < @RealSize

                                    BEGIN

                                          select @TableID As TableName, 'U_' + @AliasId As UDFName, @RealSize As RealSize, @EditSize As DefinedSize

                                    END

                              END

                        END

                        FETCH NEXT FROM alfa_udfs

                        INTO @TableID, @AliasId, @EditSize;

                  END

                  CLOSE alfa_udfs;

                  DEALLOCATE alfa_udfs;

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

Results:

Results will contain a table, showing the list of UDFs affected by this issue. If there is no result, you are not affected by this issue.

Column TabeName shows table, which contains the UDF.

Column UDFName shows the name of affected UDF.

Column RealSize shows the length of longest string stored in UDF.

Column DefinedSize shows length limit from UDF definition.


 

Cause

Consulting


 

Solution

Extend the UDF field length limit in SAP Business One.

1. Go to Tools -> Customization Tools -> User-Defined Fields - Management

2. Search for a UDF with Title as UDFName from query results (without 'U_')

3. Select the UDF and click 'Update'

4. Edit the Length value, set it to RealSize from query results

5. Update the UDF definition

Once you do this for all UDFs from results, please try to run upgrade again.


 

Other terms

UDF


   
       

Header Data

  
Released on 08.02.2012 16:11:19   
Release status Released for Customer   
Component SBO-BC-UPG Upgrade   
Priority   Recommendations/additional info   
Category   Consulting   
  
      

References

This document refers to:

  CSS SAP Notes
1627224 Adding more UDF fields to OUSR causes shut down on logon
1357462 Upgrade Wizard Precheck: Collective note for all check items

This document is referenced by:

   SAP Business One Notes 
  1686964   Upgrade Wizard Pre Check: Structure of User-Defined Fields has been modified
 
   
      

Validity

Software Component

Version

SAP BUSINESS ONE

8.81

8.82

    

Rgds,

JimM

Former Member
0 Kudos

Hello Jimmy and thanks for your reply.

Your query has been helpful for me to find the corrupted user field (I wrote to SAP and they responds with the same query). However the upgrade still fail. I sent the new log files to SAP and I wait the response.

Thanks a lot,

Best regards, Antonio.

Former Member
0 Kudos

Of course that is not a typical requirement. However, if you face the problem with certain table upgrade, you must have some special problem that upgrader cannot handle.

gianluca_calloni
Participant
0 Kudos

AZIENDA 9:

In your log file there is this string :

03/04/2012  09:44:19:154366  Upg          Err            FromVersion=800235 ToVersion=882066 table=OITM, qurStr=UPG_UpdateOneTable() - error in GetFromTempTable() file:㩤摜灥瑯䉜单䉍䉟就⸸㈸剟䱅卜佂㡜㠮弲䕒屌灁汰捩瑡潩屮扏䵪牧停䝏湥㄰挮 line#1855, errString=[Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated.

It seems you hav an "error" in OITM table...

Former Member
0 Kudos

Hi Antonio,

Have you run it as an administrator?

How much free spaces on the hard drive?

Thanks, Gordon

Former Member
0 Kudos

Hi Gordon,thanks for your reply.

I run it as administrator and there is enough space on the hard drive. Before these two databases I upgraded other ones bigger than these ones.

Thanks, Antonio.

Former Member
0 Kudos

You may need to update certain UDF/UDT and recreate them to fit the new version.

Former Member
0 Kudos

In the log SAP refers to standard tables (OITM and AWO2), because I need to delete UDF or UDT?

Former Member
0 Kudos

Are there UDFs added to the table?

Former Member
0 Kudos

In the OITM table yes, in the AWO2 no.

Former Member
0 Kudos

I am afraid your have problematic UDF in OITM. Export the value and delete them if you can not edit them directly and then recreate.

Former Member
0 Kudos

Ok, thank you for the support.

However I can't believe that to upgrade a database i must delete and recreate the user fields.

I opened a message to SAP, If they responds to me I post here the solution

Thanks again, Antonio.