Purpose (problem description)

This page will help you to find a solution, if your analysis is failing with the below mentioned error and can be seen in the analysis log file.

 

SQL Error: ERROR: value too long for type character varying(30).
SQL Error: CONTEXT: PL/pgSQL function i_opetrack(integer,character varying) line 13 at SQL statement.
SQL Error: SQL statement "select I_OpeTrack (1 /*CWMM_UPDATE_STATISTICS*/, 'UpdateStats : AppW stat updated')".
SQL Error: PL/pgSQL function updateappwarehousestats() line 47 at SQL statement (Severity 1, Msg No 1).


Figure 1

Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
8.2.x(tick), x<10
8.1.x(tick)
8.0.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(tick)
CSS2(tick)

Step by Step scenario

  1. Package the source code.
  2. Deliver it via DMT and accept the delivery in CAST-MS.
  3. Deploy the source code and run the analysis.
  4. Analysis fails with SQL error in the analysis log.
Action Plan

Perform the below actions

  1. Open the analysis log and check the SQL error
  2. From the screen shot above we could see that the function which is failing is i_opetrack from Knowledge base, go to pgadmin and see the datatype by navigating to line 13 as seen in the error log:
    Figure 2

  3. The issue is due to the fact that the object which is making the analysis to fail has value more than 30 characters long.
    The table allows a name of up to 50 characters long, but the function stores the field in a variable (highlighted above) which is 30 characters long.
  4. Attached is the SQL script that will replace the existing function from 30 chars to 50 chars, This issue has been fixed in CAST 8.2.10
  5. If after running the script followed by running the analysis,if the issue is not fixed then contact CAST Technical Support. with the following Relevant input

 

Relevant input

  • CAST Support Tool (CST) - alias Sherlock export with the following options Export Logs, Export Configuration filesExport CAST Bases with Management Base, Knowledge Base and  Export source code 
Notes/comments

Ticket # 10666

Related Pages

Specify pages indirectly related to this topic.(eg:side- effects)