database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
ㆍOracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Oracle Tutorials 9199 게시물 읽기
 News | Q&A | Columns | Tutorials | Devel | Files | Links
No. 9199
Oracle 에러별 원인 및 조치사항 몇가지
작성자
정재익(advance)
작성일
2002-01-02 21:52
조회수
16,668

Oracle 에러별 원인 및 조치사항 몇가지

 

아래 내용은 http://home.bcline.com/hoya1/ 의 게시판에 있는 내용으로서 오라클 사용자 분들에게 유용할 것으로 판단되어 올려 둡니다. 참조하시기 바랍니다. 혹시 도움이 되셨다면 원래의 홈페이지에 들리셔서 감사의 말씀 좀 전하도록 하세요. :-)

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

 

ORA-01157 cannot identify data file %s

 

01157, 00000, "cannot identify data file %s - file not found"

// *Cause: The background process was not able to find one of the data files.

// The database will prohibit access to this file but other files will

// be unaffected. However the first instance to open the database will

// need to access all online data files. Accompanying error from the

// operating system describes why file was not found.

// *Action: Have operating system make file available to database. Then either

// open the database or do ALTER SYSTEM CHECK DATAFILES.

 

1. 데이타 화일을 백업받아놨다면

--- ERROR위치에 데이타화일을 옮겨 놓고 기동시킨다.

2. 데이타 화일이 없을시

--- 문제의 데이타 화일을 확인후 회이을 오라클상에서 삭제하여 오라클이 정상적으로 가동하도록 만들어 주어야 한다.

가동한 후에는 이 데이타 화일로 구성된 테이블 스페이스도 지워주어야 한다.

1>connect internal

2>startup mount

3>alter database datafile '/oracle/data/user1.dbf' offline drop

4>drop tablespace 테이블스페이스명 including contents;

 

ORA-1547 Tablesapce에서 Free Space 부족시

 

***ORA-1547(Failed to allocate extent of sizes% in tablespace ‘USERS’)

 

***발생원인

1. table이 요구하는 next extent의 크기가 tablespace의 freespace를 초과할때.

2. index생성시 rollback segment나 sort area로 쓰이는 temporay tablespace부족할때

3. SQL*Forms30등을 사용할때, 관련 table을 포함하고 있는 Tool tablespace부족할때 발생한다.

 

***해결방법

 

1. 다음 스크립트을 이용해 테이블 스페이스별 프리영역을 체크한다.

 

SELECT a.tablespace_name,

a.total "Total(Mb)",

a.total - b.free "Used(Mb)",

nvl(b.free,0) "Free(Mb)",

round((a.total - nvl(b.free,0))*100/total,0) "Used(%)"

from ( select tablespace_name,

round((sum(bytes)/1024/1024),0) as total

from dba_data_files

group by tablespace_name) a,

( select tablespace_name,

round((sum(bytes)/1024/1024),0) as free

from dba_free_space

group by tablespace_name) b

where a.tablespace_name = b.tablespace_name(+)

order by a.tablespace_name;

 

->FREE영역의 사용율을 보고 사용되는 FREE SPACE를 볼수 있다.

 

2. 해당 테이블 스페이스가 사용하는 SEGMENT를 DBA_SEGMENTS를 이용해 조사하여 불필요하게 혹은 TEMP성으로 생성된 테이블을 DROP한다.

 

3. 해당 tablespace의 datafile size를 늘려준다

-> alter database datafile ‘users01’ resize 10m;

-> alter tablespace add datafile ‘users02’ to TBLSPACE;

 

4. table의 next를 check 후 지나치게 큰 next size 조정한다

-> alter table AAA storage ( next 2m);

 

5. export/Import로 fragmenation을 정리한다.

 

ORA-00604 error occurred at recursive SQL level %s

 

// *Cause: An error occurred while processing a recursive SQL statement

// (a statement applying to internal dictionary tables).

// *Action: If the situation described in the next error on the stack

// can be corrected, do so; otherwise contact Oracle Support

 

이 에러는 내부적으로 SQL명령이 실행될 때 발생한다. 예를 들어 현재 할당된 익스텐트가 가득 차서

다음 익스텐트를 할당 받으려고 할 때 오라클이 다음 익스텐트의 크기와 위치를 결정하기 위하여

SELECT명령을 내리게 되는 것과 같은 경우이다.

 

이 문제가 발생하 우선 alert.log 화일을 검사하여 ORA-600 과 같은 에러가 발생했는가를 확인한다. ORA-600 에러가 발생했다면 오라클측에 지원을 요청하도록 하고 그렇지 않다면 다른 원인을 검사해 봐야 한다.

 

가장 먼저 고려할 사항은 ?/dbs/init.ora 화일에 지정된 open_cursors 의 크기를 알아보는 것이다.

이 값이 설정이 안되어 있으면 Default가 50이므로

open_cursors=255

----------------

와 같이 설정하도록 한다. 이 값은 단지 커서의 최대 값을 지정하는 것이므로 커서를 적게 쓰는 프로그램에 아무런 영향을 끼치지 않는다. open_cursors를 변경하고 DB를 Shutdown 하고 Startup 시키면 된다.

 

* Cursor란 무엇인가?

Cursor는 SQL문장을 실행하기위해 DATABASE가 사용하는 Memory의 영역을 말한다.

DATABASE에서 갖는 Open_Cursor의 Default값은 50이다.

Maximum값은 User가 사용하는 System 에 따라 결정된다.

User의 환경에 따라 Open_Cursor의 적정값을 설정할 필요 있다.

 

만약 이 방법으로 해결이 안되면 다음의 방법을 따른다.

정확한 에러의 원인을 찾기 위해서 init.ora 화일에 다음과 같은 라인을 추가한다.

events = "604 trace name errorstack"

 

이렇게 init.ora를 변경하고 DB를 Shutdown 하고 Startup 하면 ORA-604 에러가 발생하는 경우에 자세한 정보를 Trace 화일에 기록해 주므로 이 화일을 검사하여 에러의 원인을 찾을 수 있다.

 

에러의 다른 원인으로는 init.ora 화일의 파라미터 가운데 DC_FREE_EXTENTS 나 ROW_CACHE_ENQUEUES 의 값이 너무 작게 설정된 경우를 생각해 볼 수 있다.

이와같은 경우는 이들 값을 크게 설정해 주도록 한다.

 

테이블 스페이스가 가득 차거나 Extent 갯수의 최대 허용값을 초과해서 에러가 발생하는 경우 ORA-604 에러가 함께 발생할 수가 있는데 이와같은 경우에는 이들 문제를 먼저 해결하면 ORA-604 에러는 함께 해결 된다.

 

**참조:ORACLE BULLETIN NOTES

 

ORA-12154: TNS:서비스명를 해석할 수 없습니다.

 

oracle 홈아래 network\admin의 tnsnames.ora file에서 설정한 alias를 해석못한다는 의미입니다.

아마도 tnsnames.ora file에서 설정한 host나 db sid등이 맞는지 확인 해 조세요,,,

 

< 예제 : TNSNAMES.ORA >

NT_SRV.world =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS =

(COMMUNITY = NTCommun.world)

(PROTOCOL = TCP)

(Host = 127.1.1.10)

(Port = 1521)

)

)

(CONNECT_DATA = (SID = ORCL)

)

)

 

ORA-01658: unable to create INITIAL extent for segment in tablespace WEBDB01

 

ORA 01658 ERROR는 다음과 같은 경우에 발생합니다.

* DML 수행시

* OBJECT 생성시

* Forms, Reports, CDE TOOL 수행시

* application. 수행시

 

ct40:/user4/guest/sdh/sql> oerr ora 01658

01658, 00000, "unable to create INITIAL extent for segment in tablespace %s"

// *Cause: Failed to find sufficient contiguous space to allocate INITIAL

// extent for segment being created.

// *Action: Use ALTER TABLESPACE ADD DATAFILE to add additional space to the

// tablespace or retry with a smaller value for INITIAL

 

오라클에서 EXTENT를 ALLLOCATE할려구 할시.. 충분한 여유공간이 없어서 생기는 에러입니다..

그럼 원인은

1. WEBDB01에 층분한 여유공간이 없다.

2. INITIAL EXTENT의 크기가 지나치게 크게 잡혔다.

 

CASE1 :

다음 스크립트로 먼저 FREESPACE를 CHECK하시면 FREE영역이 거의 없음을 확인 할수 있을 겁니다..

SELECT a.tablespace_name,
             a.total "Total(Mb)",
             a.total - b.free "Used(Mb)",
             nvl(b.free,0) "Free(Mb)",
             round((a.total - nvl(b.free,0))*100/total,0)  "Used(%)"
from     (select   tablespace_name, round((sum(bytes)/1024/1024),0) as total
             from     dba_data_files
             group   by tablespace_name) a,
           (select  tablespace_name, round((sum(bytes)/1024/1024),0) as free
            from      dba_free_space
            group by tablespace_name) b
where   a.tablespace_name = b.tablespace_name(+)
order by a.tablespace_name
TABLESPACE_NAME                 Total(Mb)   Used(Mb)   Free(Mb)    Used(%)
------------------------------ ---------- ---------- ---------- ----------
BRS1_CODE                               4          1          3         25
D2K_D1                               2000       1232        768         62
D2K_D2                               2000       1418        582         71
..............................................

WEBDB01에 여유분의 데이타 화일을 추가시키시거나, 불필요하게 그 테이블스페이스를 점유하고

있는 OBJECT를 정리합니다.

CASE2: 
   select SEGMENT_NAME, SEGMENT_TYPE, INITIAL_EXTENT, NEXT_EXTENT
   where TABLESPACE_NAME ='WEBDB01'
   and    SEGMENT_NAME= 'AAA '

로 INITIAL_EXTENT의 크기를 확인해 크게 잡혔다면 작게 사이즈를 조정합니다.

 

ORA-20003 - The object that you specified is invalid and cannot be described.

 

1. 호출하고 있는 프로시져의 권한이 있는지, VALID 한지 확인 합니다.

 

** PROCEDURE 의 INVALID

select count(*) from dba_objects

where status='INVALID';

 

select object_name,object_type,owner

from dba_objects

where status='INVALID';

 

 

OBJECT_NAME OBJECT_TYPE OWNER

----------- ----------- -----

CURSOR_TEST PROCEDURE SCOTT

 

-> INVALID 하다면 재 컴파일 합니다.

 

2. 프로시져가 실제로 존재하는지 확인합니다.

3. 포로시져 이름이나 파라미터를 확인합니다.

 

ora-00102 에러중에서 MTS_DISPATCHERS

 

발생윈인:

 

ORA-00101 에러는 MTS_DISPATCHERS 파라미터에 대한 잘못고니 SETTING 으로 발생합니다.

 

o You are installing 8.1.5 software and creating the default

database on NT (or Linux) and receive the ORA-0101 error.

 

00101, 00000, "invalid specification for system parameter mts_dispatchers"

// *Cause: The syntax for the "mts_dispatchers" parameter is incorrect.

// *Action: refer to the manual for correct syntax.

 

o You ignore this error and continue with the install and

immediately receive the ORA-0102 error.

 

00102, 00000, "network protocol %s cannot be used by dispatchers"

// *Cause: The network specified in "mts_dispatchers" doesn't have the

functionalities required by the dispatchers.

// *Action: refer to the manual on network protocols supported by the

dispatchers.

 

 

해결 방법:

 

Solution Description:

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

mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"

# Uncomment the following line when your listener is configured for

# SSL

# (listener.ora and sqlnet.ora)

# mts_dispatchers =

# "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"

 

mts_servers = 1

 

o After this you should be able to complete your install without

receiving these errors.

 

o A possible workaround may be to # out the parameters

mts_dispatchers and mts_servers.

 

00102 문제에서 log 파일에서 에러와 어떻게 풀어야 할지

 

## listener.ora

LISTENER =

(ADDRESS_LIST =

(ADDRESS= (PROTOCOL= TCP)(Host=192.168.1.1)(Port= 1521))

)

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = naun)

(ENVS = 'EPC_DISABLED = TRUE')

)

)

STARTUP_WAIT_TIME_LISTENER = 0

CONNECT_TIMEOUT_LISTENER = 10

TRACE_LEVEL_LISTENER = OFF

 

## tnsnames.ora

linux.world =

(DESCRIPTION =

(ADDRESS = (PROTOCOL=TCP) (host= 192.168.1.1)(port= 1521))

(CONNECT_DATA =

(SID = naun))

)

 

이와같이 고치시고 리스너 다시 START후 실행해보세요

 

ORA-12571: TNS:packet writer failure 에러

 

LISTENER.ORA and TNSNAMES.ORA,의 IP와 host명을 확인해 보세여

 

또한

SQLNET.ORA 의 다음 entry를 Client, 서버단에서 모두 제거 하세요..

SQLNET.EXPIRE_TIME=0

[Top]
No.
제목
작성자
작성일
조회
9238SQL, SQL*Plus (II)
정재익
2002-01-05
12469
9237SQL* SQL*Plus (I)
정재익
2002-01-05
21457
9236PL/SQL 요약
정재익
2002-01-05
13713
9199Oracle 에러별 원인 및 조치사항 몇가지
정재익
2002-01-02
16668
9079DATABASE LINK 사용 방법
정재익
2001-12-25
10083
9077Oracle7 에서 테이블스페이스 확장에 대해서
정재익
2001-12-25
6509
9076Oracle Startup 과정에 대해서
정재익
2001-12-25
5911
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2023 DSN, All rights reserved.
작업시간: 0.048초, 이곳 서비스는
	PostgreSQL v16.1로 자료를 관리합니다