昨天我在笔记本电脑上安装了Oracle 12c企业版。当我尝试通过SQLPLUS连接到数据库时,我得到了以下错误
C:\Users\USER>sqlplus
SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 28 14:12:46 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: userdb
Enter password:
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0
我尝试了互联网上提到的所有技巧,但无法摆脱这个错误。
我也尝试过以下
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 1543503872 bytes
Fixed Size 3045984 bytes
Variable Size 989857184 bytes
Database Buffers 536870912 bytes
Redo Buffers 13729792 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10:
'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'
也在下面试过,但仍然出现错误
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1543503872 bytes
Fixed Size 3045984 bytes
Variable Size 989857184 bytes
Database Buffers 536870912 bytes
Redo Buffers 13729792 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10:
'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 10:
'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10:
'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'
有人可以帮忙吗?谢谢!
答案 0 :(得分:13)
我遇到了同样的问题,只想与您分享我的解决方案,如果有其他人获得 ORA-01033:ORACLE初始化或正在关机 Oracle 12c数据库出错。每次我尝试连接到示例模式的用户时,我的数据库都会向我显示错误(例如,小时)。
以下对我有用:
SQLPlus> connect sys as sysdba
SQLPlus> alter pluggable database all open;
答案 1 :(得分:-1)
我有同样的错误,我解决了。 实际上,您遇到的问题是由于一个或几个数据文件的目标发生了变化。 在你的情况下是数据文件10.实际上错误是:
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 10:
**strong text**'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'**strong text**
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10:
'C:\ORACLEDB12C\APP\USERNAME\ORADATA\ORCL\PDBORCL\EXAMPLE01.DBF'
解决方案是在您的硬盘驱动器中搜索此数据文件,并将其放在oracle使用的同一目录中({1}}
请注意,您应该为已更改其目录的所有数据文件执行此操作。我希望这会有所帮助。