logo       


RE: HSQL's handling of accidental machine shutdown: msg#00036

Subject: RE: HSQL's handling of accidental machine shutdown
I don't know if anyone will find this useful or not but this is the code that we put in place
in our database administrator application that registers a shutdown hook for the database...
 
 
 
    // add a shutdown hook thread that attempts to stop the server correctly even
    // if the computer is shut down without stopping the server first
    Thread shutdown = new Thread(new Runnable() {
        public void run() {
          try {
            // Connect to the database and issue SHUTDOWN
            Connection con = DriverManager.getConnection(url, user, password);
            Statement st = con.createStatement();
            st.executeUpdate("SHUTDOWN");
          }
          catch (Exception ex) {
            // System.out.println(ex);
            // ex.printStackTrace();
          }
        }
      }
    );
    Runtime.getRuntime().addShutdownHook(shutdown);
 
 
 
 
I'm not positive that it actually always works correctly but I guess it can't hurt.
 
 
...
Krick
 
-----Original Message-----
From: hsqldb-user-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:hsqldb-user-admin@xxxxxxxxxxxxxxxxxxxxx]On Behalf Of fredt
Sent: Tuesday, January 13, 2004 10:09 AM
To: hsqldb-user@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Hsqldb-user] HSQL's handling of accidental machine shutdown

This is discussed in hsqlRecovery.html in the /doc folder of the distribution. Recovery should happen automatically.
 
There may be a bug though, so could you please state if there had been a proper shutdown or a checkpoint since the tables were created and filled.
 
In general, checkpointing reduces the amount of work to be done in recovery and ensures a larger percentage of data is safely stored in closed files that would not normally get corrupted due to abnormal termination.
 
Also, for linux servers you can use the scripts provided for startup and shutdown and add them to the rc.d list to ensure a normal shutdown.
 
Fred
----- Original Message -----
Sent: 13 January 2004 14:23
Subject: [Hsqldb-user] HSQL's handling of accidental machine shutdown

Hi, 
    We recently had a machine running Linux 8.0 OS, with HSQL 1.7.2 installed, rebooted while the DB was still running. We were unable to access the existing cached tables via database manager on bringing up the DB.

   We would be delighted if our following doubts could be answered,

    a. Is it imperative to bring down HSQL DB gracefully prior to machine reboots ?
    b. How does HSQL DB handle catastrophic failures, so that the existing database is not adversely affected ?

Thanks for your help,

Ambarish








Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe