开发者

Oracle DB won't allow users to query tables

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 archive开发者_StackOverflowd, 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.


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;


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜