1.运行ArcObjects代码报错:
IFeatureCursor pCursor = null; try { pCursor = m_pCatchLayer.m_pFeatureClass.Search(m_pSpatialFilter, false); } catch (Exception ex) { throw; }
错误内容:
{"Underlying DBMS error [ORA-00604: 递归 SQL 级别 1 出现错误 ORA-01000: 超出打开游标的最大数 ORA-00604: 递归 SQL 级别 1 出现错误 ORA-01000: 超出打开游标的最大数 ORA-01000: 超出打开游标的最大数 ::SELECT OBJECTID, YSDM, FLDM, CDM, MC, SZ, JB, THXZ, RL, CJFS, MAP, JLSJ, SCSJ, MAPOBJECTID, MAPOBJECTTIME, 1 SHAPE, ELEMID, CLASID, VERSION, FDATE, TDATE, ENTILYRCOL, ENTIIDCOL, E_A21_MZSX_J_3204.SHAPE.area, E_A21_MZSX_J_3204.SHAPE.len, E_A21_MZSX_J_3204.SHAPE.points,E_A21_MZSX_J_3204.SHAPE.numpts,E_A21_MZSX_J_3204.SHAPE.entity,E_A21_MZSX_J_3204.SHAPE.minx,E_A21_MZSX_J_3204.SHAPE.miny,E_A21_MZSX_J_3204.SHAPE.maxx,E_A21_MZSX_J_3204.SHAPE.maxy,E_A21_MZSX_J_3204.rowid FROM FDBTX.E_A21_MZSX_J_3204 E_A21_MZSX_J_3204 WHERE SDE.ST_EnvIntersects(E_A21_MZSX_J_3204.SHAPE,:1,:2,:3,:4) = 1 ] [FDBTX.E_A21_MZSX_J_3204]"} |
2.解释:
ArcSDE与ORACLE游标数在空间数据库优化中,需要首先考虑ORACLE的性能优化,其中,OPEN_CURSORS参数是个比较重要的指标,会影响到系统的查询速度。
|
3.查询游标数目语句:
show parameter open_cursors;
4.设置游标数目上限:
alter system set open_cursors=4000;
5.链接数据库方法:以sys身份登录PL/SQL,File->New->Command Window
6.查询正在使用的游标的数目sql语句
select count(*) from v$open_cursor
select USER_NAME, count(*) from v$open_cursor GROUP BY USER_NAME;