Chinaunix首页 | 论坛 | 博客
  • 博客访问: 167064
  • 博文数量: 13
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 185
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-15 14:10
文章分类

全部博文(13)

文章存档

2008年(13)

我的朋友
最近访客

分类: Oracle

2008-10-30 17:55:27

ORA-01033: ORACLE initialization or shutdown in progress
ORACLE error from recovery catalog database: RMAN-20020: database in carnation not set

ORA-4031, ORA-1519, ORA-604, ORA-1578, ORA-1034, ORA-904, ORA-1547, ORA-1556, ORA-1090, IMP-0003, ORA-942 and IMP-00023

ORA-01650:unable to extend rollback segment NAME by NUM intablespace NAME
ORA-01652:unable to extend temp segment by num in tablespace name
ORA-01628:max # of extents num reached for rollback segment
ORA-00600:internal error code,arguments:
ORA-03113:end-of-file on communication channel
ORA-00942:table or view does not exist
ORA-1636 signalled during: alter rollback segment rb00 online
ORA-01688:unable to extend table name.name partition NAME by NUM in tablespace NAME
Reference:http://blog.oracle.com.cn/index.php/233877/viewspace-6198.html

1. ORA-01033: ORACLE initialization or shutdown in progress
Example:

create tablespace test datafile
‘c:test.ora’ size 5M
AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED
default storage (initial 128K next 1M pctincrease 0)/

Close all services:

net stop “OracleWebAssistant0″
net stop “OracleOraHome81TNSListener”
net stop “OracleServiceORADB”
shutdown

delete test.ora:

Restart all services:

net start “OracleWebAssistant0″
net start “OracleOraHome81TNSListener”
net start “OracleServiceORADB”

Cann’t connect from SQL*PLUS
Error message:
ORA-01033: ORACLE initialization or shutdown in progre

Solution:

offline the .ORA

$svrmgrl
svrmgrl>connect internal
svrmgrl>shutdown
svrmgrl>startup mount

–ARCHIVELOG mode

svrmgrl>alter database datafile ‘C:TEST.ORA’ offline;

–NOARCHIVELOG mode

svrmgrl>alter database datafile ‘C:TEST.ORA’ offline drop;

svrmgrl>alter database open;

SQL> select file#,name,status from v$datafile;

SQL> drop tablespace test;

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at xx/xx/200x 00:00:00
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20020: database in carnation not set

RMAN> drop catalog;
# rman target sys/oracle@rac1 catalog sys/oracle@cat
RMAN> create catalog;
RMAN> register database ;

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

ORA-01650:unable to extend rollback segment NAME by NUM intablespace NAME
产生原因:上述ORACLE错误为回滚段表空间不足引起的,这也是ORACLE数据员最常见的ORACLE错误信息。当用户在做一个非常庞大的数据操作导致现有回滚段的不足,使可分配用的回滚段表空间已满,无法再进行分配,就会出现上述的错误。
解决方式:使用“ALTER TABLESPACE tablespace_name ADD DATAFILE filename SIZE size_of_file”命令向指定的数据增加表空间,根据具体的情况可以增加一个或多个表空间。当然这与还与你主机上的裸盘设备有关,如果你主机的裸 盘设备已经没有多余的使用空间,建议你不要轻意的增加回滚段表空间的大小,可使用下列的语句先查询一下剩余的tablespace空间有多少:

Select user_name,sql_text from V$open_cursor where user_name=<user_name>’;


如果多余的空间比较多,就可以适当追加一个大的回滚段给表空间使用,从而避免上述的错误。你也可以用以下语句来检测一下rollback segment的竞争状况:  

Selectclass,count from V$waitstat where calssin(‘system undo header’,’
system undo block’,’undo header’,’undo block’);

和  

Select sum(value) from V$sysstat where namein(‘db_block_gets’,’consistents gets’);

如果任何一个class in count/sum(value)大于1%,就应该考虑增加rollback segment。 

ORA-01652:unable to extend temp segment by num in tablespace name
产生原因:ORACLE临时段表空间不足,因为ORACLE总是尽量分配连续空间,一但没有足够的可分配空间或者分配不连续就会出现上述的现象。
解决方法:我们知道由于ORACLE将表空间作为逻辑结构-单元,而表空间的物理结构是数据文件,数据文件在磁盘上物理地创建,表空间的所有对象也存在于 磁盘上,为了给表空间增加空间,就必须增加数据文件。先查看一下指定表空间的可用空间,使用视图SYS.DBA_FREE_SPACE,视图中每条记录代 表可用空间的碎片大小:  

Select file_id,block_id,blocks,bytes from sys.dba_free_space where tablespace_name=<users>;


返回的信息可初步确定可用空间的最大块,看一下它是否小于错误信息中提到的尺寸,再查看一下缺省的表空间参数:

SQL>SELECT INITIAL_EXTENT,NEXT_EXTENT,MIN_EXTENTS,PCT_INCREASE FROM SYS.DBA_TABLESPACES

WHERE TABLESPACE_NAME=name;

通过下面的SQL命令修改临时段表空间的缺省存储值:

SQL>ALTER TABLESPACE name DEFAULT STORAGE (INITIAL XXX NEXT YYY);

适当增大缺省值的大小有可能解决出现的错误问题,也可以通过修改用户的临时表空间大小来解决这个问题:
SQL>ALTER USER username TEMPORARY TABLESPACE new_tablespace_name; 

使用ALTER TABLESPACE命令,一但完成,所增加的空间就可使用,无需退出或使表空间脱机,但要注意,一旦添加了数据文件,就不能再删除它,若要删除,就要删除表空间。

一个报错例子如下:  

ORA-1652:unable to extend temp segment by207381intablespace TEMPSPACE

ORA-01628:max # of extents num reached for rollback segment
产生原因:这种错误通常为一个回滚段和一个表空间已经达到MAXEXTENTS参数设置的极限。要注意的是这个MAXEXTENTS不是该回滚段或表空间的硬件极限,硬件极限取决于数据库创建时在init.ora文件中指定的DB_BLOCK_SIZE参数的值。
解决方法:使用SQL命令ALTER TABLESPACE…STORAGE(MAXEXTENTS XXXX)来增加 MAXEXTENTS,其中“XXXX”值必须大于错误信息中所指的数值,但不能大于LARGEST MAXEXTENT的值,如果已经达到了LARGEST MAXEXTENT VALUE,解决的办法就是重新创建较大的范围尺寸,使用带有选项COMPRESS=Y的Export工具导出表,如果表空间有可用空间,先给表做一个备 份,用alter tablespace tablespace_name更改其名字,然后再装载表回数据库。
查看其错误出现的地方,如果出现在回滚段或索引上,那么必须将其删除并重建,如果出现在临时表空间,修改临时表空间的存储字段,便可解决这个问题。
一个报错例子如下:  
ORA-1628:max # extents50reachedforrollback segment RBS_1

ORA-00600:internal error code,arguments:
产生原因:这种错误通常为ORACLE的内部错误,只对OSS和ORACLE开发有用。ORA-600的错误经常伴随跟踪文件的状态转储 (系统状态和进程状态),系统状态存储将包括ORACLE RDBMS持有的当前对象的信息,进程状态转储则将显示特殊进程持有的对象,当进程符合了某错误条件时,经常是由于一些信息取自它持有的一个块,如果我们 知道这些错误进程持有的块,就容易跟踪问题的来源。
解决方法:一般来说出现这个错误我们本身是无法解决的,只有从提高系统本身各方面来解决这个内部问题,如增加硬件设备,调整系统性能,使用OPS(当然 OPS从某种意义上说并不是一种好的解决方式)等。ORA-600错误的第一个变量用于标记代码中错误的位置(代码中的每个部分的第一变量都不一样),从 第二个到第五个变量显示附加信息,告诉OSS代码在哪里出现了错误。

一个报错例子如下:

ORA-00600:internalerror code, arguments: [1237], [], [], [], [], [], [], []

ORA-03113:end-of-file on communication channel
产生原因:通讯不正常结束,从而导致通讯通道终止
解决方法:
1>.检查是否有服进程不正常死机,可从alert.log得知
2>.检查sql*Net Driver是否连接到ORACLE可执行程序
3>.检查服务器网络是否正常,如网络不通或不稳定等
4>.检查同一个网上是否有两个同样名字的节点
5>.检查同一个网上是否有重复的IP地址

ORA-00942:table or view does not exist
产生原因:这是由于装载的表或视图不存在,多半是CATEXP.SQL还没有运行,无法执行Export视图,如果CATEXP.SQL已经运行,则可能是版本错误。
解决方法:因为Import和Export共享的一些视图是通过运行CATEXP.SQL来装载的(它们具有相同的视图),并不生成单独的 CATEXP.SQL,因而造成视图与Export代码不同步,较难保持彼此之间的兼容,用户就必须建立自己的Export应用,从而避免ORA- 00942的错误。
上述错误均为我们在使用回滚段时比较常见的问题,ORA-01598指明当前使用的回滚段的状态为“not online”,不能使用,将它改为“online”状态即可使用;ORA-01636指明当前回滚段已经为“online”状态,可以直接使用,不用再集合它。

ORA-1636 signalled during: alter rollback segment rb00 online
我们在做统计时还可能遇到下述问题:一个rollback segment的状态为”Needs Recovery”的现象,这是由于ORACLE回退一个事物表中的没有提交的事物时失败所造成的。通常原因为一个datafile或者 tablespace是在offline的状态或者一个undo的目标被破坏或者rollback segment被破坏。解决的办法是将所有的tablespace和datafile都置为online状态,如果不能解决则做下面的工作:
1>.在initsid.ora中加入event=”10015 trace name context forever lever 10”;
2>.shutdown数据库然后重启;
3>.在$ORACLE_HOME/rdbms/log下,找到startup时生成的trace file;
4>.在trace文件中,找到下列信息“error recovery tx(#,#) object #”;
5>.根据object#(与sys.dba_objects表中的object_id相同)在sys.dba_objects表中查出该object的名字;
6>.将该object drop掉;
7>.在init.ora文件中将该rollback segment放回rollback_segments参数中,删除event;8>.shutdown数据库然后重启。此时”Needs Recovery”的问题应该是完全解决了,否则就是rollback segment被破坏了。

ORA-01688:unable to extend table name.name partition NAME by NUM in tablespace NAME
产生原因:指定的tablespace空间已经被占用满,无法扩展。
解决方法:使用“ALTER TABLESPACE ADD DATAFILE”命令增加文件系统文件和原始分区,或者增加INITIAL的大小(如:alter tablespace CDRS101 default storage(next 500M pctincrease 1))应该能够解决,否则就是有人使用你的表空间上创建了一个比较大的数据文件导致你的表空间不够用。

一个报错例子如下:  

ORA-1688: unable to extend table RMMCDR.LOCAL_CDR partition LOCAL_CDR101 by460800in

tablespace CDRS101

======================================================
This document contains information about errors frequently encountered by
new DBAs, along with appropriate actions to be taken in each circumstance.

1)  ORA-1547

a) on Rollback segment when importing. Specify commit=y and a large buffer on import. This way the
Rollback will be released after each array, as opposed to each object.
b) when allocating an extent on a tablespace with alot of free space.
SQL> Select max(blocks) from DBA_FREE_SPACE.
You may have free space but it might not be contiguous. Make sure it is greater than the extent it
is trying to allocate. You can reduce the storage parameters NEXT and PCTINCREASE if it isn’t.

2)  ORA-1556 max extents of 121 exceeded when storage is set for maxextents of 999.

Most platforms have a max of 121 even though it allows you to specify 999.
(see the readme for your platform)

3)  ORA-1090 shutdown in progress when starting up even after a shutdown was issued quite some time ago.

If the background processes aren’t running the SGA could have been left out there… Issue a startup force open (which does a shutdown abort first).

4)  IMP-0003, ORA-942 and IMP-00023 on import.

Run catalog.sql and expvew.sql (renamed catexp.sql in v7) as sys before the import. Both files are in $ORACLE_HOME/rdbms/admin (UNIX).

5)  ORA-904 Invalid column name on import. Run expvew.sql (catexp.sql) before the import.
6)  ORA-1034 Oracle not available.

Startup the DB first…if it is started check your searchpath. Make sure that ORACLE_SID is set correctly  For setuid issues, see PRE 1006554.6.

7)  ORA-1578 Oracle Data Block corrupted (file # num and block # num)

To determine where the corruption is:
SQL> select * from sys.dba_extents where file_id = filenum and blocknum
between block_id and (block_id + blocks - 1);
The filenum and blocknum are the numbers in the 1578 error. This query should give the segment_name and segment_type (i.e table and its name).
In order to salvage the uncorrupted part of the table you can add an entry to the init.ora:
event = “10231 trace name context forever”
This will skip the corrupted block on a table scan. Export the table, drop and recreate it from import.

8)  ORA-604 what does it mean

Usually it comes with another error such as 1547….if it can’t be found in any of the trace files try setting the following event in init.ora and restarting the DB.
event=”604 trace name errorstack forever”
for the output of this look in the trace files in the directory given by the USER_DUMP_DEST parameter in init.ora.

9)  My create database is failing with ORA-1519: error while processing file

Take out the INIT_SQL_FILES param out of init.ora, run the scripts by hand after the database is created.

10) 谢谢,我安上了oracle,但是却无法启动sqlplus。
提示:sqlplus: error while loading shared libraries: libclntsh.so.9.0: cannot open shared object file: No such file or directory
请问该怎么办? find / -name libclntsh.* -print 2>/dev/null
找到libclntsh.so.9.0的路径

A. 在$HOME目录下的.bash_profile中加入
LD_LIBRARY_PATH=/home/oracle/oracle/product/10.2.0/db_1/lib(libclntsh.so.9.0的路径)
export LD_LIBRARY_PATH
然后运行. .bash_profile生效

11) Out of shared memory (ORA-4031).

Try de-fragmenting the shared pool by running an ‘alter system flush shared_pool’ If that is not enough, increase the shared_pool_size parameter.


阅读(1116) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~