2 Replies Latest reply: Jan 15, 2011 11:45 PM by 757079 RSS

    Wait in Replica after creating db in Master (C#)


      There is some time needed to wait to open db at Replica after creating db file on Master site.
      In my case in Replica site, db_env could be opened, but "No such file or directory" error occurred when opening db. So, I applied Line444-459 in \csharp\excs_repquote\RepQuoteExample.cs (sample code) into my application. So, it seems ok now.
      Just want to confirm if it (Line444-459) is the best way to open db in Replica. Or any other way.

      By the way, this error was not observed with C++, but happens with C#.

      Ver.5.1.19 (HA)
      VisualStudio.Net 2010

        • 1. Re: Wait in Replica after creating db in Master (C#)
          Paula B-Oracle
          Two things that are important to understand about opening a replica database:

          1. You cannot create the replica database when you open it because replication will create it for you.

          2. You need to poll or wait until the database has been replicated from the master to the replica before the database open can succeed.

          Certainly the code you added from RepQuoteExample.cs is a valid way to do these things, so I'm glad it works with your application.

          I'm not sure why you were seeing this problem on C# but not C++. I'm not very familiar with C# and we would probably need to know more about your application to figure it out.

          Paula Bingham
          • 2. Re: Wait in Replica after creating db in Master (C#)
            Thank you very much for useful information.

            Regards, Osamu