Oracle 9i中包含Connect by 子句的查询向Oracle 10g移植后运行时错误及解决方法

 摘自:

http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece7631046893b4c4380146d96864968d4e414c42246001d35a3f97b75514585983a3b56e9540faab66d2369543de1cc8edb1183fa8f2e298f213e721d92044f934fa09315619237912afeaf6ef0bb8073d0f0c5d2af4353bd44040ac1b3d54d01649d25a14373a5fdc414025e60adec4372ff282a69cc3441c650f996256f7783f5d85646d42ba07610e4b835c12962b304d56f0c2534b73cb11f262d27964c308c302a05e2fc2d933d0e4b34b738a4cfc5a19d4a9bdd9a26eefadcdc5c8211e3d29ef866420103a779e2fcecf42a64345292ddde67d344b9ed9abb5b9963c0675a&p=846ed016d9c04bf00cbd9b7d0c10cb7e&newp=9779e716d9c04be70abd9b7d0c109d225c5bc4387ebad6167f9cc1&user=baidu&fm=sc&query=java%2Esql%2ESQLException%3A+ORA%2D01788%3A+%B4%CB%B2%E9%D1%AF%BF%E9%D6%D0%D2%AA%C7%F3+CONNECT+BY+%D7%D3%BE%E4&qid=c7e8c3cf05836eb1&p1=2

错误内容:

ORA-01788: 此查询块中要求 CONNECT BY 子句

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.OracleClient.OracleException: ORA-01788: 此查询块中要求 CONNECT BY 子句


源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 

堆栈跟踪:


[OracleException (0x80131938): ORA-01788: 此查询块中要求 CONNECT BY 子句
]
   System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +203
   System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1018
   System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25

解决方法:

用dba身份执行以下语句:

alter system set "_allow_level_without_connect_by"=true scope=both

posted on 2012-11-27 10:59  叶子绿了  阅读(503)  评论(0编辑  收藏  举报

导航