Oracle数据库偶尔需要手动重启

发布于 2024-09-02 17:03:41 字数 357 浏览 5 评论 0原文

首先我要说的是我对 Oracle 的了解很少。

我们有一个专有的应用程序,可以将数据存储到 Oracle 9.2 数据库中,效果非常好。我大约每 3 个月才使用一次该软件,因此也使用一次 Oracle。问题是,似乎由于不活动,我必须使用以下命令启动数据库/实例:

conn sys as sysdba
<enter password>
startup

如果我只离开服务器几周,我就不必这样做。我只是好奇这笔交易是什么?这其实没什么大不了的,但我可以解决这个问题吗?或者我想解决它吗?也许这是一个安全问题?如果是这样的话,这个不活动设置在哪里?

我最感兴趣的是理解,所以信息越多越好。谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅暮の光 2024-09-09 17:03:41

甲骨文不会因为不活动而关闭自己。您确定机器尚未重新启动并且操作系统没有在重新启动时启动 Oracle 吗?

您可以检查 Oracle 警报日志以获取有关数据库关闭原因和时间的详细信息。在 9i 中,我相信默认值是:

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

当您在日志中看到 Oracle 关闭时,您可以记下时间,然后查看系统日志(Linux:/var/log/messages)以查看它是否对应于系统关闭。

希望这可以帮助您找到问题所在。

根据反馈进行编辑:

有趣的是,您说服务器自 2007 年以来已重新启动,并且 Oracle 服务器关闭的警报日志中没有任何内容。这对我来说表明您要么查看了错误/旧的日志文件,要么 Oracle 没有在操作系统关闭时完全关闭。

几个问题:

  • 您确定启动计算机时 Oracle 数据库处于打开状态吗?
    • 如果您以 sysdba 身份登录 sqlplus,您将收到“已连接到空闲实例”
      如果数据库未打开。
  • 打开数据库时是否看到数据库文件恢复?

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?
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文