views:

37

answers:

1

Let me begin by saying my Oracle knowledge is minimal.

We have a proprietary application that stores data into a Oracle 9.2 database, which works great. I only work with this software and thus Oracle every 3 months or so. The problem is, and it seems due to inactivity, I'll have to startup the database/instance using the following commands:

conn sys as sysdba
<enter password>
startup

If I'm only away from using the server for a couple of weeks, I don't have to do this. I was just curious what the deal was? It's not really that big a deal, but is it something I can fix, or do I even want to fix it? Perhaps it's a security thing? Where is this inactivity setting, if that's what it is?

I'm mostly interested in understanding, so the more information, the better. Thanks!

+5  A: 

Oracle would not shut itself down due to inactivity. Are you sure the machine hasn't been rebooted and you don't have the OS starting Oracle on reboot?

You can check the Oracle alert log for details on why and when the database shutdown. In 9i I believe the default is in:

/u01/app/oracle/admin/<sid>/bdump/alert_<sid>.log

When you see Oracle shutting down in the log, you can note the time and then look in the system log (Linux: /var/log/messages) to see if it corresponds to a system shutdown.

Hope this helps you track down the issue.

Edit based on feedback:

It's interesting that you say the server has been rebooted since 2007 and there is nothing in the alert log of the Oracle server shutting down. That indicates to me you're either looking at the wrong/old log file or that Oracle isn't shutting down cleanly on an OS shutdown.

Couple of questions:

  • Are you certain that the Oracle database is open when you startup the machine?
    • If you login to sqlplus '/ as sysdba', you'll get a "Connected to an idle instance"
      if the db isn't open.
  • Are you seeing db file recovery when opening the database?
RC
Pretty much everything I was writing :)
Dave Costa
Thanks for the reply, good to know it's not inactivity. The alert_.log doesn't really match the shutdown of the server. The phrase **Shutting down instance** shows up back in 2007, but nothing recently (and I assure you the server has been rebooted since then). I'm thinking the problem must be when our IT group installs Windows patches on the server. The instance is set to startup automatically as a service, but maybe it's only doing half the job -- my commands are doing the other half. Server is Win2k3. Thanks for the help!
scolja
If you connect as a DBA in SQL*Plus do a "show parameter background_dump_dest"Check the alert log in that directory.
Gary