Is this SQL DELETE statement correct ?

Hi Guys
Is the following code correct:
String strUpdate = "DELETE * FROM table_name";
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/newdb?user=root&password=123" ) ;
Statement stmt = conn.createStatement() ;
stmt.executeUpdate(strUpdate) ;If I was doing a SELECT then I'd need something like this:
String strQuery = "SELECT * FROM table_name";
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/newdb?user=root&password=123" ) ;
Statement stmt = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY ) ;
ResultSet rs = stmt.executeQuery( strQuery ) ;

shaolinf wrote:
Hi Guys
Is the following code correct:
String strUpdate = "DELETE * FROM table_name";Wrong. It's
DELETE FROM table_name;This might help you:
http://www.w3schools.com/sql/default.asp

Similar Messages

  • OIM 9.1 : SQL Error while executing SQL DELETE Statement inside Java Adapter

    I'm running this DELETE script into an adapter with the following code :
    This code is deleting some tasks instances inside a process instance for a user resource.
    public boolean clearTaskInstances(String user_key, String process_name, String task_name) throws OIMException {
      $logger.debug("Utils.clearTaskInstances() : Inside deleting task instances debug 1");
      tcDataProvider provider = getOIMConnection().getDataBase();
      $logger.debug("Utils.clearTaskInstances() : Inside deleting task instances debug 2");
    String query = "DELETE FROM OSI WHERE OSI.MIL_KEY=" +
      "(SELECT MIL.MIL_KEY FROM MIL WHERE MIL.TOS_KEY=" +
      "(SELECT TOS_KEY FROM TOS LEFT JOIN PKG ON PKG.PKG_KEY=TOS.PKG_KEY WHERE PKG.PKG_NAME=" +
      "'" + process_name + "') AND MIL.MIL_NAME='" + task_name + "'" +
      "AND OSI.ORC_KEY IN (SELECT ORC.ORC_KEY FROM ORC WHERE ORC.USR_KEY='" + user_key +"'))";
      $logger.debug("Utils/clearTaskInstance : Delete Query = " + query);
      PreparedStatementUtil preparedStatement = new PreparedStatementUtil();
       preparedStatement.setStatement(provider, query);
       try {
       preparedStatement.executeUpdate();
      $logger.debug("Utils/clearTaskInstance : Delete Query executed");
      return true;
      } catch (Exception e) {
      $logger.error("Utils/clearTaskInstance : Error while executing Delete Query : " + e);
      return false;
    , but this generate 18M of SQL error logs !!
    The same SQL request in SQL Dev works fine, the same code with OIM 11gR2 works fine too, the problem seems to be only with OIM 9.1.
    The first lines in the logs are :
    DEBUG,12 Jul 2013 09:03:20,972,[XELLERATE.CUSTOM],connection object created
    DEBUG,12 Jul 2013 09:03:20,972,[XELLERATE.CUSTOM],Utils.clearTaskInstances() : Inside deleting task instances debug 2
    DEBUG,12 Jul 2013 09:03:20,972,[XELLERATE.CUSTOM],Utils/clearTaskInstance : Delete Query = DELETE FROM OSI WHERE OSI.MIL_KEY=(SELECT MIL.MIL_KEY FROM MIL WHERE MIL.TOS_KEY=(SELECT TOS_KEY FROM TOS LEFT JOIN PKG ON PKG.PKG_KEY=TOS.PKG_KEY WHERE PKG.PKG_NAME='SMC Prov Process') AND MIL.MIL_NAME='Reconciliation Update Received'AND OSI.ORC_KEY IN (SELECT ORC.ORC_KEY FROM ORC WHERE ORC.USR_KEY='78'))
    ERROR,12 Jul 2013 09:03:46,641,[XELLERATE.CUSTOM],Utils/clearTaskInstance : Error while executing Delete Query : com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
    ERROR,12 Jul 2013 09:03:47,047,[XELLERATE.SERVER],Class/Method: tcScheduleItem/getMilestoneInfo Error : ScheduleItem has  No Milestone.
    ERROR,12 Jul 2013 09:03:47,050,[XELLERATE.DATABASE],select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key =
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
      at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
      at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
      at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:479)
      at com.thortech.xl.util.JDBCUtils.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ERROR,12 Jul 2013 09:03:47,051,[XELLERATE.DATABASE],Class/Method: tcDataBase/readPartialStatement encounter some problems: ORA-00936: missing expression
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
      at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
      at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
      at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:479)
      at com.thortech.xl.util.JDBCUtils.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ERROR,12 Jul 2013 09:03:47,052,[XELLERATE.SERVER],Class/Method: tcScheduleItem/checkApprovalProcess encounter some problems: Data Access Error
    com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Data AccessException:
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key = Description: ORA-00936: missing expression
    SQL State: 42000Vendor Code: 936Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
      at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Source SQL Exception:
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
      at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
      at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
      at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:479)
      at com.thortech.xl.util.JDBCUtils.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ERROR,12 Jul 2013 09:03:47,054,[XELLERATE.DATABASE],Error: Error Keyword: DAE.UNKNOWN_CODE
    Description: An unknown error code was passed.
    Remedy: Contact your system adminstrator.
    Action: E
    Severity: C
    Help URL:
    Detail:
    com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy60.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Data AccessException:
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key = Description: ORA-00936: missing expression
    SQL State: 42000Vendor Code: 936Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
      at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)

    Thanks for your quick reply, but I'm still getting the same issue after modifying the code to include the space before the AND, here is the generated log files with SQL debug turned on.
    I have already tried with a hard simple delete sql request such as DELETE FROM osi WHERE osi.mil_key = '1440' AND orc_key ='228182' and get same issue !
    Thanks for your help !:
    DEBUG,12 Jul 2013 10:18:32,169,[XELLERATE.CUSTOM],Utils.clearTaskInstances() : Inside deleting task instances debug 1
    DEBUG,12 Jul 2013 10:18:32,169,[XELLERATE.CUSTOM],enter getConnection with OIM TRUST AUTH
    DEBUG,12 Jul 2013 10:18:32,169,[XELLERATE.CUSTOM],initConnection
    DEBUG,12 Jul 2013 10:18:32,169,[XELLERATE.CUSTOM],initConnection1 xlHomeDir=/appl/oim/product/9.1.0.2/xellerate
    DEBUG,12 Jul 2013 10:18:32,170,[XELLERATE.CUSTOM],initConnection done.
    DEBUG,12 Jul 2013 10:18:32,170,[XELLERATE.CUSTOM],Properties env done={java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory, java.naming.provider.url=t3://mrs-dx-00003.cma-cgm.com:7001}
    DEBUG,12 Jul 2013 10:18:32,173,[XELLERATE.CUSTOM],moSignature done.
    DEBUG,12 Jul 2013 10:18:32,210,[XELLERATE.CUSTOM],LoginSession UserName=xelsysadm
    DEBUG,12 Jul 2013 10:18:32,210,[XELLERATE.CUSTOM],LoginContext Subject=Subject:
      Principal: xelsysadm
      Principal: User
      Private Credential: weblogic.security.auth.login.PasswordCredential@10425ea
      Private Credential: weblogic.security.auth.login.PasswordCredential@1555e96
    <Jul 12, 2013 10:18:32 AM UTC> <Notice> <LoggingService> <BEA-320400> <The log file /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Jul 12, 2013 10:18:32 AM UTC> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log65630. Log messages will continue to be logged in /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log.>
    DEBUG,12 Jul 2013 10:18:32,227,[XELLERATE.CUSTOM],end init for ServiceAccountConnection
    DEBUG,12 Jul 2013 10:18:32,227,[XELLERATE.CUSTOM],connection object created
    DEBUG,12 Jul 2013 10:18:32,227,[XELLERATE.CUSTOM],Utils.clearTaskInstances() : Inside deleting task instances debug 2
    DEBUG,12 Jul 2013 10:18:32,228,[XELLERATE.CUSTOM],Utils/clearTaskInstance : Delete Query = DELETE FROM OSI WHERE OSI.MIL_KEY=(SELECT MIL.MIL_KEY FROM MIL WHERE MIL.TOS_KEY=(SELECT TOS_KEY FROM TOS LEFT JOIN PKG ON PKG.PKG_KEY=TOS.PKG_KEY WHERE PKG.PKG_NAME='SMC Prov Process') AND MIL.MIL_NAME='Reconciliation Update Received' AND OSI.ORC_KEY IN (SELECT ORC.ORC_KEY FROM ORC WHERE ORC.USR_KEY='78'))
    DEBUG,12 Jul 2013 10:18:32,247,[XELLERATE.DATABASE],DELETE FROM OSI WHERE OSI.MIL_KEY=(SELECT MIL.MIL_KEY FROM MIL WHERE MIL.TOS_KEY=(SELECT TOS_KEY FROM TOS LEFT JOIN PKG ON PKG.PKG_KEY=TOS.PKG_KEY WHERE PKG.PKG_NAME='SMC Prov Process') AND MIL.MIL_NAME='Reconciliation Update Received' AND OSI.ORC_KEY IN (SELECT ORC.ORC_KEY FROM ORC WHERE ORC.USR_KEY='78'))
    INFO,12 Jul 2013 10:18:47,146,[XELLERATE.DATABASE],DB Cache read: select osi_retry_on from osi where 1=2
    <Jul 12, 2013 10:18:47 AM UTC> <Notice> <LoggingService> <BEA-320400> <The log file /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Jul 12, 2013 10:18:47 AM UTC> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log65631. Log messages will continue to be logged in /appl/oim/user_projects/domains/OIM_INT/servers/AdminServer/logs/AdminServer.log.>
    INFO,12 Jul 2013 10:18:47,173,[XELLERATE.DATABASE],DB read: select osi.sch_key, osi.mil_key, osi.orc_key, osi.osi_rowver, sch.sch_rowver,  osi.osi_retry_for, osi.osi_retry_on, osi.osi_retry_counter, sch.sch_note  from osi osi,sch sch where osi.osi_retry_on <=TO_DATE('2013-07-12 10:18:47', 'YYYY-MM-DD HH24:MI:SS') and osi.sch_key = sch.sch_key and sch.sch_status='R' and osi_retry_counter>0 order by osi.sch_key
    DEBUG,12 Jul 2013 10:18:47,186,[XELLERATE.DATABASE],select osi.sch_key, osi.mil_key, osi.orc_key, osi.osi_rowver, sch.sch_rowver,  osi.osi_retry_for, osi.osi_retry_on, osi.osi_retry_counter, sch.sch_note  from osi osi,sch sch where osi.osi_retry_on <=TO_DATE('2013-07-12 10:18:47', 'YYYY-MM-DD HH24:MI:SS') and osi.sch_key = sch.sch_key and sch.sch_status='R' and osi_retry_counter>0 order by osi.sch_key
    INFO,12 Jul 2013 10:19:00,240,[XELLERATE.DATABASE],DB Cache read: select osi_retry_for, osi_retry_counter from osi where 1=2
    INFO,12 Jul 2013 10:19:00,249,[XELLERATE.DATABASE],DB read: select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=1404290
    DEBUG,12 Jul 2013 10:19:00,253,[XELLERATE.DATABASE],select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=1404290
    INFO,12 Jul 2013 10:19:00,270,[XELLERATE.DATABASE],DB read: select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=1404297
    DEBUG,12 Jul 2013 10:19:00,272,[XELLERATE.DATABASE],select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=1404297
    ERROR,12 Jul 2013 10:19:10,967,[XELLERATE.CUSTOM],Utils/clearTaskInstance : Error while executing Delete Query : com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
    INFO,12 Jul 2013 10:19:10,968,[XELLERATE.DATABASE],DB read: select mav.spd_key,mav.mav_map_child_table_name, mav.mav_map_to, mav.mav_map_qualifier, mav.mav_map_value, mav.mav_field_length from mav mav, mil mil, adv adv where mav.mil_key = mil.mil_key and mil.mil_key = 5673 and mav.adv_key = adv.adv_key and adv.adv_name = 'Adapter return value' and adv.adp_key = 1021
    DEBUG,12 Jul 2013 10:19:10,968,[XELLERATE.DATABASE],select mav.spd_key,mav.mav_map_child_table_name, mav.mav_map_to, mav.mav_map_qualifier, mav.mav_map_value, mav.mav_field_length from mav mav, mil mil, adv adv where mav.mil_key = mil.mil_key and mil.mil_key = 5673 and mav.adv_key = adv.adv_key and adv.adv_name = 'Adapter return value' and adv.adp_key = 1021
    INFO,12 Jul 2013 10:19:10,973,[XELLERATE.DATABASE],DB read: select * from sch where sch_key=3934435
    DEBUG,12 Jul 2013 10:19:10,973,[XELLERATE.DATABASE],select * from sch where sch_key=3934435
    INFO,12 Jul 2013 10:19:10,984,[XELLERATE.DATABASE],DB read: select count(*) as RecordExists from osi where sch_key=3934435
    DEBUG,12 Jul 2013 10:19:10,984,[XELLERATE.DATABASE],select count(*) as RecordExists from osi where sch_key=3934435
    INFO,12 Jul 2013 10:19:10,990,[XELLERATE.DATABASE],DB read: select * from osi where sch_key=3934435
    DEBUG,12 Jul 2013 10:19:10,990,[XELLERATE.DATABASE],select * from osi where sch_key=3934435
    INFO,12 Jul 2013 10:19:11,012,[XELLERATE.DATABASE],DB read: select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=5673
    DEBUG,12 Jul 2013 10:19:11,012,[XELLERATE.DATABASE],select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=5673
    INFO,12 Jul 2013 10:19:11,015,[XELLERATE.DATABASE],DB read: select rsc.rsc_key, sta.sta_status, sta.sta_bucket from rsc rsc, sta sta where sta.sta_key=rsc.sta_key and rsc.rsc_data='false' and rsc.mil_key=5673
    DEBUG,12 Jul 2013 10:19:11,015,[XELLERATE.DATABASE],select rsc.rsc_key, sta.sta_status, sta.sta_bucket from rsc rsc, sta sta where sta.sta_key=rsc.sta_key and rsc.rsc_data='false' and rsc.mil_key=5673
    DEBUG,12 Jul 2013 10:19:11,069,[XELLERATE.DATABASE],select rgm.mil_key, mil_sequence from rgm rgm, mil mil where rsc_key=? and rgm.mil_key=mil.mil_key order by mil_sequence
    INFO,12 Jul 2013 10:19:11,078,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,078,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    INFO,12 Jul 2013 10:19:11,082,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,082,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,086,[XELLERATE.DATABASE],update sch set SCH_STATUS=?, SCH_DATA=?, SCH_ACTUAL_END=?, SCH_UPDATE=?, sch_rowver=? where sch_key=3934435 and sch_rowver=HEXTORAW('0000000000000000')
    INFO,12 Jul 2013 10:19:11,104,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,104,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    INFO,12 Jul 2013 10:19:11,107,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,107,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,110,[XELLERATE.DATABASE],update osi set RSC_KEY=?, OSI_UPDATE=?, OSI_CHILD_OLD_VALUE=?, osi_rowver=? where sch_key=3934435 and osi_rowver=HEXTORAW('0000000000000000')
    INFO,12 Jul 2013 10:19:11,122,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,123,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    INFO,12 Jul 2013 10:19:11,126,[XELLERATE.DATABASE],DB read: select rvm_recovery_mil_key, mil_sequence from rvm rvm, mil mil where rvm.mil_key=5673 and mil.mil_key=rvm.rvm_recovery_mil_key and rvm_recovery_mil_key not in (select mil.mil_key from mil mil, osi osi where osi.mil_key=mil.mil_key and (mil_create_multiple='0' or mil_create_multiple is null) and osi.orc_key=170417) order by mil_sequence
    DEBUG,12 Jul 2013 10:19:11,126,[XELLERATE.DATABASE],select rvm_recovery_mil_key, mil_sequence from rvm rvm, mil mil where rvm.mil_key=5673 and mil.mil_key=rvm.rvm_recovery_mil_key and rvm_recovery_mil_key not in (select mil.mil_key from mil mil, osi osi where osi.mil_key=mil.mil_key and (mil_create_multiple='0' or mil_create_multiple is null) and osi.orc_key=170417) order by mil_sequence
    DEBUG,12 Jul 2013 10:19:11,132,[XELLERATE.DATABASE],select mil_name from mil  where mil_key=?
    DEBUG,12 Jul 2013 10:19:11,134,[XELLERATE.DATABASE],select s1.sch_key, s1.sch_rowver, o.osi_rowver, sta_bucket from osi o, sch s1, dep d, sta s where s.sta_status = s1.sch_status and o.sch_key = s1.sch_key and o.mil_key = d.mil_key and d.dep_key=? and o.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,137,[XELLERATE.DATABASE],select orc.orc_target, orc.orc_parent_key, pkg.pkg_name from orc orc left outer join orc parorc on parorc.orc_key=orc.orc_parent_key  and orc.orc_key=? left outer join pkg pkg on parorc.pkg_key=pkg.pkg_key where orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,139,[XELLERATE.DATABASE],select pkg_name from tos, pkg, orc where tos.pkg_key=pkg.pkg_key and tos.tos_key=orc.tos_key and orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,141,[XELLERATE.DATABASE],select oiu.oiu_key,oiu_rowver,oiu.ost_key, oiu.usr_key, usr.usr_status from oiu oiu, usr usr where oiu.usr_key=usr.usr_key and oiu.orc_key=?
    INFO,12 Jul 2013 10:19:11,143,[XELLERATE.DATABASE],DB read: select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=5673 and mst.sta_key=sta.sta_key and sta.sta_status='R' and mst.ost_key=ost.ost_key
    DEBUG,12 Jul 2013 10:19:11,143,[XELLERATE.DATABASE],select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=5673 and mst.sta_key=sta.sta_key and sta.sta_status='R' and mst.ost_key=ost.ost_key
    INFO,12 Jul 2013 10:19:11,149,[XELLERATE.DATABASE],DB read: select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,150,[XELLERATE.DATABASE],select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,155,[XELLERATE.DATABASE],select /*+ USE_NL(ORC STA)*/ sta.sta_bucket, count(sta.sta_bucket) as bkt from orc orc, sta sta where orc.orc_status=sta.sta_status and orc.orc_parent_key=? and (orc.orc_required_complete is null or orc.orc_required_complete=?)  group by sta.sta_bucket
    DEBUG,12 Jul 2013 10:19:11,159,[XELLERATE.DATABASE],select sta.sta_bucket, count(sta.sta_bucket) as bkt from osi osi, sch sch, mil mil, sta sta where osi.sch_key=sch.sch_key and osi.mil_key=mil.mil_key and sch.sch_status=sta.sta_status and mil.mil_required_complete=? and osi.orc_key=? group by sta.sta_bucket
    DEBUG,12 Jul 2013 10:19:11,164,[XELLERATE.DATABASE],select sta_bucket from orc orc, sta sta where orc.orc_key=? and orc.orc_status = sta.sta_status
    INFO,12 Jul 2013 10:19:11,166,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcORC' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,166,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcORC' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,169,[XELLERATE.DATABASE],update orc set ORC_STATUS=?, ORC_UPDATE=?, orc_rowver=? where orc_key=170417 and orc_rowver=HEXTORAW('0000000000000007')
    DEBUG,12 Jul 2013 10:19:11,171,[XELLERATE.DATABASE],select orc_rowver from orc orc where orc_key=?
    INFO,12 Jul 2013 10:19:11,174,[XELLERATE.DATABASE],DB read: select * from orc where orc_key=867
    DEBUG,12 Jul 2013 10:19:11,174,[XELLERATE.DATABASE],select * from orc where orc_key=867
    DEBUG,12 Jul 2013 10:19:11,178,[XELLERATE.DATABASE],select /*+ USE_NL(ORC STA)*/ sta.sta_bucket, count(sta.sta_bucket) as bkt from orc orc, sta sta where orc.orc_status=sta.sta_status and orc.orc_parent_key=? and (orc.orc_required_complete is null or orc.orc_required_complete=?)  group by sta.sta_bucket
    DEBUG,12 Jul 2013 10:19:11,181,[XELLERATE.DATABASE],select sta.sta_bucket, count(sta.sta_bucket) as bkt from osi osi, sch sch, mil mil, sta sta where osi.sch_key=sch.sch_key and osi.mil_key=mil.mil_key and sch.sch_status=sta.sta_status and mil.mil_required_complete=? and osi.orc_key=? group by sta.sta_bucket
    INFO,12 Jul 2013 10:19:11,183,[XELLERATE.DATABASE],DB read: select orc.orc_key, orc.orc_rowver from orc orc, sta sta, pkd pkd where orc.orc_parent_key =867 and orc.orc_status = sta.sta_status and sta.sta_bucket!='Rejected' and orc.pkh_key=pkd.pkh_key and pkd.pkd_predecessor_pkh_key=0 order by orc.orc_key
    DEBUG,12 Jul 2013 10:19:11,183,[XELLERATE.DATABASE],select orc.orc_key, orc.orc_rowver from orc orc, sta sta, pkd pkd where orc.orc_parent_key =867 and orc.orc_status = sta.sta_status and sta.sta_bucket!='Rejected' and orc.pkh_key=pkd.pkh_key and pkd.pkd_predecessor_pkh_key=0 order by orc.orc_key
    INFO,12 Jul 2013 10:19:11,186,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcORC' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,186,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcORC' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    INFO,12 Jul 2013 10:19:11,188,[XELLERATE.DATABASE],DB read: select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,188,[XELLERATE.DATABASE],select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,190,[XELLERATE.DATABASE],select obi_key from oiu where orc_key = ?
    INFO,12 Jul 2013 10:19:11,193,[XELLERATE.DATABASE],DB read: select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    DEBUG,12 Jul 2013 10:19:11,193,[XELLERATE.DATABASE],select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    INFO,12 Jul 2013 10:19:11,195,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,195,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,197,[XELLERATE.DATABASE],select sch.sch_status from sch sch where sch.sch_key=?
    INFO,12 Jul 2013 10:19:11,199,[XELLERATE.DATABASE],DB read: SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,199,[XELLERATE.DATABASE],SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,202,[XELLERATE.DATABASE],select pkg.PKG_TYPE from pkg pkg where pkg.pkg_key=?
    DEBUG,12 Jul 2013 10:19:11,204,[XELLERATE.DATABASE],select oti.oti_key, oti.oti_rowver from oti where oti.sch_key=?
    INFO,12 Jul 2013 10:19:11,212,[XELLERATE.DATABASE],DB Cache read: select * from oti where 1=2
    DEBUG,12 Jul 2013 10:19:11,212,[XELLERATE.DATABASE],select pkg.PKG_TYPE from pkg pkg where pkg.pkg_key=?
    DEBUG,12 Jul 2013 10:19:11,215,[XELLERATE.DATABASE],select obj.OBJ_KEY from obj obj , pkg pkg where pkg.obj_key = obj.obj_key and pkg.pkg_key=?
    INFO,12 Jul 2013 10:19:11,219,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_insert_sequence>0 order by dvt.dvt_pre_insert_sequence
    DEBUG,12 Jul 2013 10:19:11,220,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_insert_sequence>0 order by dvt.dvt_pre_insert_sequence
    DEBUG,12 Jul 2013 10:19:11,223,[XELLERATE.DATABASE],insert into oti (OTI_KEY, SCH_KEY, SCH_STATUS, SCH_DATA, SCH_PROJ_START, SCH_PROJ_END, SCH_ACTUAL_START, SCH_ACTUAL_END, SCH_OFFLINED, ORC_KEY, MIL_KEY, PKG_KEY, OSI_ASSIGNED_TO_USR_KEY, OSI_ASSIGNED_DATE, ACT_KEY, OSI_ASSIGN_TYPE, PKG_TYPE, STA_BUCKET, OBJ_KEY, OTI_CREATE, OTI_UPDATE, OTI_CREATEBY, OTI_UPDATEBY, OTI_DATA_LEVEL, oti_rowver) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    DEBUG,12 Jul 2013 10:19:11,223,[XELLERATE.DATABASE],select OTI_seq.nextval from dual
    INFO,12 Jul 2013 10:19:11,324,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_insert_sequence>0 order by dvt.dvt_post_insert_sequence
    DEBUG,12 Jul 2013 10:19:11,324,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_insert_sequence>0 order by dvt.dvt_post_insert_sequence
    DEBUG,12 Jul 2013 10:19:11,326,[XELLERATE.DATABASE],select sch.sch_status from sch sch where sch.sch_key=?
    INFO,12 Jul 2013 10:19:11,328,[XELLERATE.DATABASE],DB read: SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,328,[XELLERATE.DATABASE],SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,332,[XELLERATE.DATABASE],select pkg.PKG_TYPE from pkg pkg where pkg.pkg_key=?
    DEBUG,12 Jul 2013 10:19:11,334,[XELLERATE.DATABASE],select oti.oti_key, oti.oti_rowver from oti where oti.sch_key=?
    INFO,12 Jul 2013 10:19:11,335,[XELLERATE.DATABASE],DB read: select * from oti where oti_key=1617371
    DEBUG,12 Jul 2013 10:19:11,336,[XELLERATE.DATABASE],select * from oti where oti_key=1617371
    DEBUG,12 Jul 2013 10:19:11,343,[XELLERATE.DATABASE],select pkg.PKG_TYPE from pkg pkg where pkg.pkg_key=?
    DEBUG,12 Jul 2013 10:19:11,345,[XELLERATE.DATABASE],select obj.OBJ_KEY from obj obj , pkg pkg where pkg.obj_key = obj.obj_key and pkg.pkg_key=?
    INFO,12 Jul 2013 10:19:11,347,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,347,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,350,[XELLERATE.DATABASE],update oti set SCH_TYPE=?, OSI_RETRY_FOR=?, OSI_ASSIGNED_TO=?, REQ_KEY=?, OSI_ASSIGNED_TO_UGP_KEY=?, OSI_ASSIGNED_DATE=?, SCH_PROJ_START=?, SCH_PROJ_END=?, SCH_ACTUAL_START=?, SCH_ACTUAL_END=?, SCH_ACTION=?, OTI_CREATE=?, OTI_UPDATE=?, SCH_DATA=?, oti_rowver=? where oti_key=1617371 and oti_rowver=HEXTORAW('0000000000000000')
    INFO,12 Jul 2013 10:19:11,357,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,357,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOTI' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,359,[XELLERATE.DATABASE],select mil_name from mil  where mil_key=?
    DEBUG,12 Jul 2013 10:19:11,361,[XELLERATE.DATABASE],select s1.sch_key, s1.sch_rowver, o.osi_rowver, sta_bucket from osi o, sch s1, dep d, sta s where s.sta_status = s1.sch_status and o.sch_key = s1.sch_key and o.mil_key = d.mil_key and d.dep_key=? and o.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,363,[XELLERATE.DATABASE],select orc.orc_target, orc.orc_parent_key, pkg.pkg_name from orc orc left outer join orc parorc on parorc.orc_key=orc.orc_parent_key  and orc.orc_key=? left outer join pkg pkg on parorc.pkg_key=pkg.pkg_key where orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,365,[XELLERATE.DATABASE],select pkg_name from tos, pkg, orc where tos.pkg_key=pkg.pkg_key and tos.tos_key=orc.tos_key and orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,367,[XELLERATE.DATABASE],select oiu.oiu_key,oiu_rowver,oiu.ost_key, oiu.usr_key, usr.usr_status from oiu oiu, usr usr where oiu.usr_key=usr.usr_key and oiu.orc_key=?
    INFO,12 Jul 2013 10:19:11,368,[XELLERATE.DATABASE],DB read: select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=1434 and mst.sta_key=sta.sta_key and sta.sta_status='X' and mst.ost_key=ost.ost_key
    DEBUG,12 Jul 2013 10:19:11,369,[XELLERATE.DATABASE],select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=1434 and mst.sta_key=sta.sta_key and sta.sta_status='X' and mst.ost_key=ost.ost_key
    INFO,12 Jul 2013 10:19:11,375,[XELLERATE.DATABASE],DB read: select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,375,[XELLERATE.DATABASE],select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,379,[XELLERATE.DATABASE],select /*+ USE_NL(ORC STA)*/ sta.sta_bucket, count(sta.sta_bucket) as bkt from orc orc, sta sta where orc.orc_status=sta.sta_status and orc.orc_parent_key=? and (orc.orc_required_complete is null or orc.orc_required_complete=?)  group by sta.sta_bucket
    DEBUG,12 Jul 2013 10:19:11,381,[XELLERATE.DATABASE],select sta.sta_bucket, count(sta.sta_bucket) as bkt from osi osi, sch sch, mil mil, sta sta where osi.sch_key=sch.sch_key and osi.mil_key=mil.mil_key and sch.sch_status=sta.sta_status and mil.mil_required_complete=? and osi.orc_key=? group by sta.sta_bucket
    INFO,12 Jul 2013 10:19:11,384,[XELLERATE.DATABASE],DB read: select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,384,[XELLERATE.DATABASE],select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,386,[XELLERATE.DATABASE],select obi_key from oiu where orc_key = ?
    INFO,12 Jul 2013 10:19:11,387,[XELLERATE.DATABASE],DB read: select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    DEBUG,12 Jul 2013 10:19:11,387,[XELLERATE.DATABASE],select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    INFO,12 Jul 2013 10:19:11,389,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,389,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,391,[XELLERATE.DATABASE],select sch.sch_status from sch sch where sch.sch_key=?
    INFO,12 Jul 2013 10:19:11,393,[XELLERATE.DATABASE],DB read: SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,393,[XELLERATE.DATABASE],SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,396,[XELLERATE.DATABASE],select oti.oti_key, oti.oti_rowver from oti where oti.sch_key=?
    INFO,12 Jul 2013 10:19:11,398,[XELLERATE.DATABASE],DB read: select * from sch where sch_key=1715851
    DEBUG,12 Jul 2013 10:19:11,398,[XELLERATE.DATABASE],select * from sch where sch_key=1715851
    INFO,12 Jul 2013 10:19:11,401,[XELLERATE.DATABASE],DB read: select count(*) as RecordExists from osi where sch_key=1715851
    DEBUG,12 Jul 2013 10:19:11,401,[XELLERATE.DATABASE],select count(*) as RecordExists from osi where sch_key=1715851
    INFO,12 Jul 2013 10:19:11,403,[XELLERATE.DATABASE],DB read: select * from osi where sch_key=1715851
    DEBUG,12 Jul 2013 10:19:11,403,[XELLERATE.DATABASE],select * from osi where sch_key=1715851
    INFO,12 Jul 2013 10:19:11,433,[XELLERATE.DATABASE],DB read: select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=1447
    DEBUG,12 Jul 2013 10:19:11,433,[XELLERATE.DATABASE],select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=1447
    INFO,12 Jul 2013 10:19:11,436,[XELLERATE.DATABASE],DB read: select ugp.ugp_key, ugp.ugp_name from ugp ugp, usg usg where ugp.ugp_key=usg.ugp_key and usg.usr_key=1
    DEBUG,12 Jul 2013 10:19:11,437,[XELLERATE.DATABASE],select ugp.ugp_key, ugp.ugp_name from ugp ugp, usg usg where ugp.ugp_key=usg.ugp_key and usg.usr_key=1
    INFO,12 Jul 2013 10:19:11,439,[XELLERATE.DATABASE],DB read: select distinct ugp.ugp_key, ugp.ugp_name from ugp ugp, gpg gpg where ugp.ugp_key = gpg.ugp_key  and ( gpg.gpg_ugp_key in (1,11063) )
    DEBUG,12 Jul 2013 10:19:11,439,[XELLERATE.DATABASE],select distinct ugp.ugp_key, ugp.ugp_name from ugp ugp, gpg gpg where ugp.ugp_key = gpg.ugp_key  and ( gpg.gpg_ugp_key in (1,11063) )
    INFO,12 Jul 2013 10:19:11,441,[XELLERATE.DATABASE],DB read: select sel.sel_update_allow from sel sel, dob dob, ugp ugp where dob.dob_key=sel.dob_key and ugp.ugp_key=sel.ugp_key and dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' and (ugp.ugp_key=1 or ugp.ugp_key=11063)
    DEBUG,12 Jul 2013 10:19:11,441,[XELLERATE.DATABASE],select sel.sel_update_allow from sel sel, dob dob, ugp ugp where dob.dob_key=sel.dob_key and ugp.ugp_key=sel.ugp_key and dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' and (ugp.ugp_key=1 or ugp.ugp_key=11063)
    INFO,12 Jul 2013 10:19:11,443,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,443,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    INFO,12 Jul 2013 10:19:11,446,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,446,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,449,[XELLERATE.DATABASE],update sch set SCH_STATUS=?, SCH_UPDATE=?, sch_rowver=? where sch_key=1715851 and sch_rowver=HEXTORAW('0000000000000001')
    INFO,12 Jul 2013 10:19:11,453,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,453,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcSCH' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    INFO,12 Jul 2013 10:19:11,454,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    DEBUG,12 Jul 2013 10:19:11,454,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_pre_update_sequence>0 order by dvt.dvt_pre_update_sequence
    INFO,12 Jul 2013 10:19:11,456,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,456,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOSI' or dob.dob_name='com.thortech.xl.dataobj.tcKeylessDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    INFO,12 Jul 2013 10:19:11,459,[XELLERATE.DATABASE],DB read: select unm_undo_mil_key, mil_sequence from unm unm, mil mil where mil.mil_key=unm.unm_undo_mil_key and unm.mil_key=1447 and unm_undo_mil_key not in (select mil.mil_key from mil mil, osi osi where osi.mil_key=mil.mil_key and (mil_create_multiple='0' or mil_create_multiple is null) and osi.orc_key=170417) order by mil_sequence
    DEBUG,12 Jul 2013 10:19:11,459,[XELLERATE.DATABASE],select unm_undo_mil_key, mil_sequence from unm unm, mil mil where mil.mil_key=unm.unm_undo_mil_key and unm.mil_key=1447 and unm_undo_mil_key not in (select mil.mil_key from mil mil, osi osi where osi.mil_key=mil.mil_key and (mil_create_multiple='0' or mil_create_multiple is null) and osi.orc_key=170417) order by mil_sequence
    DEBUG,12 Jul 2013 10:19:11,461,[XELLERATE.DATABASE],select mil_name from mil  where mil_key=?
    DEBUG,12 Jul 2013 10:19:11,463,[XELLERATE.DATABASE],select s1.sch_key, s1.sch_rowver, o.osi_rowver, sta_bucket from osi o, sch s1, dep d, sta s where s.sta_status = s1.sch_status and o.sch_key = s1.sch_key and o.mil_key = d.mil_key and d.dep_key=? and o.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,465,[XELLERATE.DATABASE],select orc.orc_target, orc.orc_parent_key, pkg.pkg_name from orc orc left outer join orc parorc on parorc.orc_key=orc.orc_parent_key  and orc.orc_key=? left outer join pkg pkg on parorc.pkg_key=pkg.pkg_key where orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,468,[XELLERATE.DATABASE],select pkg_name from tos, pkg, orc where tos.pkg_key=pkg.pkg_key and tos.tos_key=orc.tos_key and orc.orc_key=?
    DEBUG,12 Jul 2013 10:19:11,471,[XELLERATE.DATABASE],select oiu.oiu_key,oiu_rowver,oiu.ost_key, oiu.usr_key, usr.usr_status from oiu oiu, usr usr where oiu.usr_key=usr.usr_key and oiu.orc_key=?
    INFO,12 Jul 2013 10:19:11,474,[XELLERATE.DATABASE],DB read: select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=1447 and mst.sta_key=sta.sta_key and sta.sta_status='X' and mst.ost_key=ost.ost_key
    DEBUG,12 Jul 2013 10:19:11,474,[XELLERATE.DATABASE],select mst.ost_key, ost_status from mst mst, sta sta, ost ost where mst.mil_key=1447 and mst.sta_key=sta.sta_key and sta.sta_status='X' and mst.ost_key=ost.ost_key
    INFO,12 Jul 2013 10:19:11,480,[XELLERATE.DATABASE],DB read: select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,480,[XELLERATE.DATABASE],select * from orc where orc_key=170417
    DEBUG,12 Jul 2013 10:19:11,486,[XELLERATE.DATABASE],select /*+ USE_NL(ORC STA)*/ sta.sta_bucket, count(sta.sta_bucket) as bkt from orc orc, sta sta where orc.orc_status=sta.sta_status and orc.orc_parent_key=? and (orc.orc_required_complete is null or orc.orc_required_complete=?)  group by sta.sta_bucket
    DEBUG,12 Jul 2013 10:19:11,489,[XELLERATE.DATABASE],select sta.sta_bucket, count(sta.sta_bucket) as bkt from osi osi, sch sch, mil mil, sta sta where osi.sch_key=sch.sch_key and osi.mil_key=mil.mil_key and sch.sch_status=sta.sta_status and mil.mil_required_complete=? and osi.orc_key=? group by sta.sta_bucket
    INFO,12 Jul 2013 10:19:11,493,[XELLERATE.DATABASE],DB read: select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,493,[XELLERATE.DATABASE],select usr_key, orc_target from orc where orc_key = 170417
    DEBUG,12 Jul 2013 10:19:11,495,[XELLERATE.DATABASE],select obi_key from oiu where orc_key = ?
    INFO,12 Jul 2013 10:19:11,497,[XELLERATE.DATABASE],DB read: select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    DEBUG,12 Jul 2013 10:19:11,497,[XELLERATE.DATABASE],select mev.mev_assignee, mev.mev_requester, mev.mev_user, mev.mev_usrmanager, mev.mil_key, mev.emd_key, sta.sta_status from mev mev, sta sta where mev.sta_key=sta.sta_key
    INFO,12 Jul 2013 10:19:11,499,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,499,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcScheduleItem' or dob.dob_name='com.thortech.xl.dataobj.tcBusinessObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' )  and dvt.dvt_post_update_sequence>0 order by dvt.dvt_post_update_sequence
    DEBUG,12 Jul 2013 10:19:11,501,[XELLERATE.DATABASE],select sch.sch_status from sch sch where sch.sch_key=?
    INFO,12 Jul 2013 10:19:11,502,[XELLERATE.DATABASE],DB read: SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,502,[XELLERATE.DATABASE],SELECT sta_status, sta_bucket FROM sta
    DEBUG,12 Jul 2013 10:19:11,506,[XELLERATE.DATABASE],select oti.oti_key, oti.oti_rowver from oti where oti.sch_key=?
    INFO,12 Jul 2013 10:19:11,508,[XELLERATE.DATABASE],DB read: select * from sch where sch_key=1748948
    DEBUG,12 Jul 2013 10:19:11,508,[XELLERATE.DATABASE],select * from sch where sch_key=1748948
    INFO,12 Jul 2013 10:19:11,562,[XELLERATE.DATABASE],DB read: select count(*) as RecordExists from osi where sch_key=1748948
    DEBUG,12 Jul 2013 10:19:11,562,[XELLERATE.DATABASE],select count(*) as RecordExists from osi where sch_key=1748948
    INFO,12 Jul 2013 10:19:11,565,[XELLERATE.DATABASE],DB Cache read: select * from osi where 1=2
    INFO,12 Jul 2013 10:19:11,566,[XELLERATE.DATABASE],DB read: select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=0
    DEBUG,12 Jul 2013 10:19:11,566,[XELLERATE.DATABASE],select mil_key, mil_name, mil_sequence, mil_day, mil_hour, mil_minute,mil_create_multiple, mil_cancel_while_pending, mil_comp_on_rec, mil_required_complete, mil_retry_period, mil_retry_count, evt_key, mil_default_assignee, mil_assign_to_manager from mil where mil_key=0
    INFO,12 Jul 2013 10:19:11,570,[XELLERATE.DATABASE],DB read: select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.SCHTM_NO_MIL'
    DEBUG,12 Jul 2013 10:19:11,571,[XELLERATE.DATABASE],select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.SCHTM_NO_MIL'
    ERROR,12 Jul 2013 10:19:11,579,[XELLERATE.SERVER],Class/Method: tcScheduleItem/getMilestoneInfo Error : ScheduleItem has  No Milestone.
    INFO,12 Jul 2013 10:19:11,579,[XELLERATE.DATABASE],DB read: select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key =
    DEBUG,12 Jul 2013 10:19:11,579,[XELLERATE.DATABASE],select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key =
    ERROR,12 Jul 2013 10:19:11,586,[XELLERATE.DATABASE],select orc.orc_status, orc.pkg_key from orc orc where orc.orc_key =
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
      at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
      at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
      at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:479)
      at com.thortech.xl.util.JDBCUtils.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.checkApprovalProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcScheduleItem.eventPreInsert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelORC(Unknown Source)
      at com.thortech.xl.dataobj.util.tcProcessUtilities.cancelProcess(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.dataobj.tcOIU.revokeObjectInstance(Unknown Source)
      at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperationsSession.revokeObjects(Unknown Source)
      at com.thortech.xl.ejb.beans.tcUserOperations_voj9p2_EOImpl.revokeObjects(tcUserOperations_voj9p2_EOImpl.java:2285)
      at Thor.API.Operations.tcUserOperationsClient.revokeObjects(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
      at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
      at $Proxy54.revokeObjects(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.revokeProvisionedResources(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
      at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
      at com.thortech.xl.webclient.actions.ProvisionedResourcesForUserAction.execute(Unknown Source)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ERROR,12 Jul 2013 10:19:11,587,[XELLERATE.DATABASE],Class/Method: tcDataBase/readPartialStatement encounter some problems: ORA-00936: missing expression
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
      at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
      at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
      at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
      at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:479)
      at com.thortech.xl.util.JDBCUtils.executeQuery(Unknown Source)
      at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)

  • ABAP SQL DELETE Statement:SubQuery

    HI Expert.
    I need to write ABAP statement for following query
    TABLE1 IS INTERNAL TABLE and TABELE2 is database table.
    DELETE TABLE1 WHERE KEY1 IN (SELECT KEY1 FROM TABLE2)
    thanks
    Ajay
    Edited by: Ajay Kumar on Jan 6, 2010 7:01 PM

    take those in select-options or another internal table and delete
    for example
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    DELETE IT_MARA WHERE MATNR NOT IN S_MATNR.
    Please check the code below.
    TABLES : mara.
    TYPES :
    BEGIN OF ty_mara,
    matnr TYPE mara-matnr,
    END OF ty_mara.
    DATA :
      it_mara TYPE STANDARD TABLE OF mara.
    SELECT-OPTIONS :
       s_matnr FOR mara-matnr.
    START-OF-SELECTION.
      SELECT matnr
             FROM mara
             INTO TABLE it_mara.
      IF sy-subrc = 0.
        DELETE it_mara WHERE matnr NOT IN s_matnr.
      ENDIF.
    Let me know if you need furtehr info
    Regards
    Satish Boguda

  • SQL delete statement

    The common way to delete a specific row in a table is:
    DELETE FROM customerTable WHERE customerName =ABC AND customerID =123;
    However, are there any other alternative way to delete the specific row instead? Because my problem is i must link the name and ID together.
    I need something like the command below.
    DELETE FROM customerTable WHERE customerName AND customerID="ABC,123";
    I need to use "ABC,123" in one go, i cant separate them. Anyone have any idea. Please help.

    Thanks people and i appreciate all the help, but my client/server system is already there and working although true, it might not be an ideal application.
    DigitalDreamer:
    Whats wrong with
    DELETE FROM customerTable WHERE customerID =123;
    My system is actually a reservation system and the query above is suppose to be use for deleting a booking. (DELETE FROM bookingTable WHERE BookingID = "123";)
    The delete query you mentioned works equally the same as the one i
    need, as a matter of fact, thats what i am using for my system. (hehe)
    But my system doesnt seem right if all the user needs to key in is the
    bookingID to delete his booking. What if another user simply keys in a number and delete someone elses booking? Therefore i want to make the user key on more info before deleting his bookings. I am just trying my best to make my system abit more realistic.
    Anyway, the command || is not recognized in MS Access.
    Anyhow, the query below is what i was expecting.
    DELETE BookingID FROM [Booking Table] WHERE BookingID + [Customer name] = "123John"
    However, it still doesnt work because both of the column must be in text based form. BookingID is numeric (autonumber). Anybody here know to fix it?

  • SQL UPDATE Statement Explaination (urgent please...)

    Hi,
    Could anyone explain for me what this statement will do:
    update KPIR KR
    set ( CA ) = (
    select sum(sl.RRC_CONN_STP_ATT) CA
    from PV_WCEL_SERVICE_LEVEL sl, UTP_MO um
    where sl.GLOBAL_ID = um.CO_GID
    group by sl.STARTTIME, um.OBJECT_INSTANCE
    I could not understand how the mapping between the two tables will be ("um" clause is not used in the select statement and it is used only in the "where" and "group by" arguments) What does this mean?.
    The actual problem is that when I execute the above SQL statement, it was take around just 3 minutes to be implemented. But after we upgrade from Oracle 8 to Oracle 9, this statement is taking around 3 hours to be implemented.
    Anyone have any idea what is the problem?

    Below is the plan:
    KPIR table:
    RNC_ID (str), PST ('YYYYMMDD_HH24'), CA (Numner)
    1, 20061105_13, 0
    1, 20061105_14, 0
    1, 20061105_15, 0
    2, 20061105_13, 0
    2, 20061105_14, 0
    2, 20061105_15, 0
    3, 20061105_13, 0
    3, 20061105_14, 0
    3, 20061105_15, 0
    4, 20061105_13, 0
    4, 20061105_14, 0
    4, 20061105_15, 0
    PV_WCEL_SERVICE_LEVEL table:
    GLOBAL_ID (str), STARTTIME ('YYYYMMDD_HH24'), RRC_CONN_STP_ATT (Number)
    A1, 20061101_00, 9
    A1, 20061101_01, 4
    A1, 20061101_23, 3
    A1, 20061130_23, 4
    A2, 20061101_00, 3
    A2, 20061101_01, 4
    A2, 20061101_23, 1
    A2, 20061130_23, 5
    UTP_MO table;
    RNC_ID (str), GLOBAL_ID (str), OBJECT_INSTANCE (str)
    1, A1, <A1_NAME>
    1, A2, <A2_NAME>
    1, A9, <A9_NAME>
    2, B1, <B1_NAME>
    2, B2, <B2_NAME>
    2, B9, <B9_NAME>
    3, C1, <C1_NAME>
    3, C2, <C2_NAME>
    3, C9, <C9_NAME>
    4, D1, <D1_NAME>
    4, D2, <D2_NAME>
    4, D9, <D9_NAME>
    Now, I want to update the value of CA in table KPIR:
    For instance, for RNC_ID='1' and at PST='20061105_13', the CA should equals to the sum of value RRC_CONN_STP_ATT for all GLOBAL_IDs under RNC_ID='1' and at STARTTIME '20061105_13'.
    So, is this SQL UPDATE statement will do it?
    update KPIR kr
    set ( CA ) = (
    select sum(sl.RRC_CONN_STP_ATT) CA
    from PV_WCEL_SERVICE_LEVEL sl, UTP_MO um
    where sl.GLOBAL_ID = um.GLOBAL_ID and kr.RNC_ID = um.RNC_ID and kr.PST = sl.STARTTIME
    group by sl.STARTTIME, um.OBJECT_INSTANCE
    And if so, why it is taking around 3 hours to be implemented? This issue is happened after upgrading from Oracle 8 to 9.
    Really appreciate your help and thanks in advance.

  • Convert sql select statement to oracle

    Hi All,
    Can anyone help me converting this Sql select statement to oracle ....
    -----------------------------------------Query--------------------------------------------------------------
    select emp_master.emp_code ,
    emp_master.dept_cd ,
    attendance_master.daily_attn_code ,
    attendance_master.linked_column ,
    case when location.payroll_status <> 'N' and eDocsNetEmployeesLeave.StartDate < dateadd(mm, 1 , convert(smalldatetime, datename(yy ,location.next_pay_date) + '/'+ datename(mm ,location.next_pay_date)+ '/01'))     
    then
    dateadd(mm, 1 , convert(smalldatetime, datename(yy ,location.next_pay_date) + '/'+ datename(mm ,location.next_pay_date)+ '/01'))
    when eDocsNetEmployeesLeave.StartDate < convert(smalldatetime, datename(yy ,location.next_pay_date) + '/'+ datename(mm ,location.next_pay_date)+ '/01')     
    then convert(smalldatetime, datename(yy ,location.next_pay_date) + '/'+ datename(mm ,location.next_pay_date)+ '/01') else eDocsNetEmployeesLeaveDetails.StartDate           
    end ,
    eDocsNetEmployeesLeaveDetails.NoOfDays,          
    case when eDocsNetEmployeesLeave.StartDate > location.next_pay_date     
    then convert(datetime , convert(varchar, dateadd(ss,-1, dateadd(mm, 1, convert(datetime , datename(yy,eDocsNetEmployeesLeave.StartDate)+ '/' + datename(mm,eDocsNetEmployeesLeave.StartDate)+ '/01') )),106) )     
    else      
    case when location.payroll_status <> 'N'
    then dateadd(mm,1,location.next_pay_date)      
    else location.next_pay_date
    end      
    end as PaymentDate               ,
    isnull(grade_master.leave_type,'C') ,
    eDocsNetEmployeesLeave.StartDate ,          
    eDocsNetEmployeesLeaveDetails.LeaveType
    from eDocsNetEmployeesLeave ,
    eDocsNetEmployeesLeaveDetails ,
    eDocsNetLeaveTypes ,
    emp_master ,
    grade_master ,
    attendance_master ,
    location
    where eDocsNetEmployeesLeaveDetails.RequestID     = eDocsNetEmployeesLeave.RequestID and
    eDocsNetEmployeesLeave.EmployeeID = emp_master.emp_code and
    eDocsNetEmployeesLeaveDetails.LeaveType = eDocsNetLeaveTypes.LeaveTypeID and
    eDocsNetLeaveTypes.loc_cd = emp_master.loc_cd and
    location.loc_cd = emp_master.loc_cd and
    attendance_master.loc_cd = emp_master.loc_cd and
    attendance_master.linked_column = eDocsNetLeaveTypes.LinkedAttendance and
    grade_master.loc_cd = emp_master.loc_cd and
    grade_master.grade_cd = emp_master.grade_cd and
    eDocsNetEmployeesLeaveDetails.RequestID      = @RequestID
    order by eDocsNetEmployeesLeaveDetails.StartDate
    Thanks in Advance
    Smiley

    Seems like you want to convert a SQL statement from the ??? dialect to the Oracle dialect. *(It would be useful to indicate the non-ANSI standard SQL you are starting with.)
    Part of the problem is that you use several date related functions. Some are unnecessary in Oracle and some need to translated into Oracle functions as found in the Functions section (chapter 5) of the SQL Reference manual at http://www.oracle.com/pls/db102/homepage
    Note that columns and expressions of type 'date' in ORacle always contain all of "yyyy mm dd hh mi ss" and you need to format and trauncate as necessary.
    Also note that '09-JAN-31' is NOT an Oracle date, but rather a character representation of a date which must be converted to/from a date expression. You will often need to use the to_date() and to_char() functions with a format mask as the second parameter. This is also descreibed in the first 2 chapters of the SQL Reference manual.

  • Can someone help me correct this sql statement in a jsp page?

    ive been getting the java.sql.SQLException: Incorrect syntax error for one of my sql nested statements. i cant seem to find similar egs online, so reckon if anyone here could help, really appreciate it.
    as im putting the nested sql in jsp page, it has to be with lots of " " n crap. very confusing if there are nested.
    heres the sql statement without those "" that i want to use:
    select top 5 * from(
    select top+"'"+offset+"'"+" * from prod where cat=" +"'" cat "'"+"
    )order by prodID desc
    when i put this in my jsp pg, i had to add "" to become:
    String sql = "select top 5 * from("+"select top"+"'"+offset+"'"+" * from prod where cat=" +"'" +cat+ "'"+")order by prodID desc";cat=" +"'" cat "'"+")order by prodID desc";
    all those "" are confusing me to no end, so i cant figure out what should be the correct syntax. the error says the syntax error is near the offset.

    If offset is, say, 10, and cat is, say, "new", then it looks like you're going to produce the SQL:
    select top 5 * from(
      select top '10' * from prod where cat='new'
    )order by prodID descThat looks exactly like incorrect syntax to me... top almost certainly can't handle a string literal as its operand... you almost certainly would want "top 10" instead of "top '10'"...
    If you use PreparedStatement, you don't have to remember what you quote and what you don't and you can have your SQL in a single static final string to boot...

  • Access Code - DELETE Statement with DISTINCTROW and T-SQL

    All,
    I'm trying to rewrite Access Code to T-SQL Code. I understand how DISTINCTROW works in a SELECT statement but I'm not sure of the same in a DELETE statement.
    Any ideas?
    DELETE DISTINCTROW Order_detail.*
    FROM Order_Master
     INNER JOIN Order_detail
    ON (Order_Master.OrderID = Order_detail.OrderID)
    AND (Order_Master.OrderPartID = Order_detail.OrderPartID)
    Thanks,
    MS

    Could we use this syntax to delete records of two tables in same query ?
    DELETE DISTINCTROW TableA.*, TableB.* FROM
    TableA INNER JOIN TableB ON TableA.Name = TableB.Name
    No. You can delete only one table at a time.
    If you are using SQL Server 2012, you can try Merge:
    create table a (id int, name varchar(10))
    insert into a values (1,'aName'), (2,'ABCName'), (3,'BBBName')
    create table b(id int, name varchar(10))
    insert into b values (1,'bName'), (2,'ABCName'), (3,'BBBName')
    declare @t table ( name varchar(10))
    Merge a as tgt
    using b as src On tgt.name =src.name
    When matched then
    Delete
    Output deleted.name into @t;
    delete from b Where name in (select name from @t)
    Select * from a
    select * from b
    drop table a,b

  • The DELETE statement conflicted with the REFERENCE constraint "FK_Equipment_Assets". The conflict occurred in database "WorkOrderSystem", table "dbo.Equipment", column 'AssetCode'........can someone give me a solution for this Error.

    The DELETE statement conflicted with the REFERENCE constraint "FK_Equipment_Assets". The conflict occurred in database "WorkOrderSystem", table "dbo.Equipment", column 'AssetCode'

    ya that's true row is referenced by another table.....but i want the row to referred by another table ,I don't know how to fix it
    Actually this is not a C# issue. It is a T-SQl issue.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql
    The above link should be posted.
    Per my understanding, first you should
    delete the record from the Foreign Table and then after you have to delete the record from the Primary Key table
    Hope it helps you.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem : SQL Server Delete Statement vs Oracle Delete Statement

    Hi,
    I am currently involved in a SQL Server - Oracle Migration effort and I have hit a roadblock on one of the queries.
    I have created two tables named DUMMY and DUMMY1 in MSDE with the same structure :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             INT,
         NME                                                   VARCHAR(80),
         BATCH_ID                                              INT,
         CATALOG_NAME                                          VARCHAR(50),
         DATA_SOURCE                                           VARCHAR(50)
    GOI have a DELETE statement that deletes from the two tables, by selecting common data using Joins:-
    DELETE  DUMMY
    FROM      DUMMY src
            JOIN
         DUMMY1 dst 
              ON
                  src.batch_id = dst.batch_id 
              AND src.catalog_name = dst.catalog_name 
              AND src.data_source = dst.data_source
         WHERE
                   src.batch_id     = 1
              AND      src.catalog_name = '1'
                  AND      src.data_source  = '1'Now, I have created the same Tables ( DUMMY and DUMMY1 ) in Oracle :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             NUMBER(5),
         NME                                                      VARCHAR2(80),
         BATCH_ID                                             NUMBER(10),
         CATALOG_NAME                                  VARCHAR2(50),
         DATA_SOURCE                                     VARCHAR2(50)
    )I have written a Delete statement to mimic the fucntionality in this manner :-
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT *
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              )However, I keep getting this error whe I try to test it :-
    ORA-06550: line 1, column 89:
    PL/SQL: ORA-00913: too many values
    Can you please help me modify the query to simulate the same functionality as the orignial SQL Server Query ?
    Thanks,
    Sandeep

    There is probably a mismatch between the number of columns.
    Try this * Not Tested *
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT      src.client_id,
                   src.nme,
                   src.batch_id,
                   src.catalog_name,
                   src.data_source
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              );

  • How optimize this delete statement.

    Hi,
    It is possible to optimize the following delete?
    DELETE
    FROM subraw
    WHERE (((PERIOD_START_TIME >= to_date('20130918120000', 'yyyymmddhh24miss'))
            AND (PERIOD_START_TIME < to_date('20130918140000', 'yyyymmddhh24miss'))
            AND ((rn_id IN (4000000813562))))
           OR ((PERIOD_START_TIME >= to_date('20130918150000', 'yyyymmddhh24miss'))
               AND (PERIOD_START_TIME < to_date('20130919120000', 'yyyymmddhh24miss')))
           OR ((PERIOD_START_TIME >= to_date('20130919220000', 'yyyymmddhh24miss'))
               AND (PERIOD_START_TIME < to_date('20130919230000', 'yyyymmddhh24miss'))))
      AND (subraw.rn_id = 0
           OR EXISTS
             (SELECT *
              FROM CO_OBJECTS
              WHERE CO_ID = 4
                AND CO_OBJECTS.CO_GI = subraw.rn_id));
    The subraw table have 987792728 (aprox. 990 millions) rows
    The CO_OBJECTS have 3010749(aprox. 3millions) rows.
    The subraw_PK index (for the RN_ID,PERIOD_START_TIMEcolumns)
    The CO_OBJECTS_CO_GID index (for the CO_ID,CO_GI columns)
    PLAN_TABLE_OUTPUT
    Plan hash value: 2274303221
    | Id  | Operation                   | Name                         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | DELETE STATEMENT            |                              |  1606K|   870M|  1116  (93)| 00:00:01 |       |       |
    |   1 |  DELETE                     | subraw                       |       |       |            |          |       |       |
    |   2 |   CONCATENATION             |                              |       |       |            |          |       |       |
    |*  3 |    FILTER                   |                              |       |       |            |          |       |       |
    |   4 |     PARTITION RANGE SINGLE  |                              |   891 |   494K|     3  (34)| 00:00:01 |    31 |    31 |
    |*  5 |      INDEX RANGE SCAN       | subraw_PK                    |   891 |   494K|     3  (34)| 00:00:01 |    31 |    31 |
    |*  6 |     INDEX RANGE SCAN        | CO_OBJECTS_CO_GID            |   753 | 19578 |     1   (0)| 00:00:01 |       |       |
    |*  7 |    FILTER                   |                              |       |       |            |          |       |       |
    |   8 |     PARTITION RANGE SINGLE  |                              |  1713K|   927M|   368  (93)| 00:00:01 |    32 |    32 |
    |*  9 |      INDEX FULL SCAN        | subraw_PK                   |  1713K|   927M|   368  (93)| 00:00:01 |    32 |    32 |
    |* 10 |     INDEX RANGE SCAN        | CO_OBJECTS_CO_GID            |   753 | 19578 |     1   (0)| 00:00:01 |       |       |
    |* 11 |    FILTER                   |                              |       |       |            |          |       |       |
    |  12 |     PARTITION RANGE ITERATOR|                              |    25M|    13G|   744  (94)| 00:00:01 |    31 |    32 |
    |* 13 |      INDEX FULL SCAN        | subraw_PK                    |    25M|    13G|   744  (94)| 00:00:01 |    31 |    32 |
    |* 14 |     INDEX RANGE SCAN        | CO_OBJECTS_CO_GID            |   753 | 19578 |     1   (0)| 00:00:01 |       |       |
    BR,
    Jorge

    Hi,
    Please find below the info requested:
    SQL> select count(*) from subraw partition(PM_20130919);
    COUNT(*)
      33109835
    All partitions for the table above have aprox, 30 millions of rows
    Predicate Information (identified by operation id):
       3 - filter("RN_ID"=0 OR  EXISTS (SELECT 0 FROM "UMA"."CO_OBJECTS" "CO_OBJECTS" WHERE
                  "CO_OBJECTS"."CO_GI"=:B1 AND "CO_ID"=4))
       5 - access("RN_ID"=4000000813562 AND "PERIOD_START_TIME">=TO_DATE(' 2013-09-18 12:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "PERIOD_START_TIME"<TO_DATE(' 2013-09-18 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
           filter("PERIOD_START_TIME">=TO_DATE(' 2013-09-18 12:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "PERIOD_START_TIME"<TO_DATE(' 2013-09-18 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
       6 - access("CO_ID"=4 AND "CO_OBJECTS"."CO_GI"=:B1)
       7 - filter("RN_ID"=0 OR  EXISTS (SELECT 0 FROM "UMA"."CO_OBJECTS" "CO_OBJECTS" WHERE
                  "CO_OBJECTS"."CO_GI"=:B1 AND "CO_ID"=4))
       9 - access("PERIOD_START_TIME">=TO_DATE(' 2013-09-19 22:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "PERIOD_START_TIME"<TO_DATE(' 2013-09-19 23:00:00', 'syyyy-mm-dd hh24:mi:ss'))
           filter("PERIOD_START_TIME">=TO_DATE(' 2013-09-19 22:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "PERIOD_START_TIME"<TO_DATE(' 2013-09-19 23:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("RN_ID"=4000000813562) OR
                  LNNVL("PERIOD_START_TIME">=TO_DATE(' 2013-09-18 12:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
                  LNNVL("PERIOD_START_TIME"<TO_DATE(' 2013-09-18 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
      10 - access("CO_ID"=4 AND "CO_OBJECTS"."CO_GI"=:B1)
      11 - filter("RN_ID"=0 OR  EXISTS (SELECT 0 FROM "UMA"."CO_OBJECTS" "CO_OBJECTS" WHERE
                  "CO_OBJECTS"."CO_GI"=:B1 AND "CO_ID"=4))
      13 - access("PERIOD_START_TIME">=TO_DATE(' 2013-09-18 15:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "PERIOD_START_TIME"<TO_DATE(' 2013-09-19 12:00:00', 'syyyy-mm-dd hh24:mi:ss'))
           filter("PERIOD_START_TIME">=TO_DATE(' 2013-09-18 15:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "PERIOD_START_TIME"<TO_DATE(' 2013-09-19 12:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  (LNNVL("PERIOD_START_TIME">=TO_DATE(' 2013-09-19 22:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
                  LNNVL("PERIOD_START_TIME"<TO_DATE(' 2013-09-19 23:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
                  (LNNVL("RN_ID"=4000000813562) OR LNNVL("PERIOD_START_TIME">=TO_DATE(' 2013-09-18 12:00:00', 'syyyy-mm-dd
                  hh24:mi:ss')) OR LNNVL("PERIOD_START_TIME"<TO_DATE(' 2013-09-18 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
      14 - access("CO_ID"=4 AND "CO_OBJECTS"."CO_GI"=:B1)
    Note
       - dynamic sampling used for this statement (level=4)
    BR,
    Jorge

  • Did I misuse 'DISTINCT' in this SQL statement?

    I have a table TI_ORDER only contains following data:
    O_ID E_CODE M_SEQ B_SEQ
    VARCHAR NUMBER NUMBER NUMBER
    CE013 1 1 1
    CE013 1 2 1
    CE013 1 3 1
    CE013 1 4 1
    CE013 1 5 1
    CE013 1 6 1
    CE013 1 6 2
    CE013 1 7 1
    CE013 1 8 1
    CE013 1 8 2
    CE013 1 9 1
    CE013 1 10 1
    CE013 1 10 2
    CE013 2 1 1
    CE013 2 2 1
    CE013 2 3 1
    CE013 2 4 1
    CE013 2 5 1
    CE013 2 6 1
    CE013 2 6 2
    CE013 2 7 1
    CE013 2 8 1
    CE013 2 8 2
    CE013 2 9 1
    CE013 2 10 1
    CE013 2 10 2
    If I execute this SQL:
    ==============================================
    SELECT a.o_id, a.e_code,
    COUNT(a.o_id) OVER (PARTITION BY a.o_id, a.e_code) AS cnt
    FROM ( SELECT DISTINCT o_id, e_code, m_seq FROM ti_order ) a
    WHERE a.o_id = 'CE013'
    ==============================================
    It will show:
    ==============================================
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 1 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    CE013 2 10
    =============================================
    If I add 'DISTINCT' to previous SQL statement:
    ============================================
    SELECT DISTINCT a.o_id, a.e_code,
    COUNT(a.o_id) OVER (PARTITION BY a.o_id, a.e_code) AS cnt
    FROM ( SELECT DISTINCT o_id, e_code, m_seq FROM ti_order ) a
    WHERE a.o_id = 'CE013'
    ============================================
    It displays:
    ============================================
    CE013 1 13
    CE013 2 13
    ============================================
    Why does it not show following output as I want ?
    ============================================
    CE013 1 10
    CE013 2 10
    ============================================

    Looks like you have stumbled across a bug. Below output indicates that 9i (example 2) gets the correct answer here while 8i (example 1) does not. You ARE on 8i right?
    In any case, there is no need to use analytic functions here, good old COUNT is fine to get the correct answer (example 3).
    --------------------------- example 1 -----------------------------
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    SQL> CREATE TABLE table_name (
    2 o_id VARCHAR2 (5),
    3 e_code NUMBER (2),
    4 m_seq NUMBER (2),
    5 b_seq NUMBER (2));
    Table created.
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','1','1','1');
    1 row created.
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','1','2','1');
    (snip)
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','2','10','2');
    1 row created.
    SQL> SELECT DISTINCT a.o_id, a.e_code,
    2 COUNT (a.o_id) OVER (PARTITION BY a.o_id, a.e_code) AS cnt
    3 FROM (SELECT DISTINCT o_id, e_code, m_seq
    4 FROM table_name) a
    5 WHERE a.o_id = 'CE013';
    O_ID E_CODE CNT
    CE013 1 13
    CE013 2 13
    SQL>
    --------------------------- example 2 -----------------------------
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> CREATE TABLE table_name (
    2 o_id VARCHAR2 (5),
    3 e_code NUMBER (2),
    4 m_seq NUMBER (2),
    5 b_seq NUMBER (2));
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','1','1','1');
    1 row created.
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','1','2','1');
    1 row created.
    (snip)
    SQL> INSERT INTO TABLE_NAME VALUES ('CE013','2','10','2');
    1 row created.
    SQL> SELECT DISTINCT a.o_id, a.e_code,
    2 COUNT (a.o_id) OVER (PARTITION BY a.o_id, a.e_code) AS cnt
    3 FROM (SELECT DISTINCT o_id, e_code, m_seq
    4 FROM table_name) a
    5 WHERE a.o_id = 'CE013';
    O_ID E_CODE CNT
    CE013 1 10
    CE013 2 10
    SQL>
    --------------------------- example 3 -----------------------------
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    SQL> SELECT a.o_id, a.e_code, COUNT (*)
    2 FROM (SELECT DISTINCT o_id, e_code, m_seq
    3 FROM table_name) a
    4 WHERE a.o_id = 'CE013'
    5 GROUP BY a.o_id, a.e_code;
    O_ID E_CODE COUNT(*)
    CE013 1 10
    CE013 2 10
    SQL>
    Padders

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • This SQL statement always in Top Activity, with PX Deq Credit: send blkd

    Hi gurus,
    The following SQL statement is always among the Top Activity. I can see the details in Enerprise manager that it suffers from PX Deq Credit: send blkd
    This is the statement:
    SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
            ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
            FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
            FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
            FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
            FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
            S.LOC_CODE
            FROM V_STOCK_DETAIL S
            JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
            WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode;The statement is invoked by our front end (web based app) for a browse table displayed on a web page. The result can be 10 to 8000. It is used to display the current stock availability for a particular product in a particular warehouse. The stock availability it self is kept in a View : V_Stock_Detail
    These are the parameters relevant to the optimizer:
    SQL> show parameter user_dump_dest
    user_dump_dest                       string   /u01/app/oracle/admin/ITTDB/udump
    SQL> show parameter optimizer
    _optimizer_cost_based_transformation  string   OFF
    optimizer_dynamic_sampling           integer  2
    optimizer_features_enable            string   10.2.0.3
    optimizer_index_caching              integer  0
    optimizer_index_cost_adj             integer  100
    optimizer_mode                       string   ALL_ROWS
    optimizer_secure_view_merging        boolean  TRUE
    SQL> show parameter db_file_multi
    db_file_multiblock_read_count        integer  16
    SQL> show parameter db_block_size column sname format a20 column pname format a20
    db_block_size                        integer  8192Here is the output of EXPLAIN PLAN:
    SQL> explain plan for
    SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
        ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
        FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
        FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
        FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
        FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
        S.LOC_CODE
        FROM V_STOCK_DETAIL S
        JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
        WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
    Explain complete.
    Elapsed: 00:00:00:31
    SQL> select * from table(dbms_xplan.display)
    PLAN_TABLE_OUTPUT
    Plan hash value: 3252950027
    | Id  | Operation                               | Name                | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ
    Distrib |
    |   0 | SELECT STATEMENT                        |                     |     1 |   169 |     6  (17)| 00:00:01 |        |      |
             |
    |   1 |  PX COORDINATOR                         |                     |       |       |            |          |        |      |
             |
    |   2 |   PX SEND QC (RANDOM)                   | :TQ10003            |     1 |   169 |     6  (17)| 00:00:01 |  Q1,03 | P->S | QC
    (RAND)  |
    |   3 |    HASH GROUP BY                        |                     |     1 |   169 |     6  (17)| 00:00:01 |  Q1,03 | PCWP |
             |
    |   4 |     PX RECEIVE                          |                     |     1 |   169 |     6  (17)| 00:00:01 |  Q1,03 | PCWP |
             |
    |   5 |      PX SEND HASH                       | :TQ10002            |     1 |   169 |     6  (17)| 00:00:01 |  Q1,02 | P->P | HA
    SH       |
    |   6 |       HASH GROUP BY                     |                     |     1 |   169 |     6  (17)| 00:00:01 |  Q1,02 | PCWP |
             |
    |   7 |        NESTED LOOPS OUTER               |                     |     1 |   169 |     5   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |   8 |         MERGE JOIN CARTESIAN            |                     |     1 |   119 |     4   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |   9 |          SORT JOIN                      |                     |       |       |            |          |  Q1,02 | PCWP |
             |
    |  10 |           NESTED LOOPS                  |                     |     1 |    49 |     4   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |  11 |            BUFFER SORT                  |                     |       |       |            |          |  Q1,02 | PCWC |
             |
    |  12 |             PX RECEIVE                  |                     |       |       |            |          |  Q1,02 | PCWP |
             |
    |  13 |              PX SEND BROADCAST          | :TQ10000            |       |       |            |          |        | S->P | BR
    OADCAST  |
    |* 14 |               INDEX RANGE SCAN          | PRODUCTS_IDX2       |     1 |    25 |     2   (0)| 00:00:01 |        |      |
             |
    |  15 |            PX BLOCK ITERATOR            |                     |     1 |    24 |     2   (0)| 00:00:01 |  Q1,02 | PCWC |
             |
    |* 16 |             MAT_VIEW ACCESS FULL        | MV_CONVERT_UOM      |     1 |    24 |     2   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |  17 |          BUFFER SORT                    |                     |     1 |    70 |     2   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |  18 |           BUFFER SORT                   |                     |       |       |            |          |  Q1,02 | PCWC |
             |
    |  19 |            PX RECEIVE                   |                     |     1 |    70 |     4   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |  20 |             PX SEND BROADCAST           | :TQ10001            |     1 |    70 |     4   (0)| 00:00:01 |        | S->P | BR
    OADCAST  |
    |* 21 |              TABLE ACCESS BY INDEX ROWID| STOCK               |     1 |    70 |     4   (0)| 00:00:01 |        |      |
             |
    |* 22 |               INDEX RANGE SCAN          | STOCK_PK            |     1 |       |     2   (0)| 00:00:01 |        |      |
             |
    |* 23 |         TABLE ACCESS BY INDEX ROWID     | MV_TRANS_STOCK      |     1 |    50 |     3   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    |* 24 |          INDEX RANGE SCAN               | MV_TRANS_STOCK_IDX1 |     1 |       |     2   (0)| 00:00:01 |  Q1,02 | PCWP |
             |
    Predicate Information (identified by operation id):
      14 - access("P"."PRODUCT"=:PPRODUCT)
      16 - filter("CON"."PRODUCT"=:PPRODUCT)
      21 - filter("STOCK"."LOC_CODE"=:PLOCCODE)
      22 - access("STOCK"."PRODUCT"=:PPRODUCT AND "STOCK"."WH_CODE"=:PWHCODE)
      23 - filter("STS"(+)='N')
      24 - access("PRODUCT"(+)=:PPRODUCT AND "WH_CODE"(+)=:PWHCODE AND "LOC_CODE"(+)=:PLOCCODE AND "RACK"(+)="STOCK"."RACK" AND
                  "BATCH"(+)="STOCK"."BATCH" AND "EXP_DATE"(+)="STOCK"."EXP_DATE")
    42 rows selected.
    Elapsed: 00:00:00:06Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
    SQL> SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
        ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
        FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
        FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
        FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
        FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
        S.LOC_CODE
        FROM V_STOCK_DETAIL S
        JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
        WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
    Execution Plan
       0      SELECT STATEMENT Optimizer Mode=ALL_ROWS   1   169   6
       1    0   PX COORDINATOR
       2    1     PX SEND QC (RANDOM) SYS.:TQ10003 1   169   6   :Q1003  P->S   QC (RANDOM)
       3    2       HASH GROUP BY   1   169   6   :Q1003  PCWP
       4    3         PX RECEIVE   1   169   6   :Q1003  PCWP
       5    4           PX SEND HASH SYS.:TQ10002 1   169   6   :Q1002  P->P   HASH
       6    5             HASH GROUP BY   1   169   6   :Q1002  PCWP
       7    6               NESTED LOOPS OUTER   1   169   5   :Q1002  PCWP
       8    7                 MERGE JOIN CARTESIAN   1   119   4   :Q1002  PCWP
       9    8                   SORT JOIN          :Q1002  PCWP
      10    9                     NESTED LOOPS   1   49   4   :Q1002  PCWP
      11   10                       BUFFER SORT          :Q1002  PCWC
      12   11                         PX RECEIVE          :Q1002  PCWP
      13   12                           PX SEND BROADCAST SYS.:TQ10000           S->P   BROADCAST
      14   13                             INDEX RANGE SCAN ITT_NEW.PRODUCTS_IDX2 1   25   2
      15   10                       PX BLOCK ITERATOR   1   24   2   :Q1002  PCWC
      16   15                         MAT_VIEW ACCESS FULL ITT_NEW.MV_CONVERT_UOM 1   24   2   :Q1002  PCWP
      17    8                   BUFFER SORT   1   70   2   :Q1002  PCWP
      18   17                     BUFFER SORT          :Q1002  PCWC
      19   18                       PX RECEIVE   1   70   4   :Q1002  PCWP
      20   19                         PX SEND BROADCAST SYS.:TQ10001 1   70   4      S->P   BROADCAST
      21   20                           TABLE ACCESS BY INDEX ROWID ITT_NEW.STOCK 1   70   4
      22   21                             INDEX RANGE SCAN ITT_NEW.STOCK_PK 1     2
      23    7                 TABLE ACCESS BY INDEX ROWID ITT_NEW.MV_TRANS_STOCK 1   50   3   :Q1002  PCWP
      24   23                   INDEX RANGE SCAN ITT_NEW.MV_TRANS_STOCK_IDX1 1     2   :Q1002  PCWP
    Statistics
            570  recursive calls
              0  physical write total IO requests
              0  physical write total multi block requests
              0  physical write total bytes
              0  physical writes direct temporary tablespace
              0  java session heap live size max
              0  java session heap object count
              0  java session heap object count max
              0  java session heap collected count
              0  java session heap collected bytes
             83  rows processed
    Elapsed: 00:00:03:24
    SQL> disconnect
    Commit complete
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining optionsThe TKPROF output for this statement looks like the following:
    TKPROF: Release 10.2.0.3.0 - Production on Thu Apr 23 12:39:29 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: ittdb_ora_9566_mytrace1.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    SELECT S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
        ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,
        FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.PRODUCT, Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,
        FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P.UOM_K ), 0) QtyOut_K,
        FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
        FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,
        S.LOC_CODE
        FROM V_STOCK_DETAIL S
        JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT
        WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC_CODE = :pLocCode
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.04       0.12          0         10          4           0
    Fetch       43      0.05       2.02          0         73          0          83
    total       45      0.10       2.15          0         83          4          83
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 164 
    Rows     Row Source Operation
         83  PX COORDINATOR  (cr=83 pr=0 pw=0 time=2086576 us)
          0   PX SEND QC (RANDOM) :TQ10003 (cr=0 pr=0 pw=0 time=0 us)
          0    HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
          0     PX RECEIVE  (cr=0 pr=0 pw=0 time=0 us)
          0      PX SEND HASH :TQ10002 (cr=0 pr=0 pw=0 time=0 us)
          0       HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
          0        NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
          0         MERGE JOIN CARTESIAN (cr=0 pr=0 pw=0 time=0 us)
          0          SORT JOIN (cr=0 pr=0 pw=0 time=0 us)
          0           NESTED LOOPS  (cr=0 pr=0 pw=0 time=0 us)
          0            BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
          0             PX RECEIVE  (cr=0 pr=0 pw=0 time=0 us)
          0              PX SEND BROADCAST :TQ10000 (cr=0 pr=0 pw=0 time=0 us)
          1               INDEX RANGE SCAN PRODUCTS_IDX2 (cr=2 pr=0 pw=0 time=62 us)(object id 135097)
          0            PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us)
          0             MAT_VIEW ACCESS FULL MV_CONVERT_UOM (cr=0 pr=0 pw=0 time=0 us)
          0          BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
          0           BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
          0            PX RECEIVE  (cr=0 pr=0 pw=0 time=0 us)
          0             PX SEND BROADCAST :TQ10001 (cr=0 pr=0 pw=0 time=0 us)
         83              TABLE ACCESS BY INDEX ROWID STOCK (cr=78 pr=0 pw=0 time=1635 us)
         83               INDEX RANGE SCAN STOCK_PK (cr=4 pr=0 pw=0 time=458 us)(object id 135252)
          0         TABLE ACCESS BY INDEX ROWID MV_TRANS_STOCK (cr=0 pr=0 pw=0 time=0 us)
          0          INDEX RANGE SCAN MV_TRANS_STOCK_IDX1 (cr=0 pr=0 pw=0 time=0 us)(object id 143537)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      PX Deq: Join ACK                               17        0.00          0.00
      PX qref latch                                   2        0.00          0.00
      PX Deq Credit: send blkd                       72        1.95          2.00
      PX Deq: Parse Reply                            26        0.01          0.01
      SQL*Net message to client                      43        0.00          0.00
      PX Deq: Execute Reply                          19        0.00          0.01
      SQL*Net message from client                    43        0.00          0.04
      PX Deq: Signal ACK                             12        0.00          0.00
      enq: PS - contention                            1        0.00          0.00
    ********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'))
    PLAN_TABLE_OUTPUT
    SQL_ID  402b8st7vt6ku, child number 2
    SELECT /*+ gather_plan_statistics */          S.Product, S.WH_CODE, S.RACK, S.BATCH, S.EXP_DATE, FLOOR(Qty_Beg) QtyBeg_B,
    ROUND(f_convert_qty(S.PRODUCT, Qty_Beg-FLOOR(Qty_Beg), P.UOM_K ), 0) QtyBeg_K,      FLOOR(Qty_In) QtyIn_B, ROUND(f_convert_qty(S.P
    RODUCT,
    Qty_In-FLOOR(Qty_In), P.UOM_K), 0) QtyIn_K,      FLOOR(Qty_Out) QtyOut_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Out-FLOOR(Qty_Out), P
    .UOM_K ),
    0) QtyOut_K,      FLOOR(Qty_Adj) QtyAdj_B, ROUND(f_convert_qty(S.PRODUCT, Qty_Adj-FLOOR(Qty_Adj), P.UOM_K ), 0) QtyAdj_K,
    FLOOR(Qty_End) QtyEnd_B, ROUND(f_convert_qty(S.PRODUCT, Qty_End-FLOOR(Qty_End), P.UOM_K ), 0) QtyEnd_K,      S.LOC_CODE      FROM
    V_STOCK_DETAIL S      JOIN PRODUCTS P ON P.PRODUCT = S.PRODUCT      WHERE S.Product = :pProduct AND S.WH_CODE = :pWhCode AND S.LOC
    _CODE =
    :pLocCode
    Plan hash value: 3252950027
    | Id  | Operation                               | Name                | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |
    1Mem | Used-Mem |
    |   1 |  PX COORDINATOR                         |                     |      1 |        |     83 |00:00:02.25 |      83 |       |
          |          |
    |   2 |   PX SEND QC (RANDOM)                   | :TQ10003            |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   3 |    HASH GROUP BY                        |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   4 |     PX RECEIVE                          |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   5 |      PX SEND HASH                       | :TQ10002            |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   6 |       HASH GROUP BY                     |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   7 |        NESTED LOOPS OUTER               |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   8 |         MERGE JOIN CARTESIAN            |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |   9 |          SORT JOIN                      |                     |      0 |        |      0 |00:00:00.01 |       0 | 73728 |
    73728 |          |
    |  10 |           NESTED LOOPS                  |                     |      0 |      1 |      0 |00:00:00.01 |       0 |       |
          |          |
    |  11 |            BUFFER SORT                  |                     |      0 |        |      0 |00:00:00.01 |       0 | 73728 |
    73728 |          |
    |  12 |             PX RECEIVE                  |                     |      0 |        |      0 |00:00:00.01 |       0 |       |
          |          |
    |  13 |              PX SEND BROADCAST          | :TQ10000            |      0 |        |      0 |00:00:00.01 |       0 |       |
          |          |
    |* 14 |               INDEX RANGE SCAN          | PRODUCTS_IDX2       |      1 |      1 |      1 |00:00:00.01 |       2 |       |
          |          |
    |  15 |            PX BLOCK ITERATOR            |                     |      0 |      1 |      0 |00:00:00.01 |       0 |       |
          |          |
    |* 16 |             MAT_VIEW ACCESS FULL        | MV_CONVERT_UOM      |      0 |      1 |      0 |00:00:00.01 |       0 |       |
          |          |
    |  17 |          BUFFER SORT                    |                     |      0 |     21 |      0 |00:00:00.01 |       0 | 73728 |
    73728 |          |
    |  18 |           BUFFER SORT                   |                     |      0 |        |      0 |00:00:00.01 |       0 | 73728 |
    73728 |          |
    |  19 |            PX RECEIVE                   |                     |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |  20 |             PX SEND BROADCAST           | :TQ10001            |      0 |     21 |      0 |00:00:00.01 |       0 |       |
          |          |
    |* 21 |              TABLE ACCESS BY INDEX ROWID| STOCK               |      1 |     21 |     83 |00:00:00.01 |      78 |       |
          |          |
    |* 22 |               INDEX RANGE SCAN          | STOCK_PK            |      1 |     91 |     83 |00:00:00.01 |       4 |       |
          |          |
    |* 23 |         TABLE ACCESS BY INDEX ROWID     | MV_TRANS_STOCK      |      0 |      1 |      0 |00:00:00.01 |       0 |       |
          |          |
    |* 24 |          INDEX RANGE SCAN               | MV_TRANS_STOCK_IDX1 |      0 |      1 |      0 |00:00:00.01 |       0 |       |
          |          |
    Predicate Information (identified by operation id):
      14 - access("P"."PRODUCT"=:PPRODUCT)
      16 - access(:Z>=:Z AND :Z<=:Z)
           filter("CON"."PRODUCT"=:PPRODUCT)
      21 - filter("STOCK"."LOC_CODE"=:PLOCCODE)
      22 - access("STOCK"."PRODUCT"=:PPRODUCT AND "STOCK"."WH_CODE"=:PWHCODE)
      23 - filter("STS"='N')
      24 - access("PRODUCT"=:PPRODUCT AND "WH_CODE"=:PWHCODE AND "LOC_CODE"=:PLOCCODE AND "RACK"="STOCK"."RACK" AND "BATCH"="STOCK"."B
    ATCH" AND
                  "EXP_DATE"="STOCK"."EXP_DATE")
    53 rows selected.
    Elapsed: 00:00:00:12I'm looking forward for suggestions how to improve the performance of this statement.
    Thank you very much,
    xtanto

    xtanto wrote:
    Hi sir,
    How to prevent the query from doing parallel query ?
    Because as you see actually I am not issuing any Parallel hints in the query.
    Thank you,
    xtantoKristanto,
    there are a couple of points to consider:
    1. Your SQL*Plus version seems to be outdated. Please use a SQL*Plus version that corresponds to your database version. E.g. the AUTOTRACE output is odd.
    2. I would suggest to repeat your exercise using serial execution (the plan, the autotrace, the tracing). You can disable parallel queries by issuing this in your session:
    ALTER SESSION DISABLE PARALLEL QUERY;
    This way the output of the tools is much more meaningful, however you might get a different execution plan, therefore the results might not be representative for your parallel execution.
    3. The function calls might pose a problem. If they are, one possible damage limitation has been provided by hoek. Even better would be then to replace the PL/SQL function with equivalent plain SQL. However since you say that it generates not too many rows it might not harm here too much. You can check the impact of the functions by running a similar query but omitting the function calls.
    4. The parallel execution plan contains a MERGE JOIN CARTESIAN operation which could be an issue if the estimates of the optimizer are incorrect. If the serial execution still uses this operation the TKPROF and DBMS_XPLAN.DISPLAY_CURSOR output will reveal whether this is a problem or not.
    5. The execution of the statement seems to take on 2-3 seconds in your tests. Is this in the right ballpark? If yes, why should this statement then be problematic? How often does it get executed?
    6. The statement uses bind variables, so you might have executions that use different execution plans depending on the bind values passed when the statement got optimized. You can use DBMS_XPLAN.DISPLAY_CURSOR using NULL as "child_number" parameter or DBMS_XPLAN.DISPLAY_AWR (if you have a AWR license) to check if you have multiple execution plans for the statement. Please note that older versions might have already been aged out of the shared pool, so the AWR repository might be a more reliable source (but only if the statement has been sampled).
    7. You have disabled cost based transformations: "_optimizer_cost_based_transformation" = OFF. Why?
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Whats wrong with this sql statement ??

    Hello all, I am trying to run the below query out of persheet(tanel poder) performance excel chart...but i get below error...db is on 9.2
    what is wrong with this sql statement ?
    http://blog.tanelpoder.com/2008/12/28/performance-visualization-made-easy-perfsheet-20-beta/
    select * from (
    with fsq as (
      select /*+ materialize */
       i.dbid
        , i.instance_name
        , i.instance_number
    --    , trunc(s.snap_time, 'DD')     DAY
    --    , to_number(to_char(s.snap_time, 'HH24'))  HOUR
    --   -- , to_char(s.snap_time, 'MI')    MINUTE
    --    , 0           MINUTE
        , trunc(
          lag(s.snap_time, 1)
          over(
           partition by
          v.dbid
           , i.instance_name
           , v.instance_number
           , v.event
         order by
          s.snap_time
          , 'HH24'
         )           SNAP_TIME
        , v.event_type        EVENT_TYPE
        , v.event          EVENT_NAME
        , nvl(
        decode(
         greatest(
          time_waited_micro,
          nvl(
           lag(time_waited_micro,1,0)
           over(
            partition by
             v.dbid
              , i.instance_name
              , v.instance_number
              , v.event
            order by v.snap_id
           , time_waited_micro
         time_waited_micro,
         time_waited_micro - lag(time_waited_micro,1,0)
         over (
          partition by
           v.dbid
            , i.instance_name
            , v.instance_number
            , v.event
          order by v.snap_id
         time_waited_micro
           , time_waited_micro
         ) / 1000000         SECONDS_SPENT
        , total_waits         WAIT_COUNT
      from
       (select distinct dbid, instance_name, instance_number from stats$database_instance) i
        , stats$snapshot s
        , ( select
         snap_id, dbid, instance_number, 'WAIT' event_type, event, time_waited_micro, total_waits
        from
         stats$system_event
        where
         event not in (select event from stats$idle_event)
        union all
        select
         snap_id, dbid, instance_number,
         case
          when name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage') then 'CPU'
          when name like 'OS % time' then 'OS'
          else 'STAT'
         end,
         name , value, 1
        from
         stats$sysstat
    --    where      name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage')
    --    or  name like('OS % time')
    --    or 1 = 2 -- this will be a bind variable controlling whether all stats need to be returned
       ) v
      where
       i.dbid = s.dbid
      and i.dbid = v.dbid
      and s.dbid = v.dbid
      and s.snap_id = v.snap_id
      and s.snap_time between '%FROM_DATE%' and '%TO_DATE%'
      and i.instance_name = '%INSTANCE%'
    select * from (
      select
       instance_name
        , instance_number
        , snap_time
        , trunc(snap_time, 'DD')  DAY
        , to_char(snap_time, 'HH24') HOUR
        , to_char(snap_time, 'MI') MINUTE      
        , event_type  
        , event_name  
        , seconds_spent
        , wait_count  
        , ratio_to_report(seconds_spent) over (
    --      partition by (to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09'))
          partition by (snap_time)
          ) ratio
      from fsq
      where
       snap_time is not null -- lag(s.snap_time, 1) function above will leave time NULL for first snapshot
      -- to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')
      -- > ( select min(to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')) from fsq)
    where ratio > 0
    order by
        instance_name
      , instance_number
      , day
      , hour
      , minute
      , event_type
      , seconds_spent desc
      , wait_count desc
    Error at line 6
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00972: identifier is too long

    Hi Alex,
    Subquery factoring a.k.a. the with-clause should be possible on 9.2:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_103a.htm#2075888
    (used it myself as well on 9.2)
    @OP
    I recall having problems myself using PL/SQL Developer and trying to get the with clause to work on 9.2 some years ago.
    A workaround might be to create a view based on the query.
    Also, your error message is "ORA-00972: identifier is too long"...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e900.htm#sthref419
    Can't test things currently, no 9.2 available at the moment, but perhaps tomorrow I'll have a chance.

Maybe you are looking for

  • Store XML node value into an array with node element name

    Hi, I have the following code that displays the node element with the corresponding node value. I want to store the values in an array in reference to the node name. i.e. XML (my xml is much bigger than this, 300 elements): <stock> <symbol>SUNW</symb

  • Anyone know how to get the Authorization Code for Photoshop 7?

    I reinstalled it on a new computer and there's no phone support but also no ability to activate it online, keeps saying the activation system is unavailable. Thanks in advance!

  • Paint does not fill up brush

    While working on an image tonight, i noticed my hard edged brush wasn't being filled with paint. Doing a simple mask, the brush circle is not filled with paint. There's a white space between the actual paint laid in the mask and the circle indicating

  • Noisy phone line

    About a week ago my phone line became very noisy and my internet connection kept dropping. After contacting BT they tested the line and said no faults found and blamed the fault on a line filter and promptly sent me 2 new ones. Since fitting these th

  • Video problem I hope you can help with

    I have an Intel Mac Pro that has a strange video problem. It can work fine for hours and then for no reason change resolution and size with blurry shadows, making it virtually unreadable and certainly unusable. Unplugging the monitor and plugging it