Hi All,
We are facing ORA-01000: maximum open cursors exceeded problem in our production environment. On checking through the v$session and v$open_cursors tables we could see one SQL query causing the spike in open cursors and it seems to be coming from Work Order Print Report(which is custom btw). Below is the open method of the data set containing the sql in question
maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();
var sqlText = new String();
// Add query to sqlText variable.
sqlText = " select WORKORDER.WONUM, WORKORDER.DESCRIPTION WDESC, WORKORDER.SITEID, WORKORDER.workorderid, WORKORDER.WOEQ9, "
+ " WORKORDER.WORKTYPE, WORKORDER.HASCHILDREN, "
+ " (select ldtext from longdescription where ldkey = workorder.workorderid and ldownercol = 'DESCRIPTION' and ldownertable = 'WORKORDER') LONGDESC "
+ " from WORKORDER "
+ " where wonum = '" + rows[0]["wonum"] + "' "
+ " AND WORKORDER.SITEID = '" + rows[0]["siteid"] + "' "
;
maximoDataSet.setQuery(sqlText);
Also the fetch method of the same.
if (!maximoDataSet.fetch())
return (false);
row["wonum"] = maximoDataSet.getString("wonum");
row["wdesc"] = maximoDataSet.getString("wdesc");
row["siteid"] = maximoDataSet.getString("siteid");
row["workorderid"] = maximoDataSet.getInteger("workorderid");
row["woeq9"] = maximoDataSet.getString("woeq9");
row["worktype"] = maximoDataSet.getString("worktype");
row["haschildren"] = maximoDataSet.getInteger("haschildren");
row["longdesc"] = maximoDataSet.getString("longdesc");
return (true);
Again we are not opening any dataset in fetch method which normally causes such issue in case we forget to close the same.
Any inputs/ideas on this issue are welcome
Thanks in Advance
P.S Maximo version is 7.5, Database is Oralce 12c