SYMPTOM
While configuring a new Strategy Enterprise Manager 9.x environment, the following error is received during the warehouse configuration stage:
Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. ORA-01704: string literal too long
The error occurs in one of the following SQL pass of the "em_sql_ora.sql" SQL script that runs at the end of the Transfer process:
INSERT INTO EM_SQL VALUES (1,1,3,4,9,1,'INSERT INTO IS_REP_FACT
SELECT DISTINCT MAX(RS.RECORDTIME),
MAX(SES.EM_LOAD_TS),
MAX(SES.IS_SERVER_ID),
................................
...............................
...............................
FROM IS_CACHE_HIT_STATS CHS
WHERE CHS.CACHESESSIONID = RS.SESSIONID
AND CHS.JOBID = RS.JOBID)
AND SES.IS_SERVER_ID <> -1
GROUP BY RS.SESSIONID,RS.JOBID')
INSERT INTO EM_SQL VALUES (1,1,3,4,10,1,'INSERT INTO IS_REP_FACT
SELECT MAX(CHS.RECORDTIME),
MAX(SES.EM_LOAD_TS),
MAX(SES.IS_SERVER_ID),
..............................
..............................
..............................
AND CHS.RECORDTIME < LU.IS_WIN_END
AND ((CHS.CACHEHITTYPE = 0 AND RF.IS_CACHE_HIT_ID = 0 AND CHS.JOBID = -1)
OR (CHS.CACHEHITTYPE = 1 AND CHS.JOBID <> -1))
AND SES.IS_SERVER_ID <> -1
GROUP BY CHS.CACHESESSIONID, CHS.CREATORSESSIONID, RF.IS_REP_JOB_ID, CHS.CACHEINDEX');
INSERT INTO EM_SQL VALUES (1,1,3,4,11,1,'INSERT INTO IS_REP_FACT SELECT MAX(CHS.RECORDTIME),
MAX(SES.EM_LOAD_TS),
MAX(SES.IS_SERVER_ID),
CHS.CACHESESSIONID,
CHS.CACHESESSIONID,
..................
...................
WHERE CHS.RECORDTIME >= LU.IS_WIN_BEGIN
AND CHS.RECORDTIME < LU.IS_WIN_END
AND CHS.CACHEHITTYPE IN (0,1,2)
AND SES.IS_SERVER_ID <> -1
GROUP BY CHS.CACHESESSIONID, RS.JOBID, CHS.CACHEINDEX');
The same error is very likely to occur if the SQL pass is executed through the Strategy TestODBC 9.x tool or SQLPlus from the Strategy Enterprise Manager 9.x machine when using the same DSN and same login as used by Strategy Enterprise Manager 9.x. This information can be located at Tools -> Option -> DSN in the Strategy Enterprise Manager Console 9.x.
The error appears to be specific to the environment. Usually the same pass of SQL executes successfully in other environments that happen to use the same version of Oracle database and identical NLS_DATABASE_PARAMETERS.
CAUSEThis is a known issue with Strategy Enterprise Manager 9.x and some Oracle systems.
ACTIONContact Strategy Technical Support for further trouble-shooting and possible workarounds. Strategy Technical Support requests you open the case with the following information:
- Precise version of the Oracle database.
- Connect to the Statistics/ Strategy Enterprise Manager Warehouse through Strategy ODBC Test tool or SQLPlus and provide results for the following query:
select * from NLS_DATABASE_PARAMETERS
- Check whether the ORA-01704 error occurs when this pass of SQL is run simplistically through the Strategy ODBC Test tool or SQLPlus. To do so, connect to the Statistics/ Strategy Enterprise Manager Warehouse using the Strategy ODBC Test tool or SQLPlus from the Strategy Enterprise Manager machine. Use the same DSN and same login as used by Strategy Enterprise Manager (located at Tools -> Option -> DSN in the Strategy Enterprise Manager console)