`
thinkact
  • 浏览: 82296 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

错误oracle-56 error 376解决办法

阅读更多
EXP-00056: 遇到 ORACLE 错误 376
ORA-00376: 此时无法读取文件 3
ORA-01110: 数据文件 3: 'C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF'
Exported 23,000 rows
EXP-00000: 导出终止失败


Hi,

Following is a checklist to solve your problems. Best of Luck.

Cheers..rCube

An ORA-376 occurs when Oracle knows a datafile, but Oracle cannot read it. Most likely the file is offline.

In order to correct it , check the state of the file. Bring it online
As mentioned in the error text, the common reason for this error is due to Oracle failing to read a specific datafilePossible causes and solutions summary:

=====================================

A. Tablespace or Datafile offline.
B. Datafile does not exist at the OS level.
C. Datafile locked by Backup Software.
D. Incorrectly set ULIMIT on UNIX.
E. Rollback Segment with active transactions is unavailable
F. Possible Other Causes.
A. Tablespace or the datafile in a tablespace being offline.
***********************************************************

- Use the following query to find out the status of the tablespaces:
SQL> select tablespace_name,status from dba_tablespaces;

- Use the following query to find out the status of the datafiles.
SQL> select file#,name,status,enabled from v$datafile;

- If the tablespace is offline, you can bring it online by :
SQL> alter tablespace <tablespace_name> online;

- If the datafile in a tablespace is offline, you can bring it online by:
SQL> alter database datafile <full_path_datafile_name> online;

In some cases, the status of the datafile might be 'recover'.
In that case, media recovery must be done bringing the datafile online. Else, ORA-1113 will be encountered:

For example:
ORA-01113: file 28 needs media recovery
ORA-01110: data file 28: '/h04/app/oracle/oradata/v920/nar.dbf'

For doing the recovery, the following commands can be used:
SQL> recover datafile '<full_path_of_datafile>';
SQL> alter database datafile <full_path_datafile_name> online;

In some cases, it might be possible to recover the datafile from the online redologs only.

B. Datafile does not exist at the OS level.
******************************************

In this case, you can drop the datafile and recreate the tablespace.
But, this is feasible for non-system and non-rollback tablespaces only. The steps in brief would be:

- Log into Server Manager and connect internal.

- Offline drop the other datafiles associated to the tablespace

SQL> ALTER DATABASE DATAFILE '<datafile_name>' OFFLINE DROP;

- Drop the tablespace

SQL> DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS;

- Recreate the tablespace

SQL> CREATE TABLESPACE <tablespace_name> DATAFILE '<datafile_name>'
SIZE <required_size>;

C. Due to the Backup software locking the file.
**********************************************

In some platforms, the backup software might be locking the datafiles, preventing Oracle from reading the datafiles.
Check if there are any backup software running and stop them, thereby releasing the locks and try starting up the database again.
D. On Unix, if the ulimit is not set properly.
**********************************************

The following error might result, if the ulimit parameter is not set properly. This is possible especially in Oracle Parallel Server (OPS) instances, where the node switch might happen.

For Example:
ORA-00376: file 29 cannot be read at this time
ORA-01110: data file 29: '/db/GICORP_4/axix01.dbf'
Error: 27: File too large

The problem is that on the new node the filesize limit is lower than it used to be on the older node and lower than the datafile size.

In these situations, the resolution would be to increase the
Unix ulimit filesize as explained below.
For the C shell:


% limit filesize <number>
For the Bourne or Korn shell:


$ ulimit -f <number>
Once the ulimit is increased, the database can be restarted after
bringing the datafiles online ( if they were offline ).
E. If the rollback segment containing active transactions is unavailable.
*********************************************************************
ORA-376 error might also result in the following scenario:
1. Database was down because of shutdown abort or system crash.
2. A datafile in a rollback segment tablespace is lost because the disk is bad, controller problems etc.
3. The database was subsequently started up after removing the entries in the rollback_segments parameter.
4. The rollback datafile was offline dropped.
5. Database open command is issued.

The reason for ORA-376 in this case is :
Oracle performs recovery automatically to bring all database files to a consistent state. For that, it needs information from both the redolog and rollback segments.
If a datafile containing rollback segment extents is needed in this process but is found to be offline, Oracle will issue the error.

The solution in this case would be:

If the rollback datafile can be made available again, then

1. Reinclude the rollback segments in the "init.ora" file.
2. Mount the database.
SQL> STARTUP MOUNT;

3. Bring the datafile back online.

SQL> ALTER DATABASE DATAFILE '<full_path_file_name>' ONLINE;

4. Perform media recovery on the datafile.

SQL> RECOVER DATAFILE '<full_path_file_name>';
5. Open the database.

SQL> ALTER DATABASE OPEN;
F. Some other cases where the error ORA-376 was resolved include:
****************************************************************

1. Rollback segment datafile is present, but Oracle complains about
ORA-376 error during startup of the database. The database is in NOARCHIVE log mode and there is no cold backup.

Solution:

One option available is to fake a recovery to see what file(s) Oracle
requires to recover the database. If Oracle only requires the online
redologs then database can be recovered and opened with no data loss.

From SQL*Plus or SVRMGL:

Run the following query to determine sequence number of online redologs:

SQL> select v1.group#,member,sequence#,first_change# from v$log v1, v$logfile v2 where v1.group# = v2.group#;

Note the sequence number and member columns are of importance.
Next, attempt to recover database to see what file Oracle requires:
SQL> recover database until cancel;

Again note the sequence number. Ignore the suggested logfile name.
The name will appear in the form of an archived log, but this is really the name of the online redolog not yet archived. If the lowest sequence number from the query results is the same as the
sequence number Oracle requires to recover database, then database can be recovered. Simply copy the exact path and filename from the member column as the filename required by the RECOVER DATABASE command.

Repeat the process for each online redolog. Oracle will return the message "Recovery completed." at the end of recovery.

At this point you can issue:
SQL> ALTER DATABASE OPEN;
If ORA-1589 "must use RESETLOGS or NORESETLOGS option for database open" occurs:

SQL> ALTER DATABASE OPEN NORESETLOGS;

NOTE: The open may take a while to process.
2. Shutdown abort followed by server reboot.
Database startup fails with the following errors:

ORA-01545: rollback segment '%s' specified not available
ORA-01595: error freeing extent (%s) of rollback segment (%s)) ORA-00376: file %s cannot be read at this time

The Database in archive log mode was shutdown abort before the server was rebooted.
The cause of this problem is still undetermined, but the following
solution worked:
- Shutdown the database immediate:

SQL>shutdown immediate;

- Edit the init<SID>.ora file and remove or comment out the problem rollback segment from the list of rollback segments in the
ROLLBACK_SEGMENTS parameter.

- Startup the database.
SQL> STARTUP MOUNT;
- Find out which files need recovery by running the following statement:

SQL> select * from v$recover_file;

Alternatively, you can also query v$datafile.

- Find out which rollback segments need recovery by running the following statement;

SQL> select usn,status from v$rollstat where status != 'ONLINE';

- Recover the datafiles that need recovery:
SQL> recover datafile '<full path filename>';

- Find out which datafiles are offline by running the following
statement:
SQL> select name,status from v$datafile where status != 'ONLINE';

- Bring the datafiles online:
SQL> alter database datafile '<full path filename>' online;

- Verify that all datafiles are online:

SQL> select file#, name, status
from v$datafile;
- Find out which rollback segments are offline by running the following statement:

SQL> select usn,status from v$rollstat where status != 'ONLINE';

- Bring all rollback segments online:

SQL> alter rollback segment <RBS NAME> online;
- Verify that all rollback segments are now online:

SQL> select usn,status from v$rollstat ;

- Shutdown the database immediate:
SQL> shutdown immediate;

- Edit the init<SID>ora file and add or uncomment the problem rollback segment back to the list of rollback segments in the ROLLBACK_SEGMENTS parameter.

- Startup the database.
SQL> STARTUP MOUNT;
分享到:
评论

相关推荐

    精髓Oralcle讲课笔记

    -- 首先,以超级管理员的身份登录oracle sqlplus sys/bjsxt as sysdba --然后,解除对scott用户的锁 alter user scott account unlock; --那么这个用户名就能使用了。 --(默认全局数据库名orcl) 1、...

    Oracle8i_9i数据库基础

    第一部分 Oracle SQL*PLUS基础 23 第一章 Oracle数据库基础 23 §1.1 理解关系数据库系统(RDBMS) 23 §1.1.1 关系模型 23 §1.1.2 Codd十二法则 24 §1.2 关系数据库系统(RDBMS)的组成 24 §1.2.1 RDBMS 内核 24...

    oracle安装及备份

    1、在进行导入恢复时,如果是全部导入的话,就需要将原有的用户删除,这样此用户所拥有的数据就可以直接被删除了,否则在进导入时会下面的错误提示( ORACLE error 2291 encountered )那是因为与原有一些表,或...

    php手册.chm,php手册

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    php帮助文档,php。chm,php必备的中文手册

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. Cookie 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程文件...

    PHP手册(带评论版-2008-03-14).part2.rar

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    PHP手册(带评论版-2008-03-14).part1.rar

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    超级有影响力霸气的Java面试题大全文档

    多态性语言具有灵活、抽象、行为共享、代码共享的优势,很好的解决了应用程序函数同名问题。 5、String是最基本的数据类型吗?  基本数据类型包括byte、int、char、long、float、double、boolean和short。  java....

    PHP函数参考手册大全

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    中文版PHP使用手册

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    PHP5 开发手册 简体中文手册

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. Cookie 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程文件...

    经典收藏最全php5.0查询手册

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39. 使用远程...

    php手册PHP5研究室编无乱码版本chm

    28. 错误报告 29. 使用 Register Globals 30. 用户提交的数据 31. 魔术引号 32. 隐藏 PHP 33. 保持更新 V. 特点 34. 用 PHP 进行 HTTP 认证 35. cookies 36. 会话 37. 处理 XForms 38. 文件上传处理 39....

    千方百计笔试题大全

    199、在ORACLE大数据量下的分页解决方法。一般用截取ID方法,还有是三层嵌套方法。 47 200、xml有哪些解析技术?区别是什么? 48 201、你在项目中用到了xml技术的哪些方面?如何实现的? 48 202、用jdom解析xml文件时...

    java面试宝典

    199、在ORACLE大数据量下的分页解决方法。一般用截取ID方法,还有是三层嵌套方法。 47 200、xml有哪些解析技术?区别是什么? 48 201、你在项目中用到了xml技术的哪些方面?如何实现的? 48 202、用jdom解析xml文件时...

    数据库基础

    第一部分 Oracle SQL*PLUS基础 23 第一章 Oracle数据库基础 23 §1.1 理解关系数据库系统(RDBMS) 23 §1.1.1 关系模型 23 §1.1.2 Codd十二法则 24 §1.2 关系数据库系统(RDBMS)的组成 24 §1.2.1 RDBMS 内核 24...

    PHP官方手册中文版

    56. Zend Engine 2 API reference 57. Zend Engine 1 58. The future: PHP 6 and Zend Engine 3 VIII. FAQ:常见问题 59. 一般信息 60. 邮件列表 61. 获取 PHP 62. 数据库问题 63. 安装常见问题 64. 编译...

    PHP手册2007整合中文版

    29. 错误报告 30. 使用 Register Globals 31. 用户提交的数据 32. 魔术引号 33. 隐藏 PHP 34. 保持更新 V. 特点 35. 用 PHP 进行 HTTP 认证 36. Cookie 37. 会话 38. 处理 XForms 39. 文件上传处理 40. 使用远程文件...

    轻松学C#(图解版)

    4.2.2 局部变量与字段同名的解决——this关键字 54 4.2.3 语句 55 4.2.4 全局变量 55 4.3 返回值 56 4.3.1 返回值类型 56 4.3.2 从方法返回 57 4.4 参数 58 4.4.1 参数的分类 58 4.4.2 引用参数(ref参数) 59 4.4.3...

    java 面试题 总结

    多态性语言具有灵活、抽象、行为共享、代码共享的优势,很好的解决了应用程序函数同名问题。 2、String是最基本的数据类型吗? 基本数据类型包括byte、int、char、long、float、double、boolean和short。 java.lang....

Global site tag (gtag.js) - Google Analytics