oracle断电后重启出现的问题已经解决方法
一、ORA-00132
问题描述 :syntax error or unresolved network name ''
第1步:复制一份pfile参数文件(注意:oracle中的pfile指的就是init.ora文件)
$sqlplus '/as sysdba';
SQL> create pfile from spfile='/u01/oracle/product/10.2.0/db_1/dbs/spfileorcl.ora';
第2步:修改pfile参数文件(修改init.ora文件)
经过第一步以后,你就会在$ORACLE_HOME/dbs目录下发现有这么一个文件init.ora,这就是你第一步创建的文件。
找到local_listener这一行,然后将其值修改为:
(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=your_hostname)(Port=1521)))
其中的your_hostname为你的主机名,其实导致ORA-00119和ORA-00132错误的原因就很可能是你修改了你的hostname
第3步:以pfile创建spfile
使用以下命令创建spfile
SQL> create spfile from pfile='/u01/oracle/product/10.2.0/db_1/dbs/initorcl.ora';
第4步:启动数据库
SQL> startup;
二、ORA-00214
问题描述 :ORA-00214: control file '' version ** inconsistent with file '' version **
每个描述不一样,这里是我的解决过程:
SQL> startup
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 1220432 bytes
Variable Size 503316656 bytes
Database Buffers 1627389952 bytes
Redo Buffers 15556608 bytes
ORA-00214: control file '/usr/oracle/oradata/beyond/control02.ctl' version 3172
inconsistent with file '/usr/oracle/oradata/beyond/control01.ctl' version 3169
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> host cp /usr/oracle/oradata/beyond/control03.ctl /usr/oracle/oradata/beyond/control01.ctl
SQL> host cp /usr/oracle/oradata/beyond/control03.ctl /usr/oracle/oradata/beyond/control02.ctl
SQL> s