Oracle XE 11g (windows 8) 我无法连接到数据库(空闲实例)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24614333/
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-19 02:24:39  来源:igfitidea点击:

Oracle XE 11g (windows 8) I can't connect to the Database (idle instance)

oracleoracle11g

提问by user3506652

Hi I have problem with idle instance

嗨,我有空闲实例的问题

When I trying:

当我尝试:

sqlplus / as sysdba

I get result: Connected to an idle instance.

我得到结果: Connected to an idle instance.

And when I try startup I get:

当我尝试启动时,我得到:

ORA-01078: failure in processing system parameters
ORA-01565 error in identifying file 'C:\oraclexe\app\oracle\product.2.0\server\dbs/spfileXE.ora
ORA-27041: unable to open file
ORA-04002: unable to open file
O/S-Error: (OS 2) File not found;

My system is Windows 8. Do you any idea how to solve it?

我的系统是Windows 8。你知道如何解决吗?

SOLUTION: I have to startup using command:

解决方案:我必须使用命令启动:

startup pfile='<path to file>/init.ora'

and change all paths in init.ora where was

并更改 init.ora 中的所有路径

<ORACLE_BASE>

Thx for help

谢谢你的帮助

回答by vinser

I've got that pain too.

我也有那种痛。

To install Oracle XE you should login as local admin - NOT domain account. This https://community.oracle.com/thread/2361291made me happy :)

要安装 Oracle XE,您应该以本地管理员身份登录 - 而不是域帐户。这个https://community.oracle.com/thread/2361291让我很开心 :)

回答by ik_zelf

I highly recommend reading the Oracle? Database 2 Day DBAmanual, or hire a dba.

我强烈推荐阅读Oracle?数据库 2 天 DBA手册,或聘请 dba。

You are missing the init{ORACLE_SID}.ora, the parameter file which contains things like database name, controlfile locations. the init{ORACLE_SID}.ora is a text file that is edited with a regular text editor. This file can be converted to a spfile{ORACLE_SID}.ora that can be edited using a database instance. This is also a dynamic parameter file meaning that when you change parameters in an instance, the parameters can also be recorded in the spfile for later reuse.

您缺少 init{ORACLE_SID}.ora,该参数文件包含数据库名称、控制文件位置等内容。init{ORACLE_SID}.ora 是一个用普通文本编辑器编辑的文本文件。该文件可以转换为可以使用数据库实例进行编辑的 spfile{ORACLE_SID}.ora。这也是一个动态参数文件,意味着当你在一个实例中改变参数时,参数也可以记录在 spfile 中以备后用。

For now add the db_name and control_files. Make sure that the contol_files parameter points to an existing controlfile[s]. If there are no existing control_file[s], just trash the initXE.ora, spfileXE.ora and start dbca, the Database Configuration Assistant and using that create a new database.

现在添加 db_name 和 control_files。确保 contol_files 参数指向现有的控制文件 [s]。如果没有现有的 control_file[s],只需删除 initXE.ora、spfileXE.ora 并启动 dbca、数据库配置助手并使用它创建一个新数据库。

回答by nightfox79

I just had the same problem. You just have to start the setup to install the database as administrator. After this and a reboot everything works fine.

我只是遇到了同样的问题。您只需要开始设置即可以管理员身份安装数据库。在此之后并重新启动一切正常。