SQL ORA-01219: 数据库未打开:只允许对固定表/视图进行查询

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22940636/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 01:35:36  来源:igfitidea点击:

ORA-01219: database not open: queries allowed on fixed tables/views only

databasesqloracledatabase-administration

提问by Devoloper250

I Am using oracle 11g and SQL developer tool. When i tried to retrieve rows from db i am getting error message as :-

我正在使用 oracle 11g 和 SQL 开发人员工具。当我尝试从数据库检索行时,我收到错误消息:-

ORA-01219: database not open: queries allowed on fixed tables/views only)

I looked for sgadef.dbf file and it was missing in home directory.. Can someone help me to make it working.

我查找了 sgadef.dbf 文件,但它在主目录中丢失了。有人可以帮助我使其正常工作。

回答by Dmitry Nikiforov

First of all check the status of the instance you work with (this may need to connect under administrator account):

首先检查您使用的实例的状态(这可能需要在管理员帐户下连接):

select status from v$instance;

Probably you will get

可能你会得到

STATUS
------------
MOUNTED

Under sys account try to complete

sys账号下尝试完成

ALTER DATABASE OPEN;

and check that it's completed successfuly. If not - please share the result of output and alert log in your question.

并检查它是否成功完成。如果没有 - 请在您的问题中分享输出和警报日志的结果。

回答by nalpara

just in case if someone comes to here for this question

以防万一有人来这里问这个问题

RECOVER DATABASE; and then ALTER DATABASE OPEN;

恢复数据库;然后更改数据库打开;

fixed my issue.

修复了我的问题。

回答by S. Rahul

SQL>

查询>

ALTER DATABASE OPEN;
ALTER DATABASE OPEN *

ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'C:\APP\ADMINISTRATOR\ORADATA\WIND\SYSTEM01.DBF'