Database recovery in a replication environment

Hi everybody,
I've configured a replication environment with Oracle 11g (Multimaster synchronous replication). Apparently it works fine, when replication is started any change in a table that belongs in a node is replicated in the rest of the nodes.
One of the tests I'm making is the following: Try to see what happens if one of the nodes drops. Meanwhile one of the nodes is no avalaible, any modification in an avalaible node is not allowed (as I expected). I'm trying to see if the database service can be avalaible meanwhile a node is missing, although the replications is not running.
What I've experienced is replication cannot be suspended until the the node was down is restarted.
Is this the usual behaviour or can I set any parameters to avoid this? In other words, is it possible the database service is running meanwhile one of the nodes is down? The application I'm working on needs this type of replication, buy also needs the service is running always?
What can I do to make possible the service is running even when a node falls?
Thanks in advance

Yes, I've considered an asynchronous replication, with a short period of time (it should be almost synchronous).
I've tested that, if one of the nodes drops, database service is not available. User intervention is required to stop replication and let the system go on without replication.
I could be a great idea that, althoug replication is not working, database service is still running and, when replication is restarted, system continue as in the beginning.
When I test the asynchronous choice I'll answer this post.
Best wishes,
Payo

Similar Messages

  • Character set conversion in advanced replication environment 10g

    we have a replication environment with 5 databases using oracle 10g. one master definition site, 4 master sites. we want to change database character set in replication environment.
    Does somebody has experience about database character set conversion in replication environment.
    Thanks

    842106 wrote:
    Hi All,
    I am currently facing a strange issue while loading a csv into oracle BE table.
    The data is coming as Técnicas but I need to store it as Técnicas . I think there is some character set issue for which data is coming as in distorted manner .
    I am using oracle 10G enterprise edition .
    Any help is greatly appreciated.How do I ask a question on the forums?
    SQL and PL/SQL FAQ
    what do you observe when you inspect the actual content of the CSV file?

  • If the production database i down, how to switch to standby database using the replication environment in ASsE

    This question is in Business Continuity Plan (BCP)
    if the production database is down, how to switch to standby database using the replication environment in ASE

    Assuming you're referring to Sybase's Replication Server (repserver) product ...
    Repserver moves data changes from one database to another.
    Repserver can't 'switch' your application to use a different database; something outside of repserver has to do the actual switching.
    If your application happens to be connecting to your ASE via Sybase's OpenSwitch (or similar) product, then OpenSwitch would be responsible for switching your application to use the standby database.  Whether you have OpenSwitch perform the switch automatically, or via a manual command, is up to your BCP requirements.
    If your application connects directly to ASE then you'll have to decide how/when to get your application to switch to the standby database.  In the simplest form this would require shutting down the application, making sure replication is quiesced (ie, all in-flight transactions have been applied to the standby database), modify the interfaces/sql.ini file (used by your application) to point to the standby database, make any customized changes to the standby dataserver/database (eg, unlock application logins, take databases out of 'dbo use only' mode, etc), and startup the application (at this point it should connect to the standby database per the changes to the interfaces/sql.ini file).

  • Questions About Database Recovery (-30975)

    Hello,
    In Berkeley 4.5.20, we are seeing the following error sporadically, but more frequently than we'd like (which is, to say, not at all): "BerkeleyDbErrno=-30975 - DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery"
    This exception is being thrown mostly, if not exclusively, during the environment open call. Still investigating.
    I will post my environment below, but first some questions.
    1. How often should a database become become corrupt?
    2. What are the causes of this corruption? Can they be caused by "chance?" (I.e. app is properly coded.) Can they be caused by improper coding? If so, is there a list of common things to check?
    3. Does Oracle expect application developers to create their own recovery handlers, especially for apps that require 100% uptime? E.g. using DB_ENV->set_event_notify or filtering on DB_RUNRECOVERY.
    Our environment:
    Windows Server 2003 SP2
    Berkeley DB 4.5.20
    set_verbose(DB_VERB_WAITSFOR, 1);
    set_cachesize(0, 65536 * 1024, 1);
    set_lg_max(10000000);
    set_lk_detect(DB_LOCK_YOUNGEST);
    set_timeout(60000000, DB_SET_LOCK_TIMEOUT);
    set_timeout(60000000, DB_SET_TXN_TIMEOUT);
    set_tx_max(100000);
    set_flags(DB_TXN_NOSYNC, 1);
    set_flags(DB_LOG_AUTOREMOVE, 1);
    set_lk_max_lockers(10000);
    set_lk_max_locks(10000);
    set_lk_max_objects(10000);
    open(sPath, DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_THREAD | DB_INIT_TXN | DB_RECOVER, 0);
    set_pagesize     (4096);
    u_int32_t dbOpenFlags = DB_CREATE | DB_AUTO_COMMIT;
    pDbPrimary->open(NULL, strFile, NULL, DB_HASH, dbOpenFlags, 0);
    We also have a number of secondary databases.
    One additional piece of information that might be relevant is that the databases where this happens (we have 8 in total managed by our process,) seem to be the two specific databases that at times aren't opened until well after the process is up and running due to the nature of their data. This is to say that 6 of the other databases are normally opened during startup of our service. We are still investigating this to see if this is consistently true.

    Here is the output from the error logs (we didn't have this properly set up until now) when this error opening the environment happens:
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley MapViewOfFile: Not enough storage is available to process this command.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: Not enough space
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003: Access is denied.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley MapViewOfFile: Not enough storage is available to process this command.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: Not enough space
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley unable to join the environment
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003.del.0547204268: Access is denied.
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003: Access is denied.
    12/17/2007 17:19:18 (e64/518) 1024: Database EInitialize failed. (C:\xxxxxxxx\Database\xxxJOB_OAT: BerkeleyDbErrno=-30975 - DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery)
    The last line is generated by a DbException and was all we were seeing up until now.
    I also set_verbose(DB_VERB_RECOVERY, 1) and set_msgcall to the same log file. We get verbose messages on the 1st 7 database files that open successfully, but none from the last one, I assume because they output to set_errcall instead.
    There is 67GB of free space on this disk by the way, so not sure what "Not enough space" means.
    Thanks again for your help.

  • Problem in performing multiple Point-In-Time Database Recovery using RMAN

    Hello Experts,
    I am getting an error while performing database point in time recovery multiple times using RMAN. Details are as follows :-
    Environment:
    Oracle 11g, ASM,
    Database DiskGroups : DG_DATA (Data files), DG_ARCH(Archive logs), DG_REDO(Redo logs Control file).
    Snapshot DiskGroups :
    Snapshot1 (taken at 9 am): SNAP1_DATA, SNAP1_ARCH, +SNAP1_REDO
    Snapshot2 (taken at 10 am): SNAP2_DATA, SNAP2_ARCH, +SNAP2_REDO
    Steps performed for point in time recovery:
    1. Restore control file from snapshot 2.
         RMAN> RESTORE CONTROLFILE from '+SNAP2_REDO/orcl/CONTROLFILE/Current.256.777398261';
    2. For 2nd recovery, reset incarnation of database to snapshot 2 incarnation (Say 2).
    3. Catalog data files from snapshot 1.
    4. Catalog archive logs from snapshot 2.
    5. Perform point in time recovery till given time.
         STARTUP MOUNT;
         RUN {
              SQL "ALTER SESSION SET NLS_DATE_FORMAT = ''dd-mon-yyyy hh24:mi:ss''";
              SET UNTIL TIME "06-mar-2013 09:30:00";
              RESTORE DATABASE;
              RECOVER DATABASE;
              ALTER DATABASE OPEN RESETLOGS;
    Results:
    Recovery 1: At 10.30 am, I performed first point in time recovery till 9:30 am, it was successful. Database incarnation was raised from *2* to *3*.
    Recovery 2: At 11:10 am, I performed another point in time recovery till 9:45 am, while doing it I reset the incarnation of DB to *2*, it failed with following error :-
    Starting recover at 28-FEB-13
    using channel ORA_DISK_1
    starting media recovery
    media recovery failed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 03/06/2013 11:10:57
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
    start until time 'MAR 06 2013 09:45:00'
    ORA-00283: recovery session canceled due to errors
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: '+DG_REDO/orcl/onlinelog/group_1.257.807150859'
    ORA-17503: ksfdopn:2 Failed to open file +DG_REDO/orcl/onlinelog/group_1.257.807150859
    ORA-15012: ASM file '+DG_REDO/orcl/onlinelog/group_1.257.807150859' does not exist
    Doubts:
    1. Why did recovery failed 2nd time, but not 1st time and why is RMAN looking for online redo log group_1.257.807150859 in 2nd recovery ?
    3. I tried restoring control file from AutoBackup, in that case both 1st and 2nd recovery succeeded.
    However for this to work, I always need to keep the AutoBackup feature enabled.
    How reliable is control file AutoBackup ? Is there any alternative to using AutoBackup, can I restore control file from snapshot backup only ?
    4. If I restore control file from AutoBackup, then from what point of time/SCN does RMAN restores the control file ?
    Please help me out in this issue.
    Thanks.

    992748 wrote:
    Hello experts,
    I'm little newbie to RMAN recovery. Please help me in these doubts:
    1. If I have datafiles, archive logs & control files backup, but current online REDO logs are lost, then can I perform incomplete database recovery ?yes, if you have backups of everything else
    2. Till what maximum time/scn can incomplete database recovery be performed ??Assuming the only thing lost is the redo logs, you can recover to the last scn in the last archivelog.
    3. What is role of online REDO logs in incomplete database recovery ? They provide the final redo changes - the ones that have not been written to archivelogs
    Are they required for incomplete recovery ?It depends on how much incomplete recovery you need to do.
    Think of all of your changes as a constant stream of redo information. As a redolog fills, it is copied to archive, then (eventually) reused. over time, your redo stream is in archivelog_1, continuing into archvivelog_2, then to 3, and eventually, when you get to the last archivelog, into the online redo. A recovery will start with the oldest necessary point in the redo stream and continue forward. Whether or not you need the online redo for a PIT recovery depends on how far forward you need to recover.
    But you should take every precaution to prevent loss of online redo logs .. starting with having multiple members in each redo group ... and keeping those multiple members on physically separate disks.

  • Multiversions in Materialized View Replication Environment

    Dear friends
    In my company we have a matarialized view environment where A materialized view, in snapshot site, contains a complete or partial copy of a target master - master site.
    This environment is in Oracle 8i Enterprise Edition and now we are increasing it. We are shrinking our budget and then i'm research an solution more cheaper, i found Oracle 10G Database Standard Edition One, an solution desinged for small to medium environments. My thought is to use Oracle 10G SE1 for news snapshot sites.
    Can someone talk about the user of differents versions (8i mastersite X 10G snapshotsite) in a Materialized View Replication Environment, is it possible? must i upgrade all my environment replication for 10G or to use multiversions ?
    Thanks !!

    10g to 8i can work, assuming
    - 8i = 8.1.7
    - You are applying at least the 8.1.7.4 patchset to the master (8i) or you are applying the latest patchset to the slave (10g). Realistically, you probably want to do both.
    If you are talking about using the standard edition, I assume that you are only doing basic replication, not multi-master replication. I also assume you are aware of the limitations on hardware that come with Standard Edition 1-- I don't recall if you are limited to machines that have a capacity for 2 or 4 CPU's. Also, be aware that Oracle considers multi-core CPU's as multiple CPU's.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • DB_RUNRECOVERY: Fatal error, run database recovery

    I am getting this error when trying to add data to QUEUE. But after I restart my app, this error does not happen anymore.
    2009-08-16 10:27:12.558990 [ERR] mod_cdr_bdb.c:370 Unable to add cdr to Queue. Error=DB_RUNRECOVERY: Fatal error, run database recovery
    Does anyone know what could be the cause of the error?

    Hi,
    Do you know the steps that lead up to this error? Can you reproduce it?
    Were there any error messages sent to the error log file? Can you confirm that you have verbose error messages turned on by always initializing one of the error callback interfaces in your environment. This will provide verbose error messages:
    DB_ENV->set_errcall, DB_ENV->set_errfile, DB_ENV->set_errpfx, and DB_ENV->set_verbose.
    What flags are you using when opening the environment and the database?
    The procedure you have to follow when you receive this error is described here: [DB_RUNRECOVERY|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/program/errorret.html#DB_RUNRECOVERY]
    DB_RUNRECOVERY:
    There exists a class of errors that Berkeley DB considers fatal to an entire Berkeley DB environment. An example of this type of error is a corrupted database page. The only way to recover from these failures is to have all threads of control exit the Berkeley DB environment, run recovery of the environment, and re-enter Berkeley DB. (It is not strictly necessary that the processes exit, although that is the only way to recover system resources, such as file descriptors and memory, allocated by Berkeley DB.)
    When this type of error is encountered, the error value DB_RUNRECOVERY is returned. This error can be returned by any Berkeley DB interface. Once DB_RUNRECOVERY is returned by any interface, it will be returned from all subsequent Berkeley DB calls made by any threads of control participating in the environment.
    Applications can handle such fatal errors in one of two ways: first, by checking for DB_RUNRECOVERY as part of their normal Berkeley DB error return checking, similarly to DB_LOCK_DEADLOCK or any other error. Alternatively, applications can specify a fatal-error callback function using the DB_ENV->set_event_notify method. Applications with no cleanup processing of their own should simply exit from the callback function.Thanks,
    Bogdan Coman

  • Replication environment

    I'm trying to create replication environment with one master site and one materialized view site in my test databases on the same node. I followed step-by-step the example in the Replication Management API Reference book ( from June 2001 ). Replication environment and replication object is created successfully but replication not runing properly and dont send any error message. My ORACLE Server 9i (9.0.1.1) Enterprise Edition for Windows NT/2000/XP Pro runing on Win2000 Advanced server.
    Thanks.
    Attila Fintor

    Have you set the system variable job_queue_processes to be higher than 0
    e.g. alter system set job_queue_processes = 2;
    I had this problem and searched for a while till i found the reason.
    If this is not set correctly, manual refresh will work but no automatic
    refresh may run since no backgraound processes are allowed!

  • Replication environment data inconsistency...

    Gurus,
    I have multi master replication environment there is one schema SGI on two databases LLU and BER data in LLU is correct and data in BER is incorrect.
    I need to drop SGI schema in BER and import export dump from LLU, but I don't want to break replication environment and rebuild it.
    I have checked DBMS_RECTIFIER_DIFF given in metalink but somehow could not find concrete example that would help me use it correctly.
    Does anyone have any idea about it? Or any other suggestion on how can I achieve my desired goal?
    Please advice.

    Gurus,
    I have multi master replication environment there is
    one schema SGI on two databases LLU and BER data in
    LLU is correct and data in BER is incorrect.
    I need to drop SGI schema in BER and import export
    dump from LLU, but I don't want to break replication
    environment and rebuild it.
    If you drop the schema you will destroy your replication environment anyway. In that case you have more work to do in order to cleanup the replication environment at your other master site.
    I don't think you want to do that!
    My personal opinion is that you should just remove from the replication environment the master replication objects that belong to the schema you want to refresh. Refresh the data (using import utility) and then create the replication objects again.
    I don't say it is easy, but I think it is the right way to go. Don't be lazy. Follow the rules written in the docs and you should be fine.
    The high level picture of the steps you have to do is:
    - Make sure there are no deferred transactions waiting to be applied. If there are, deal with them first.
    - From your master definition site suspend the replication activity (using dbms_repcat.suspend_master_activity)
    - From your master definition site, remove the master rep objects you want to refresh. (using dbms_repcat.drop_master_repobject)
    - Import the data in SGI BER
    - From your master definition site, create the master rep objects again using (DBMS_REPCAT.CREATE_MASTER_REPOBJECT and make sure you use copy_rows => FALSE and use_existing_object => TRUE)
    - Resume the master activity (using dbms_repcat.resume_master_activity)
    and that is it.
    And again, make sure you don't have deferred transactions before you start this.
    Read the docs until you fully understand what you have to do.
    In order to feel more comfortable, I would suggest you to test this approach first.
    I hope my advice will help you to find the right approach.
    P.S. Hermant's suggestion is also worth considering (the link he provided). The approach that I mentioned may require more work from your side, but it also gives you more control and flexibility so you would know what is going on in every moment.
    Message was edited by:
    tekicora

  • Using Oracle Database Express Edition in development environment

    Hi All,
    I have doubt regarding the usage Oracle Database Express Edition in Development environment. I am not sure weather I can ask a non technical question here or not. Pleas forgive me if I have done any thing wrong.
    I am working in an IT company where we take up projects outsourced by our clients. As part of our current project we are making some modification to a web application used by an institution. Our client is using Oracle Data Base standard edition. Due to budgetary constraints of our Company we can not set up a Oracle standard edition data base in our development environment.
    So would it be illegal if we use  Oracle Database Express Edition in our development environment?  We can guarantee that  only our internal development team which comprise a maximum of 10 people will have access to this development database and this development data base will never be opened to our Client for their business purpose(Who have their own Oracle standard edition in their environment). As part of the project we delver only table DDL script and stored procedure to our client and they put it in their environment.The sole purpose of a internal Express database will be development only.
    Could some one please tell me if it would be violation of license agreement if we install Oracle Database Express Edition in our development environment.

    Hi Paul,
    Actually I have already gone through the Oracle Technology Network Developer License Terms for Oracle Database 11g Express Edition . But was not quiet clear about the content. It says in the license terms that "We grant you a nonexclusive, nontransferable limited license to use the programs for: (a) purposes of developing, prototyping and running your applications for your own internal data processing operations". Does the term "your application" includes an application we are developing for another company. Since the Express database  is installed in the development environment only and is not opened to any one else not even for Our client it definitely falls under the term "internal data processing operations" right?

  • Error: 'Database handles still open at environment close'

    Hello,
    I have read information about this error, but I cannot solve it.
    I think I have closed all objects that I use, but the error appears.
    When I remove next code, the error doesn't appear:
    while (xmlValue != null) {
    XmlDocument theDoc = xmlValue.asDocument();
    String docName = theDoc.getName();
    String docString = xmlValue.asString();
    String message = "Document ";
    message += theDoc.getName() + ":\n";
    message += xmlValue.asString();
    message += "===============================\n";
    System.out.println(message);
    xmlValue = results.next();
    theDoc.delete();
    The error:
    Database handles still open at environment close
    Open database handle: myContainer.dbxml/secondary_document_statistics_string
    Open database handle: myContainer.dbxml/secondary_document_index_string
    Open database handle: myContainer.dbxml/node_nodestorage
    Open database handle: myContainer.dbxml/secondary_document
    Open database handle: myContainer.dbxml/secondary_dictionary
    Open database handle: myContainer.dbxml/primary_dictionary
    Open database handle: myContainer.dbxml/secondary_sequence
    Open database handle: myContainer.dbxml/secondary_configuration
    Exception in thread "main" java.lang.IllegalArgumentException: Invalid argument
    at com.sleepycat.db.internal.db_javaJNI.DbEnv_close0(Native Method)
    at com.sleepycat.db.internal.DbEnv.close0(DbEnv.java:217)
    at com.sleepycat.db.internal.DbEnv.close(DbEnv.java:77)
    at com.sleepycat.db.Environment.close(Environment.java:39)
    at berkeleydbxml.Test1.main(Test1.java:137)
    Java Result: 1
    The code:
    public static void main(String[] args) {
    Environment myEnv = null;
    File envHome = new File("C:/extranet/tecnologias/BerkeleyDBXML/Java/BerkeleyDBXML/dbxml");
    XmlManager myManager = null;
    XmlContainer myContainer = null;
    XmlQueryContext context = null;
    try {
    EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exits, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    myEnv = new Environment(envHome, envConf);
    XmlManagerConfig managerConfig = new XmlManagerConfig();
    myManager = new XmlManager(myEnv, managerConfig);
    XmlContainerConfig containerConf = new XmlContainerConfig();
    containerConf.setTransactional(true);
    containerConf.setAllowCreate(true);
    String containerName = "myContainer.dbxml";
    myContainer = myManager.openContainer(containerName, containerConf);
    // Get a query context
    context = myManager.createQueryContext();
    // Declares namespaces
    // Default namespace
    context.setNamespace("", "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2");
    context.setNamespace("cac", "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2");
    context.setNamespace("cbc", "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2");
    context.setNamespace("ccts", "urn:un:unece:uncefact:documentation:2");
    context.setNamespace("ext", "urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2");
    context.setNamespace("qdt", "urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2");
    context.setNamespace("udt", "urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2");
    // Declare the query string
    String myQuery =
    "collection('myContainer.dbxml')/Invoice";
    // Prepare (compile) the query
    XmlQueryExpression qe = myManager.prepare(myQuery, context);
    // Run the query. Note that you can perform this query many times
    // without suffering the overhead of re-creating the query expression.
    // Notice that the only thing we are changing is the variable value,
    // which allows us to control exactly what gets returned for the
    // query.
    XmlResults results = qe.execute(context);
    // Display the result set
    XmlValue xmlValue = results.next();
    while (xmlValue != null) {
    XmlDocument theDoc = xmlValue.asDocument();
    String docName = theDoc.getName();
    String docString = xmlValue.asString();
    String message = "Document ";
    message += theDoc.getName() + ":\n";
    message += xmlValue.asString();
    message += "===============================\n";
    System.out.println(message);
    xmlValue = results.next();
    theDoc.delete();
    xmlValue.delete(); <-- the error happens here
    qe.delete();
    results.delete();
    } catch (DatabaseException de) {
    // Exception handling goes here
    int i = 1;
    } catch (FileNotFoundException fnfe) {
    // Exception handling goes here
    int i=1;
    } catch (Exception e) {
    // Exception handling goes here
    int i = 2;
    } finally {
    try {
    if (myContainer != null) {
    myContainer.close();
    if (myManager != null) {
    myManager.close();
    if (myEnv != null) {
    myEnv.close();
    } catch (DatabaseException de) {
    // Exception handling goes here
    If I remove the xmlValue.delete() sentence, the error appears in myEnv.close().
    I use berkeley 2.3.10 version, Windows XP.
    Thanks.

    I am having a similar problem. My method:
    protected void searchQuestions(String keyword) throws LibraryException {
    XmlQueryContext xqc = null;
    XmlResults xr = null;
    XmlQueryExpression xqe = null;
    String[] qids = null;
    String query = "collection()/*[contains(question, '" + keyword + "')]";
    try {
    conQuestions = man.openContainer(QUESTION_CONTAINER);
    xqc = man.createQueryContext();
    xqc.setDefaultCollection(QUESTION_CONTAINER);
    xqe = man.prepare(query, xqc);
    xr = xqe.execute(xqc);
    conQuestions.delete();
    xqc.delete();
    xqe.delete();
    XmlValue val = xr.next();
    while (val != null) {
    String name = val.asDocument().getName();
    System.out.println(name);
    val = xr.next();
    val.delete(); <-- PROBLEM HERE
    xr.delete();
    } catch (XmlException xe) {
    throw new LibraryException("Unable to search for questions. " + xe.getMessage());
    If I leave the val.delete() line then I get a java.lang.NullPointerException but if I remove it then I get an error stating 'Database handles still open at environment close'. I run a clean up method after the previous method as follows:
    protected void close() {
    if(conQuizes != null)
    conQuizes.delete();
    if(conQuestions != null)
    conQuestions.delete();
    if(conUsers != null)
    conUsers.delete();
    if(man != null)
    man.delete();
    I have many other methods that interact with containers perfectly but this is the only one where I use the XmlValue class. I tried the solution that worked for brais.mendez with no luck. Any advise or ideas would be much appreciated.
    Thanks,
    Matt

  • "Fatal error, run database recovery " when there are no txns to recover.

    Hi, all.
    I have a DB file containing multiple databases. Without using DBEnvironments, I can open it to get the dbnames. I can open the databases RDONLY,
    and see that their contents are correct. I can open them RW, and everything works.
    But when I try to create a new one, I get this:
    D = bsddb3.db.DB()
    D.open('test.db',dbname='test',dbtype=B.DB_BTREE,flags=B.DB_CREATE)Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    bsddb3.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery')
    Note that this is in the non-transactional case. There is no Env, and there are no logfiles or __db files. So the error code mystifies me.
    Strace shows that the file is opened RW, and read through.
    B.DB_VERSION_STRING'Berkeley DB 4.8.24: (August 14, 2009)'
    >>>
    So, where to proceed? Many thanks for any and all help.

    Hmm. Other thing to note:
    [tradedesk@vader 2010-05-06.test]$ /usr/local/BerkeleyDB.4.8/bin/db_verify foo.db
    db_verify: Subdatabase entry references page 266 of invalid type 13
    db_verify: Page 0: non-invalid page 40 on free list
    db_verify: trading.db: DB_VERIFY_BAD: Database verification failed
    Not sure how that came about or how to prevent it, but it might have to do wit this issue.

  • Failure during database recovery on Homogeneous System Copy

    Dear all,
    i am trying to do system copy, and it fails after the execution step:  database recovery
    MaxDB: 7.6.5.15
    SAP Netweaver 7 Ehp 1
    apparantly this is something to do with LOAD_SYSTAB.
    I could run load_systab [-u <sysdba_user>,<sysdba_user_password>] manually, but the Log file of SAPinst shows the following:
    WARNING[E] 2009-09-28 17:17:57.328
               CJSlibModule::writeError_impl()
    The dbmcli call for action LOAD_SYSTAB failed. SOLUTION: Check the logfile XCMDOUT.LOG.
    TRACE      2009-09-28 17:17:57.546 [iaxxejsbas.hpp:408]
               handleException<ESAPinstJSError>()
    Converting exception into JS Exception EJSException.
    TRACE      2009-09-28 17:17:57.562
    Function setMessageIdOfExceptionMessage: dbmodada.actorext.dbmcliCallFailed
    WARNING[E] 2009-09-28 17:17:57.562
               CJSlibModule::writeError_impl()
    The dbmcli call for action LOAD_SYSTAB failed. SOLUTION: Check the logfile XCMDOUT.LOG.
    TRACE      2009-09-28 17:17:57.562 [iaxxejsbas.hpp:483]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2009-09-28 17:17:57.781 [sixxcstepexecute.cpp:950]
    FCO-00011  The step sdb_instance_load_systables with step key |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_ADA_DB|ind|ind|ind|ind|6|0|SdbPreInstanceDialogs|ind|ind|ind|ind|4|0|SdbInstanceDialogs|ind|ind|ind|ind|1|0|SDB_INSTANCE_CREATE|ind|ind|ind|ind|0|0|sdb_instance_load_systables was executed with status ERROR .
    TRACE      2009-09-28 17:17:58.93 [iaxxgenimp.cpp:752]
                CGuiEngineImp::showMessageBox
    <html> <head> </head> <body> <p> An error occurred while processing option SAP NetWeaver 7.0 including Enhancement Package 1 Support Release 1 > Software Life-Cycle Options > System Copy > MaxDB > Target System Installation > Central System > Based on AS ABAP > Central System. You can now: </p> <ul> <li> Choose <i>Retry</i> to repeat the current step. </li> <li> Choose <i>View Log</i> to get more information about the error. </li> <li> Stop the option and continue with it later. </li> </ul> <p> Log files are written to C:\Program Files/sapinst_instdir/NW701/LM/COPY/ADA/SYSTEM/CENTRAL/AS-ABAP/. </p> </body></html>
    TRACE      2009-09-28 17:17:58.109 [iaxxgenimp.cpp:1255]
               CGuiEngineImp::acceptAnswerForBlockingRequest
    Waiting for an answer from GUI
    XCMDOUT.LOG shows only the SAP users data from the source system, and not for the target system which is having the error.
    Could somebody please advise me what to do?
    Thank you,
    Mariana

    Dear Christian,
    yes, I solved this LOAD_SYSTAB problem.
    This is what I did:
    1. check XCMDOUT.LOG
    2. However in my case, I did not see any clue there, so I read this link about LOAD_SYSTAB http://maxdb.sap.com/doc/7_7/45/11cbd6459d7201e10000000a155369/content.htm
    I tried it manually, and it worked: dbmcli u2013d <DB_ID> u2013u DBMUser,password1 load_systab u2013u superdba,password2
    From there, I know that I entered the wrong SYSADM User (superdba) password, this password was in my case the same one a SAPinst Master Password.
    According to https://websmp130.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=25591
    a new installation of MaxDB database, by default, the credential for SYSADM is: "superdba,admin"
    So, accordingly, the solution is:
    change the SYSADM for the <DB_ID> in DBMGUI: D7D - Configuration - Database User area, exactly as the SAPinst Master Passwort.
    Hope this helps.
    Regards,
    Mariana

  • Database recovery (online redolog ?)

    hi all,
    Been awhile since i touch on oracle db, i have been reading around and the emphasis for recovery is always on the backup and archivelog, but i think its wrong.
    can i check ->
    q1) for full database recovery, do i need the online redo log as well ?
    q2) if the answer to q1) is yes, how do i duplicate online redo log to standby site ? (i don't think rsync will work as it cannot sure consistency in the redolog)
    will oracle dataguard sync online redolog as well ?
    q3) for archivelog, beside manual rsyncing, LOG_ARCHIVE_DEST_2 = 'SERVICE=standby1'
    do i need the enterprise edition for the above ?
    Regards,
    Alan

    q1) For a complete recovery, yes you need online redolog as well. Without online redolog,its still considered incomplete recovery since u lose data resides in online redolog
    q2) You no need to synch online redo log manually. Once the backup is restored to the DR dataguard site and MRP process initiated, Oracle will synch online redolog/archivelog automatically based on protection mode specified
    q3) Oracle dataguard applies to Enterprise Edition only. Without Enterprise Edition, we can configure log shipping (manual way).
    Regards,
    Ilan

  • Object Level Recovery or Whole Database recovery

    I'm hoping someone may know how to advise me on the following;
    On a datawarehouse db (10.2.0.1.0) a team member removed records from three tables, and I have since attempted flashback recovery without success. The database is in Archivelog mode, with Flashback enabled, but no Flashback logging enabled. The rows were removed on Friday afternoon (it is now Monday). I attempted to get flashback logging enabled by tagging the "Enable Flashback Database" tag in the Flash Recovery region of Recovery settings, and restarting the database. The database when restarted went into mount state, and subsequently on restarting (from mount - I did not dismount the db), it still has Flashback logging disabled. I attempted flashback again but the team member states the record stil arn't there. EM however had given the message 'The select tables...X X....have been flashed back'. However I can see also that Em says flashback logging is still disabled.
    I now consider I might be better off to perform a 'Whole Database Recovery', as I simply want to get the tables recovered. I'm not sure if this will mean re-keying though. Can anyone advise? Thanks in advance. DW
    Message was edited by:
    David_W

    The first step you should try is flashback query. Because using flashback query your database will remain intact, you don't lose anything from your database. Of course most likely it's too late for you now. Just for future reference.
    Flashback database is only available after you configured Flash Recovery Area and turn it on. Sound like it's does apply here as well. Remember even you could successful flashback your database to the point before deletion, you will lost all data changes after that point. Flashback database only buy you sometime, because you don't need to restore datafile from backup.
    The third option would be restore from your last backup, ( the latest one before deletion happen) and do incomplete restore to the point in time right before the incident.

Maybe you are looking for