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).
Observed in CAST AIP
Observed on RDBMS
|Microsoft SQL Server|
Step by Step scenario
- Package the source code.
- Deliver it via DMT and accept the delivery in CAST-MS.
- Deploy the source code and run the analysis.
- Analysis fails with SQL error in the analysis log.
Perform the below actions
- Open the analysis log and check the SQL error
- 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:
- 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.
- 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
- 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
- CAST Support Tool (CST) - alias Sherlock export with the following options Export Logs, Export Configuration files, Export CAST Bases with Management Base, Knowledge Base and Export source code
Ticket # 10666
Specify pages indirectly related to this topic.(eg:side- effects)