Oracle DB 不允许用户查询表

发布于 2024-10-05 18:02:06 字数 1126 浏览 1 评论 0原文

我在 Windows XP 上运行 Oracle 10G XE 版本。 运行碎片整理后清理过程中,我无法访问数据库上的任何对象。

快速检查

set lines110
col strtd hea 'STARTED' 
col instance_name for a8 hea 'INSTANCE'
col host_name for a15 hea 'HOSTNAME' 
col version for a10 



select instance_name, version, host_name, status
, database_status, to_char(startup_time,'DD-MON-YYYY HH:MI:SS') strtd 
from v$instance;

返回此

INSTANCE VERSION    HOSTNAME        STATUS       DATABASE_STATUS   STARTED
-------- ---------- --------------- ------------ ----------------- ----------------------------------------------------
xe       10.2.0.1.0 DT8775C    MOUNTED      ACTIVE            03-DEC-2010 11:38:00


If I use this command, it throws the following error.
SQL> ALTER DATABASE OPEN;
ALTER DATABASE OPEN
*
*ERROR at line 1:*
ORA-16014: log 2 sequence# 679 not archived, no available destinations
ORA-00312: online log 2 thread 1:
'D:\ORACLEEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_2_4JD5RZC0_.LOG'

我该如何解决这种情况? 目录下有零个文件 “D:\ORACLEEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\”文件夹。

I am on Windows XP running Oracle 10G XE Edition.
After running a defrag & cleanup process, I have not been able to access any of the objects on the database.

A quick check

set lines110
col strtd hea 'STARTED' 
col instance_name for a8 hea 'INSTANCE'
col host_name for a15 hea 'HOSTNAME' 
col version for a10 



select instance_name, version, host_name, status
, database_status, to_char(startup_time,'DD-MON-YYYY HH:MI:SS') strtd 
from v$instance;

returns this

INSTANCE VERSION    HOSTNAME        STATUS       DATABASE_STATUS   STARTED
-------- ---------- --------------- ------------ ----------------- ----------------------------------------------------
xe       10.2.0.1.0 DT8775C    MOUNTED      ACTIVE            03-DEC-2010 11:38:00


If I use this command, it throws the following error.
SQL> ALTER DATABASE OPEN;
ALTER DATABASE OPEN
*
*ERROR at line 1:*
ORA-16014: log 2 sequence# 679 not archived, no available destinations
ORA-00312: online log 2 thread 1:
'D:\ORACLEEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_2_4JD5RZC0_.LOG'

How can I fix this situation?
There are zero files in the
"D:\ORACLEEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\" folder.

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

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

发布评论

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

评论(2

无畏 2024-10-12 18:02:06

我很确定这属于 SERVERFAULT,但现在让您继续:

数据库似乎处于 ARCHIVELOG 模式,并且您没有提供存储存档日志文件的位置。假设您不需要归档日志记录为您提供的恢复保护,一个快速修复方法是尝试以下操作:

sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> ALTER DATABASE NOARCHIVELOG;
SQL> ALTER DATABASE OPEN;

如果您确实想要保留归档重做日志,那么您将需要在数据库参数中添加如下条目:

alter system set log_archive_dest_1='location=d:\oraclexe\app\oracle\...';
alter system set log_archive_dest_state_1=enable;

I'm pretty sure this belongs on SERVERFAULT, but to get you going for now:

It appears the database is in ARCHIVELOG mode and you have not supplied a location to store the archived log files. A quick fix, assuming you don't need the recovery protection that archive logging gives you is to try this:

sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> ALTER DATABASE NOARCHIVELOG;
SQL> ALTER DATABASE OPEN;

If you do want to keep your archived redo logs, then you'll need entries like this in your database parameters:

alter system set log_archive_dest_1='location=d:\oraclexe\app\oracle\...';
alter system set log_archive_dest_state_1=enable;
挽清梦 2024-10-12 18:02:06

听起来好像在清理过程中您可能已经删除了 .LOG 文件。我猜你已经清空了垃圾箱并且无法恢复它们?

Sounds like in your cleanup process you may have deleted the .LOG files. I assume you've emptied the trash and can't restore them?

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