8 Replies Latest reply on Jul 3, 2009 6:03 AM by 701963

    Problem with Database after Shutdown

    701963
      Hello everyone,

      I have the following problem:

      I am just on measuring the response time of SPARQL queries that I send to my RDF Database. In order to get proper times, I thought, I have to shutdown the system.
      As I know now, it would have been better, only to delete the cache of my database instead of shutting it down, but now it's too late.
      Before I shutted it down, all of my queries worked really fine. After the shutdown, there are only two or three queries remaining, that still work. All the others throw SQLExceptions.
      I have done the shutdown with SQL*Plus entering "SHUTDOWN IMMEDIATE"

      Now, as I always get these Exceptions, I fear, that anything in my Database has been deleted or set to "Default".

      Can anyone tell me, how I can get or come back to the situation I had before shutting databse down?

      Waiting for your help

      Regards
      Christian
        • 1. Re: Problem with Database after Shutdown
          brtk
          Hi,
          Specify what is the printStackTrace() of your SQLException.

          Bartek
          • 2. Re: Problem with Database after Shutdown
            701963
            Loadind Query...
            INFO main (SimpleLog.java:49) - Final clause = SELECT ee$RDFVTYP, ee$RDFLTYP, ee$RDFLANG, ee$RDFCLOB, decode(ee$RDFVTYP, 'BLN', ('_:'||substr(ee,instr(ee,'m',4)+1)), ee) ee, title$RDFVTYP, title$RDFLTYP, title$RDFLANG, title$RDFCLOB, decode(title$RDFVTYP, 'BLN', ('_:'||substr(title,instr(title,'m',4)+1)), title) title, inproc$RDFVTYP, decode(inproc$RDFVTYP, 'BLN', ('_:'||substr(inproc,instr(inproc,'m',4)+1)), inproc) inproc, yr$RDFVTYP, yr$RDFLTYP, yr$RDFLANG, yr$RDFCLOB, decode(yr$RDFVTYP, 'BLN', ('_:'||substr(yr,instr(yr,'m',4)+1)), yr) yr, booktitle$RDFVTYP, booktitle$RDFLTYP, booktitle$RDFLANG, booktitle$RDFCLOB, decode(booktitle$RDFVTYP, 'BLN', ('_:'||substr(booktitle,instr(booktitle,'m',4)+1)), booktitle) booktitle, proc$RDFVTYP, proc$RDFLTYP, proc$RDFLANG, proc$RDFCLOB, decode(proc$RDFVTYP, 'BLN', ('_:'||substr(proc,instr(proc,'m',4)+1)), proc) proc, page$RDFVTYP, page$RDFLTYP, page$RDFLANG, page$RDFCLOB, decode(page$RDFVTYP, 'BLN', ('_:'||substr(page,instr(page,'m',4)+1)), page) page, url$RDFVTYP, url$RDFLTYP, url$RDFLANG, url$RDFCLOB, decode(url$RDFVTYP, 'BLN', ('_:'||substr(url,instr(url,'m',4)+1)), url) url, author$RDFVTYP, author$RDFLTYP, author$RDFLANG, author$RDFCLOB, decode(author$RDFVTYP, 'BLN', ('_:'||substr(author,instr(author,'m',4)+1)), author) author FROM table(sdo_rdf_match('(?inproc <http://purl.org/dc/terms/issued> ?yr) (?inproc <http://xmlns.com/foaf/0.1/homepage> ?url) (?inproc <http://swrc.ontoware.org/ontology#pages> ?page) (?inproc <http://www.w3.org/2000/01/rdfschema#seeAlso> ?ee) (?inproc <http://purl.org/dc/terms/partOf> ?proc) (?inproc <http://purl.org/dc/elements/1.1/title> ?title) (?inproc <http://localhost/vocabulary/bench/booktitle> ?booktitle) (?inproc <http://purl.org/dc/elements/1.1/creator> ?author) (?inproc <http://www.w3.org/1999/02/22-rdfsyntax-ns#type> <http://localhost/vocabulary/bench/Inproceedings>) ', sdo_rdf_models('HUNDERTK'), null, null, null, null))
            Exception in thread "main" java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
            ORA-06512: in Zeile 4

            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
            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:1034)
            at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
            at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
            at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
            at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
            at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:255)
            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:302)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH$StagePattern.<init>(QueryIterBlockTriplesQH.java:89)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH.nextStage(QueryIterBlockTriplesQH.java:55)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:92)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:85)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.sort(QueryIterSort.java:47)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:39)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:34)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:355)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:163)
            at com.hp.hpl.jena.sparql.algebra.op.OpOrder.visit(OpOrder.java:28)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:361)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:170)
            at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:38)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:72)
            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain.eval(QueryEngineMain.java:44)
            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:86)
            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:75)
            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain$1.create(QueryEngineMain.java:67)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:282)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:259)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:264)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:92)
            at Time.main(Time.java:300)
            com.hp.hpl.jena.shared.JenaException: rethrew: java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
            ORA-06512: in Zeile 4

            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:352)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH$StagePattern.<init>(QueryIterBlockTriplesQH.java:89)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH.nextStage(QueryIterBlockTriplesQH.java:55)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:92)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:85)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.sort(QueryIterSort.java:47)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:39)
            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:34)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:355)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:163)
            at com.hp.hpl.jena.sparql.algebra.op.OpOrder.visit(OpOrder.java:28)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:361)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:170)
            at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:38)
            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:72)
            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain.eval(QueryEngineMain.java:44)
            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:86)
            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:75)
            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain$1.create(QueryEngineMain.java:67)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:282)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:259)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:264)
            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:92)
            at Time.main(Time.java:300)
            Caused by: java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
            ORA-06512: in Zeile 4

            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
            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:1034)
            at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
            at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
            at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
            at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
            at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:255)
            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:302)
            ... 31 more

            this appears when I try to run...
            • 3. Re: Problem with Database after Shutdown
              701963
              I just saw, that there is this error in the Message:

              ...Caused by: java.sql.SQLException: ORA-00449: background process 'MMON' unexpectedly terminated with error string 448

              In an Oracle FAQ I read:

              ORA-00449 background process 'string' unexpectedly terminated with error string

              Cause: A foreground process needing service from a background process has discovered the process died.

              Action: Refer to the message code given in the message and the trace file for the foreground and the background processes.

              Is it possible, that I "killed" the MMON process by shutting down the database?
              If yes, how can I relaunch this process again?

              Best regards
              Christian
              • 4. Re: Problem with Database after Shutdown
                brtk
                For some reason process MMON was killed. Your action or bug, whatever.
                the best option is to shutdown database and restart it again. After shutdown be sure that no oracle process is running.
                If after restart the problem still occurs then look into alert.log.

                Bartek
                BTW. Looking into alert.log is good practice anyway.
                • 5. Re: Problem with Database after Shutdown
                  701963
                  Hi again,

                  you said i shall restart the database. But when I entered shutdown command, it took some time and then the database was running again.
                  The curious thing is, that some of my queries workd very well, and others cause errors.
                  I don't understand that.
                  And what about the alert log`? How can I open this log? And if I look into that log, what does the information tell me?

                  I am a Oracle noob... :)
                  • 6. Re: Problem with Database after Shutdown
                    brtk
                    The curious thing is, that some of my queries workd very well, and others cause errors.
                    From "your" FAQ: if the process need...
                    For some operation it needs, for some not.
                    After start database and before 'invalid' query check if the process MMON exists (select program from v$session or ps -ef command).
                    If exists then MMON is killed because of your query, if not then then the reason is somewhere else.
                    How can I open this log?
                    In sql plus show parameter background_dump_dest (or in 11g show parameter diagnostic_dest)
                    File is named alert_*.log.
                    And if I look into that log, what does the information tell me?
                    Look for errors with "MMON". There may also be path to additional trace file (i.e. diagnostic log).

                    Bartek
                    • 7. Re: Problem with Database after Shutdown
                      brtk
                      What is your db version and os?
                      • 8. Re: Problem with Database after Shutdown
                        701963
                        Hello,

                        thanks for your help. I could solve the problem by starting the databse once again with "db startup"

                        Christian