2010년 3월 16일 화요일

LPSTR, LPCSTR, LPCTSTR…

LPSTR :  A 32-bit pointer to a character string.
         이 데이터 형같은 경우 예전에 우리가 사용하던 방식으로 선언하면
         char *
         와 같은 경우이죠. 유니코드를 지원하지 않기 때문에 각각의
         문자는 1바이트를 가집니다.

LPCSTR :  A 32-bit pointer to a constant character string.
         이 데이터 형같은 경우 예전에 우리가 사용하던 방식으로 선언하면
        const char *
         와 같은 경우이죠. const 형이 어떤건지는 아시죠? 이것역시
         유니코드를 지원하지 않기 때문에 각각의 문자는 1바이트를 가집니다.        

LPTSTR : A 32-bit pointer to a character string that is
           portable for Unicode and DBCS
          이 데이터 형같은 경우, 윈도우즈가 유니코드를 지원하면서 새로
          생긴형식으로 풀어쓰면 다음과 같습니다.
          TCHAR *
          이 형은 유니코드를 지원하기 때문에 각 문자가 2바이트를 가지게
          됩니다. 실제로 유니코드를 지원하는 프로그램을 작성하지 않는
          이상 거의 사용하지 않습니다.

LPCTSTR : A 32-bit pointer to a constant character string that
            is portable for Unicode and DBCS.
          이것 역시 윈도우즈가 유니코드를 지원하면서 새로 생긴형식으로
          풀어쓰면 다음과 같습니다.
         const TCHAR *
          마찬가지로 유니코드를 지원하기 때문에 한문자가 2바이트 크기를
          가지게 됩니다.

함수뒤에 const 를 붙이는건 클래스 멤버함수내에서 this 사용을 제한하기 위해서 사용합니다.
일반적으로 멤버 함수내에서 사용되는 this는 해당 클래스가 MyClass 인 경우에,

MyClass * const this;

와 같이 내부적으로 선언되어서 사용되는데, 함수의 뒤에 const를 붙이면

const MyClass * const this;

와 같이 속성이 바뀌어져서 사용됩니다. 즉 내부에 사용되는 데이터 멤버가 이 함수에서는 모조리
읽기 전용으로 바뀌어져 버리는거죠…

this 변수가 가리키는 멤버들이 모두 쓰기 불능으로 되어버리기 때문에… 즉, this는 우리가 직접
변경할수 없기 때문에 함수뒤에 const를 붙여 간접적으로 this를 const형으로 변경하는 기능을
구현한겁니다.

TSVNCache.exe 제거

많은 개발업체에서 버전 관리를 위해 무료 버전 관리 프로그램인 Tortoise SVN를 많이 사용하고 있는 걸로 알고 있다.

Tortoise SVN의 장점 중 하나인 현재 상태를 아이콘으로 표시해주는 기능이 있는데, 이 아이콘 상태를 정의하기 위해 Tortoise SVN에서 수시로 디스크를 읽으며, 파일 상태를 체크한다. 이 때문에, 컴퓨터 성능이 저하 되기도 하는데, 범인은 바로 TSVNCache.exe!! 이 프로세서가 백그라운드로 실행되면서, 폴더/파일를 수시로 읽어들이고 있기 때문이다.

Tortoise SVN를 쓰고 있다면, 밑의 방법대로 설정 해두자. 이렇게 하면 사용자가 지정한 폴더와 파일 외에는 접근을 하지 않으므로, 디스크 읽기를 최소화 시킬수 있다.

방법은 이렇다.

1. TortoiseSVN -> Settings 메뉴를 연다 .


2. Look and Feel 트리 항목에서 Icon Overlays 선택


3. 그럼 밑의 그림과 같은 항목들이 나온다.



4. 하단에 Exclude Paths(제외항목)에 드라이브명과 함께 *를 찍어준다.
즉, 드라이브내의 모든 파일/폴더를 검색하지 말란소리다.


5. Include Paths에는 버전관리를 하고 있는 폴더명을 적어준다.


6. 설정을 마치면, 작업 관리자를 통해 TSVNCache.exe를 강제 종료시킨다(보통 알아서 재시작한다).

2010년 3월 12일 금요일

닥터왓슨 (Dr. Watson, Drwtsn32.exe) 사용법 :: 프로그램 오류, 버그 해독개발자 팁, 강좌

개요..

닥터왓슨 (Dr. Watson, Drwtsn32.exe) 은 디버그(Debug)와 릴리즈(Release)버전에서 프로그램 오류발생 할 경우 오류 내용을 해독할 수 있는 정보를 제공해주는 특히 서버프로그램에서 아주 유용하게 사용됩니다.

"drwtsn32.exe" 실행하여 도움말을 클릭하면 자세한 한글 설명서를 볼 수 있습니다.


 

오류가 발생하는 테스트 프로그램 다운로드

윈도우 디버그 심볼(Debug Symbol) 다운로드 받는 방법

 

따라해보기

내가 만든 프로그램의 심볼을 닥터왓슨(Dr. Watson)에 등록시켜보기

1. 내 컴퓨터 등록정보->고급->환경변수 에  _NT_SYMBOL_PATH 등록합니다.

 

2. 변수값에 %systemroot%\Symbol;D:\Symbol; 추가합니다.

3. 닥터왓슨을 다음과 같이 실행시켜 기본 디버거로 등록합니다.

 drwtsn32.exe -i

4. 릴리즈버전의 링크옵션에 "Generate debug info"를 체크합니다.

5. 컴파일 하여 생성된 *.pdb 파일을 심볼 폴더로 복사합니다.  

6. 릴리즈버전을 실행시켜 오류 발생 시험합니다.  

오류가 발생 후  오류 함수와 내용이 무엇인지 알아보기

drwtsn32.log 파일 일부분

응용 프로그램 예외 발생:

응용 프로그램: (pid=1224)

날짜: 2004-05-21 @ 23:30:20.968

예외 번호: c0000005 (액세스 위반)

 

함수: fnc_1

00401005 b9e8030000 mov ecx,0x3e8

0040100a 33ff xor edi,edi

오류 -> 0040100c f3ab rep stosd es:00000000=????????

0040100e 5f pop edi

 

*----> 스택 역 추적 <----*

FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name

0012FF74 0040101A 000003E8 00401025 004010E4 00000001 !fnc_1 (FPO: [1,0,1])

0012FF7C 00401025 004010E4 00000001 00340C20 00340C58 !fnc_2 (FPO: [0,0,0])

0012FF80 004010E4 00000001 00340C20 00340C58 00000000 !main (FPO: [2,0,0])

0012FFC0 77E61AF6 00000000 00000000 7FFDF000 C0000005 !mainCRTStartup

0012FFF0 00000000 00401030 00000000 000000C8 00000100 kernel32!OpenEventA

 

Visual C++ 를 기본 디버거로 다시 등록하는 레지스트리

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]

"Auto"="0"

"Debugger"="\"E:\\Program Files\\Microsoft Visual Studio\\Common\\MSDev98\\Bin\\msdev.exe\" -p %ld -e %ld"

"UserDebuggerHotKey"=dword:00000000

2010년 3월 9일 화요일

WinDbg(덤프 분석) 설치 및 사용법

WinDbg는 덤프를 분석할때 사용되는 툴이다.

 

즉 커널덤프라던지, 전체 덤프 파일을 읽어서 어디가 잘못 되었는지, 어디가 문제였는지 확인할때 쓰인다.

 

다운로드는 MS에서 직접 다운을 받으면 되고,

주기적으로 버전이 업데이트 되서 나오니... 최신 버전을 다운 받을수 있다.

http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

 

자신의 OS 환경에 맞는 버전을 설치하자.

설치가 완료 되면 아래와 같이 WinDbg를 실행 할수 있게 된다.

 

 

이제 환경 설정을 진행 하자.

우선 WinDbg를 실행 시키고 [File]-[Symbol File Path]를 실행 한다.

 

 

Symbol File Path에 "SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols" 를 입력 한다.

 

 

자~ 이제 기본적인 셋팅은 끝났다.

그외에 [Image File Path]을 설정 할수 있는데 OS의 이미지 경로(OS CD의 i386 폴더)을 선택 해도 되고 안해도 된다.

 

이제 덤프파일을 가져오자!!!

덤프 파일은 블루스크린 및 컴퓨터에 오류가 발생 했을때 생성되며, 만약 생성이 안되어 있다면....

아래 그림과 같이 [내컴퓨터 속성]-[고급]-[시작및 복구 설정] 에 붉은 박스 내용처럼 되어 있는지 확인 하자

 

여기서 커널 메모리, 전체 메모리, 작은 메모리 방식은 어느정도의 자료를 남길것인가로 생각 하면 된다.

작은 메모리는 무엇 때문에 문제가 되었는지는 확인 할수 있으나, 왜 문제가 발생했는지 확인하기 어렵다.

 

저장 경로는 %SystemRoot% => C:\Windows\ 폴더 이다.(Windows가 C드라이버에 설치 되어있을 경우)

 

블루스크린이 발생 할 경우, 또는 심각한 오류에서 복구가 될 경우 덤프파일이 생성 되구

해당 덤프파일을 읽어와서 분석을 해보자!!!

 

우선 [File]-[Open Crash Dump]을 실행해서 MEMORY.DMP 파일을 불러온다.

 

자 그럼 해당 MEMORY.DMP에서 오류 사인을 분석 하게 된다.

우선 아래 덤프 파일은 "ntkrpamp.exe" 파일에서 문제가 발생 한것으로 보인다.

좀더 자세히 알고 싶으면 !analyze -v 를 클릭 또는 kb> 에 !analyze -v 을 입력뒤 엔터를 친다.

 

이제 좀더 정확한 자료들이 표시가 되는데 이미지는 생략 하도록 하겠다.

해당 파일이 누구 모듈인지(개발자가 여러명일때), 또한 인터넷을 통해 해당 파일이 어떤 역할을 하는 파일인지 확인후

담당 개발자에게 해당 덤프파일을 주면 처리 할것이다.

 

만약 자기 자신이 개발한 프로그램에서 이런 증상이 발견 된다면, 문제가 되는 변수, 함수등을 디버거 모드로 컴파일 해가면서

잘못된 부분을 찾아야겠지....^^a

WinDbg를 사용하여 process dump 생성

Process 의 crash, hang 덤프를 수집하기 위해 Debug Diag 또는 adplus.vbs 를 흔히 사용하고 있습니다. 하지만 간혹 프로세스 crash 가 발생하였음에도 불구하고 터미널 세션에서 crash dump 를 수집하지 못하는 경우가 있었습니다. 이런 경우 WinDbg 를 통해서 덤프를 내려받을 수 있습니다. WinDbg 를 사용한 덤프 수집 방법에 대해서 아래와 같이 정리하였습니다.


1. 테스트를 위해 계산기(calc.exe) 프로그램을 실행합니다.
2. WinDbg 실행 - File - Attach to a Process - calc.exe 해당 PID 선택



3. 대상 프로세스(Debuggee)가 정상적으로 Debugger Tool 에 Attach 되면 'g' 명령을 수행하여 Debuggee 가 제어권을 가지도록 넘겨 줍니다.



4. calc.exe 프로세스를 강제 종료합니다. 제어권이 다시 디버거로 돌아옵니다.
eax=00000000 ebx=00000000 ecx=7c7d0000 edx=7c9ae120 esi=7c93de6e edi=00000000
eip=7c93e514 esp=0007fde8 ebp=0007fee4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
ntdll!KiFastSystemCallRet:
7c93e514 c3              ret



5. .dump 명령을 수행하여 메모리 덤프 파일을 내려 받습니다.
0:000> .dump /f d:\calc_crash.dmp
Creating d:\calc_crash.dmp - mini user dump
Dump successfully written

※ /f : Creates a complete memory dump, /o : overwrites an existing dump file  
[참고자료]

Kernel Stack Overflow-Bugcheck Code: 0x7f(0x8, x, y, n) DUMP 분석해 보기 WinDbg

안녕하세요 갱주니입니다.

 

오늘은 할당된 Kernelstack 을 초과 사용하여 BSOD(Bugcheck Code: 0x7f(0x8, x, y, n)) 상황에 대해서 알아보겠습니다.

 

버그 체크 코드가 발생한 상황이 발생하는 경우는 다음과 같습니다.

 

[커널 스택 오버플로우는 스레드별로 12Kbytes 정도로할당되는 제한된 시스템 리소스인 커널 스택영역을 초과하여 사용할 때 발생됩니다]

 

즉, KernelStack OverFlow 가 발생한 경우에는 단일 모듈(함수)내에서 가장 많은 스택을 사용한 모듈의 코드 수정이 필요합니다.

 

그럼 덤프를 간단하게 분석해 보겠습니다.

 

0: kd> kf 100
  Memory  ChildEBP RetAddr 
          ebee3ffc 804de605 hal!KeReleaseQueuedSpinLock+0x10
       20 ebee401c f769b89b nt!ExReleaseResourceLite+0x8d
        c ebee4028 f769d3a9 Ntfs!NtfsReleaseFcb+0x4e
       18 ebee4040 f769b497 Ntfs!NtfsReleaseAllResources+0x62
       18 ebee4058 f769b6e6 Ntfs!NtfsCleanupIrpContext+0x23
       18 ebee4070 f76c0cd3 Ntfs!NtfsCompleteRequest+0x35
      210 ebee4280 f76c0d83 Ntfs!NtfsCommonCleanup+0x2601
      178 ebee43f8 804e33d9 Ntfs!NtfsFsdCleanup+0xcf
       10 ebee4408 f7743bbf nt!IopfCallDriver+0x31
       10 ebee4418 804e33d9 sr!SrCleanup+0xb3
       10 ebee4428 ec631f92 nt!IopfCallDriver+0x31
WARNING: Stack unwind information not available. Following frames may be wrong.
       1c ebee4444 ec62de51 AhnFlt2K+0x4f92
       18 ebee445c 804e33d9 AhnFlt2K+0xe51
       10 ebee446c 8057e627 nt!IopfCallDriver+0x31
       30 ebee449c 80570943 nt!IopCloseFile+0x26b
       30 ebee44cc 80570a96 nt!ObpDecrementHandleCount+0x11b
       28 ebee44f4 805709bc nt!ObpCloseHandleTableEntry+0x14d
       48 ebee453c 80570a06 nt!ObpCloseHandle+0x87
       14 ebee4550 804df99f nt!NtClose+0x1d
        0 ebee4550 804e5487 nt!KiFastCallEntry+0xfc
       7c ebee45cc f7d86552 nt!ZwClose+0x11
      81c ebee4de8 f7d8661d MyDrv!OpenClose+0xc2 [e:\test\mydrv\mydrv.c @ 264]
      fb4 ebee5d9c f7d86648 MyDrv!UseStack2+0x1d [e:\test\mydrv\mydrv.c @ 286]
      fb0 ebee6d4c f7d86678 MyDrv!UseStack1+0x18 [e:\test\mydrv\mydrv.c @ 293]
      fb0 ebee7cfc f7d871c2 MyDrv!BugCheck7F+0x18 [e:\test\mydrv\mydrv.c @ 300]
      f44 ebee8c40 804e33d9 MyDrv!MyDrvDeviceControl+0x312 [e:\test\mydrv\mydrv.c @ 460]

       10 ebee8c50 8057150b nt!IopfCallDriver+0x31
       14 ebee8c64 80582fb1 nt!IopSynchronousServiceTail+0x60
       9c ebee8d00 8058909e nt!IopXxxControlFile+0x5ef
       34 ebee8d34 804df99f nt!NtDeviceIoControlFile+0x2a
        0 ebee8d34 7c93eb94 nt!KiFastCallEntry+0xfc

 

WinDBG 명령어중 kb 또는 kv 대신에 kf를 사용했습니다. ChildEBP 의 변화량을 모듈별로 보는 것입니다. 일일이 손으로 계산해도 상관없으나 kf 명령어를 사용하면 삽질이 필요없습니다

 

맨 왼쪽에 보이는 숫자들이 각 함수가 소진한 스택의 량입니다.
한 눈에 보면 MyDrv 가 문제가 있는 녀석이라고 느껴집니다.
사용한 양을 계산해 보면

 

0: kd> ? 81c + fb4 + fb0 + fb0 + f44
Evaluate expression: 18036 = 00004674

 

우와~~~ 자그마치 18KB 를 사용하고 있습니다.
도대체 뭘 하느라고 스택을 저렇게 사용할까요? 함수 이름도 범상치 않군여... 한번 봅시다.

void UseStack1(void)
{
 char szBuf[4000];

 UseStack2();

아... 네... 지역변수를 4000 바이트 사용했네요. 이런일 없어야 겠습니다.
이 녀석이야 예제라지만 이름이 UseStack 도 아니면서 저렇게 사용하는 경우.... 실제 상황에서 종종 봤습니다.  -_-;;;
4000 바이트 까지야 없겠지만 100 바이트 이상은 많았습니다. 하나의 함수가 사용하는 지역변수 크기의 합이 100 바이트 넘어가면 문제 있다고 보셔야 합니다.
그런 관점에서 Ntfs 저 녀석도 범인으로 봐야 합니다. 스택 사용량이 가장 큰 함수 두개만 더해봐도

 

0: kd> ? 210 + 178
Evaluate expression: 904 = 00000388

거의 1KB 가까이 사용하고 있습니다.

 

MS에서 만든 드라이버 모듈도 커널 스택메모리를 많이 사용하네요 ^^;;;

 

Kernel stack overflow 는 파일 필터 분야에서 늘 있어왔던 문제이고 필터들이 워낙 많기 때문에 우리 드라이버가 사용할 공간이 늘 협소하다고 가정해야 합니다. 함수 하나당 100 바이트 이하로 하는 것을 권장합니다.

 

마지막으로 !analyze -v 를 이용해서 커널 스택 오버플로우를 덤프를 분석하면 마지막 드라이버 모듈에서 호출한 스택정보만 보여주는 경우가 있습니다. 그렇기 때문에 커널 스택 오버플로우(Bugcheck Code: 0x7f(0x8, x, y, n))에서는 꼭 kf 명령어를 이용해서 커널 스택의 전체 메모리 사용량을 확인해 봐야 합니다.^^b

 

출처 : 다년간의 프로그램밍 경험 및 greemate님 자료로 부터(greemate.tistory.com)

[WinDbg] Thread Dump 분석해 보기

어제 회사 동료분께서 점심 먹고 여의도 공원 한바퀴 돌고 오니까 나른해서 졸고 있는데 Hang Dump 분석 도와 달라고 했습니다.

 

 여기서 질문 여러분들은 Hang(CPU 100%)이 발생했을 때 어떻게 분석하세요. 저는 Adplus를 이용해서 프로세스 실행중 덤프를 3번 정도 수집합니다. 그리고 이 덤프를 분석하는 방법을 사용합니다. (Hand 덤프 수집하는 adplus툴 사용법은 이미 제블로그에 있습니다. 관심있는분들은 search 해보세요). 혹시 자신만의 특별한 비법이 있으면 공유해요^^

 

 어제 동료분과 Hang 덤프를 분석하면서 Raw Thread Stack Dump에 대해서 간단하게 정리하면 좋겠다는 생각이 들어서 오늘 블로그에 정리합니다.^^

 

아래 스레드 덤프 분석 단계는 시간이 많이 걸리지만 최후의 방법으로 사용하면 좋습니다.

 

1) 모든 스레드 확인하기

0:000> ~
.  0  Id: 106c.4e4 Suspend: 1 Teb: 7ffde000 Unfrozen
   1  Id: 106c.4e0 Suspend: 1 Teb: 7ffdc000 Unfrozen
   2  Id: 106c.1158 Suspend: 1 Teb: 7ffdb000 Unfrozen
   3  Id: 106c.c3c Suspend: 1 Teb: 7ffd9000 Unfrozen
   4  Id: 106c.1174 Suspend: 1 Teb: 7ffd8000 Unfrozen
   5  Id: 106c.1168 Suspend: 1 Teb: 7ffd4000 Unfrozen
   6  Id: 106c.1568 Suspend: 1 Teb: 7ffaf000 Unfrozen
   7  Id: 106c.1574 Suspend: 1 Teb: 7ffad000 Unfrozen
   8  Id: 106c.964 Suspend: 1 Teb: 7ffac000 Unfrozen
   9  Id: 106c.1164 Suspend: 1 Teb: 7ffab000 Unfrozen
  10  Id: 106c.d84 Suspend: 1 Teb: 7ffaa000 Unfrozen
  11  Id: 106c.bf4 Suspend: 1 Teb: 7ffa9000 Unfrozen
  12  Id: 106c.eac Suspend: 1 Teb: 7ffa8000 Unfrozen

 

~


  33  Id: 106c.4f0 Suspend: 1 Teb: 7ff49000 Unfrozen
  34  Id: 106c.be8 Suspend: 1 Teb: 7ffae000 Unfrozen
  35  Id: 106c.14e0 Suspend: 1 Teb: 7ff5d000 Unfrozen
  36  Id: 106c.fe0 Suspend: 1 Teb: 7ff5b000 Unfrozen
  37  Id: 106c.1470 Suspend: 1 Teb: 7ff57000 Unfrozen
  38  Id: 106c.16c4 Suspend: 1 Teb: 7ff5e000 Unfrozen

 

2)의심스러운 스레든 teb(thread environment block) 확인하기

0:000> !teb 7ffad000
TEB at 7ffad000
    ExceptionList:        0181ff0c
    StackBase:            01820000
    StackLimit:           0181c000

    SubSystemTib:         00000000
    FiberData:            00001e00
    ArbitraryUserPointer: 00000000
    Self:                 7ffad000
    EnvironmentPointer:   00000000
    ClientId:             0000106c . 00001574
    RpcHandle:            00000000
    Tls Storage:          00000000
    PEB Address:          7ffdf000
    LastErrorValue:       0
    LastStatusValue:      c000000d
    Count Owned Locks:    0
    HardErrorMode:        0

 

3)dps를 이용해서 스레드 스택 영역(일정 범위) 메모리 내용 확인하기

0:000> dps 0181c000 01820000
0181c000  00000000
0181c004  00000000
0181c008  00000000
0181c00c  00000000
0181c010  00000000
0181c014  00000000
0181c018  00000000
0181c01c  00000000
0181c020  00000000
0181c024  00000000
...
...
...
0181ffb8  0181ffec
0181ffbc  77e6608b kernel32!BaseThreadStart+0x34
0181ffc0  00f31eb0
0181ffc4  00000000
0181ffc8  00000000
0181ffcc  00f31eb0
0181ffd0  8a38f7a8
0181ffd4  0181ffc4
0181ffd8  88a474b8
0181ffdc  ffffffff
0181ffe0  77e6b7d0 kernel32!_except_handler3
0181ffe4  77e66098 kernel32!`string'+0x98

0181ffe8  00000000
0181ffec  00000000
0181fff0  00000000
0181fff4  7923a709
0181fff8  00f31eb0
0181fffc  00000000
01820000  ????????

 

드디어 의심 가는 부분을 찾았습니다.( 빨간색 글씨로 적힌 부분 )

덤프를 보니 아마도 우리가 가장 실수를 많이 하는 스트링 버퍼 조작에 오류가 있는것 같습니다.

이제는 소스코드를 봐서 스트링 조작하는 부분을 확인하는 일이 남았네요. ^^

 

출처: 다년간의 프로그램밍 경험(삽질) & http://www.dumpanalysis.org(참고사이트)

Windbg help. 번역 <Crash Dump Files>

Crash Dump Files


크래쉬 덤프 파일은 특정한 메모리 영역과 어플리케이션이나 운영체제와 관련된 데이터의 snapshot을 가지고 있는 파일이다. 크래쉬 덤프 파일은 저장할 수 있기 때문에 문제가 발생한 시점 이후에 언제든지 어플리케이션이나 운영체제를 디버깅하는데 사용할 수 있다.

 user-mode 크래쉬 덤프 파일은 어플리케이션에 오류가 발생하면 윈도우에 의해서 생성되고, kernel-mode 크래쉬 덤프 파일은 윈도우 자체에 오류가 발생했을 때 윈도우의 특별한 routine에 의해서 생성된다. 이에 대한 자세한 설명이 이어질 것이다.

 

1.     User-Mode Dump files

A.     User-mode dump file의 종류

User-mode dump 파일은 몇 가지 종류가 있고, 다음 두 가지 분류로 나눌 수 있다.

Full User-Mode Dumps

Minidumps

이 두 가지 덤프 파일의 차이점은 덤프 파일의 크기이다. Minidump는 보통 더욱 간결해서 덤프 분석을 위해서 쉽게 전달할 수 있다.

 

>주의. 많은 정보가 dump 파일을 분석하면서 얻어질 수 있지만, 실제로 디버거를 사용해서 직접 crash를 디버깅하는 것만큼 많은 정보를 제공해주는 덤프 파일은 없다.

 

                         i.         Full User-Mode Dumps

full user-mode dump는 기본적인 user-mode 덤프 파일이다.

이 파일은 프로세스의 전체 메모리 공간, 프로그램의 실행 파일 이미지, 핸들 테이블, 그 밖에 디버깅에 유용한 여러 정보를 포함한다.

full user-mode dump 파일은 minidump로 축소시킬 수 있다. 단순히 디버거에 덤프 파일을 로드하고 '.dump' 커맨드를 사용하여 새로운 minidump 형식의 덤프 파일을 저장한다.

note. minidump라는 이름에도 불구하고, 가장 큰 minidump는 실제로 full user-mode dump보다 더 많은 정보를 가진다. 예를 들면, .dump /mf 혹은 .dump /ma .dump /f보다 더 크고 많은 정보를 가진 덤프 파일을 생성한다.

user mode에서는 .dump /m[MiniOptions]이 가장 좋은 선택이다. 이 옵션 스위치를 사용하여 생성된 덤프 파일은 크기가 다양할 수 있다. 적절한 MiniOptions을 사용하여 포함될 정보를 명확하게 조절할 수 있다.

 

                        ii.         Minidumps

어떤 프로세스와 관련된 메모리에서 선택된 부분적인 정보를 가지고 있는 user-mode dump 파일을 minidump라고 부른다. minidump 파일의 크기와 내용은 덤프의 대상이 되는 프로그램과 덤프를 만드는 어플리케이션에 따라서 다양하다. minidump 파일은 아주 크고 전체 메모리와 핸들 테이블을 포함하는 경우도 있고, 어쩔 때는 이보다 확연히 작을수도 있다. 예를 들면, minidump 파일은 싱글 스레드에 대한 정보 혹은 실제로 참조되고 있는 모듈의 스택에 존재하는 정보만을 가지고 있을 수도 있다. 가장 큰 minidump 파일은 실제로 full user-dump보다 더 많은 정보를 가지고 있기 때문에 'minidump'라는 이름은 오해를 가져올 소지가 있다. 예를 들면, .dump /mf 혹은 .dump /ma .dump /f보다 더 많은 정보를 가지고 있는 덤프 파일을 만들어 낼 것이다. 이러한 이유 때문에, user-mode 덤프 파일을 생성할 때는 .dump /f보다는 .dump /m[MiniOption]를 사용하길 권장한다.

만약 디버거를 사용해서 minidump 파일을 생성하려고 한다면, 좀 더 정밀하게 포함되는 정보를 선택할 수 있다. 단순히 .dump /m 커맨드를 사용한다면 target process를 구성하는 로드된 모듈, thread 정보, 그리고 스택 정보에 대한 기본적인 정보만을 포함한 덤프를 만들어 낸다. 이것은 다음 옵션들에 의해서 변경될 수 있다.

 

 옵션

 덤프에 미치는 영향

/ma

minidump의 모든 추가적인 옵션을 사용하는 것과 같은 효과를 낸다. /ma 옵션은 /mfFhut와 같다. 이것은 full memory data, 핸들 데이터, 로딩되지 않은 모듈 정보, 기본적인 메모리 정보, 그리고 thread time 정보를 덤프 파일에 포함시킨다.

/mf

minidump 파일에 full memory data를 추가한다. target 어플리케이션이 소유하는 모든 접근 가능한 commit된 페

이지를 포함한다.

/mF

minidump 파일에 메모리에 대한 모든 기본적인 정보를 추가한다. 이것은 유효한 메모리에 대한 정보만이 아니라 모든 메모리에 대한 기본적인 정보를 포함시킨다. 이것은 minidump를 가지고 디버깅을 할 때, 디버거가 프로세스에 대한 완전한 virtual memory layout을 재구성할 수 있도록 해준다.

/mh

minidump target process와 관련된 핸들에 대한 정보를 추가한다

/mu

minidump에 로딩되지 않은 모듈에 대한 정보를 추가한다. 이것은 오직 Windows Server 2003과 그 이후 버전의 윈도우에서만 사용할 수 있다.

/mt

minidump에 추가적인 thread 정보를 추가한다. 여기에는 minidump를 디버깅할 때 .ttime 커맨드에 의해서 표시되는 thread time이 포함된다.

/mi

Secondary memory minidump 파일에 추가한다. secondary memory라는 것은 스택이나 backing store에 있는 포인터에 의해서 참조되는 메모리와 그 포인터가 가르키는 주소 근처의 약간의 지역을 뜻한다. (역자주: backing store paging이나 swapping 시스템에 의해서 main memory에서 밀려 난 데이터들을 저장하는, 일반적으로 하드디스크의 특정 부분을 의미한다.)

/mp

Process Environment Block(PEB) Thread Environment Block(TEB) 데이터를 minidump에 추가한다. 이것은 어플리케이션의 프로세스나 thread에 관련된 Windows 시스템 정보에 접근할 필요가 있을 때 유용하다.

/mw

모든 commit read-write private page minidump에 추가한다.

/md

executable 이미지에 있는 모든 read-write 데이터 세그먼트를 minidump에 추가한다.

/mc

이미지에 있는 코드 섹션을 추가한다.

/mr

minidump에서 스택 추적(stack trace)을 재생성하는데 불필요한 스택이나 store memory의 일부분을 제거한다. 또한 로컬 변수나 다른 데이터 타입의 값들도 삭제된다. 이 옵션은 minidump를 더 작게 만들지는 않는다.(이러한 메모리 섹션은 단지 0으로 채워진다.) 이 옵션은 다른 어플리케이션의 privacy를 보호하기 원할 때 유용하다.

/mR

minidump에서 full module path를 삭제한다. 오직 모듈 이름만 포함된다. 이 옵션은 사용자의 디렉토리 구조에 관련된 privacy를 보호하기를 원할 때 유용하다.

/mk "FileName"

Windows Vista only) user-mode minidump에 더하여 kernel-mode minidump도 생성한다. kernel-mode minidump user-mode minidump에 저장되어 있는 thread에 대한 dump로 제한된다. FileName은 따옴표로 둘러 싸여야 한다.

 

이 옵션들은 혼합되어 사용될 수 있다. 예를 들면, .dump /mfiu 커맨드는 확실히 용량이 큰 minidump를 만든느 데 사용할 수 있고, .dump /mrR은 사용자의 privacy를 보호할 수 있는 minidump를 만드는데 사용할 수 있다. 더욱 완전하고 자세한 문법을 위해서는 .dump 커맨드에 대한 섹션을 참조하시오.(이후에 번역하겠음).

minidump 파일의 자세한 내부 구조는 Microsoft Windows SDK에 있는 DbgHelp reference에 있다.

[ORA-01001~ORA01197]Error

[펌] [ORA-01001~ORA01197]Error | 낙서장 2005/06/30 22:49
http://blog.naver.com/case0062/80014560164
출처블로그 : 배설물(排泄物)

ORA-01001 invalid cursor

Cause: Either a host language program call specified an invalid cursor or the value of the MAXOPENCURSORS option in the precompiler command were too small. All cursors must be opened using the OOPEN call before being referenced in any of the following calls: SQL, DESCRIBE, NAME, DEFINE, BIND, EXEC, FETCH, and CLOSE. The Logon Data Area (LDA) must be defined by using OLON or OLOGON. If the LDA is not defined, this message is issued for the following calls: OPEN, COM, CON, ROL, and LOGOFF.

Action: Check the erroneous call statement. Specify a correct LDA area or open the cursor as required. If there is no problem with the cursor, it may be necessary to increase the MAXOPENCURSORS option value before precompiling.


ORA-01002 fetch out of sequence

Cause: In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.

Action: Parse and execute a SQL statement before attempting to fetch the data.


ORA-01003 no statement parsed

Cause: A host language program call referenced a cursor with no associated parsed SQL statement. A SQL call (for example, OSQL3) must be used to pass a SQL statement to Oracle and to associate the statement with an open cursor. A cursor must already have an associated SQL statement if referenced in any of the following calls: DESCRIBE, NAME, DEFINE, BIND, EXECUTE, and FETCH.

Action: Do the SQL call, for example, OSQL, to pass the required SQL statement before referencing the cursor.


ORA-01004 default username feature not supported; logon denied

Cause: An attempt was made to use automatic logon on a system not supporting this feature.

Action: Provide the complete username and password to log on to Oracle.


ORA-01005 null password given; logon denied

Cause: An invalid password was given when logging on.

Action: Provide a valid password.


ORA-01006 bind variable does not exist

Cause: A program issued a BIND call for a variable not listed in the associated SQL statement. Only those variables prefixed by either a colon (:) or ampersand (&) in the SQL statement may be referenced in a BIND call, OBIND or OBINDN. This error may also be caused by a mismatch between a Precompiler program and the related library, SQLLIB.

Action: Modify the BIND call to reference one of the substitute variables specified in the associated SQL statement.


ORA-01007 variable not in select list

Cause: A reference was made to a variable not listed in the SELECT clause. In OCI, this can occur if the number passed for the position parameter is less than one or greater than the number of variables in the SELECT clause in any of the following calls: DESCRIBE, NAME, or DEFINE. In SQL*Forms or SQL*Report, specifying more variables in an INTO clause than in the SELECT clause also causes this error.

Action: Determine which of the problems listed caused the problem and take appropriate action.


ORA-01008 not all variables bound

Cause: A SQL statement containing substitution variables was executed without all variables bound. All substitution variables must have a substituted value before the SQL statement is executed.

Action: In OCI, use an OBIND or OBINDN call to substitute the required values.


ORA-01009 missing mandatory parameter

Cause: A host language program call did not pass all required parameters.

Action: Check the syntax for the call and enter all required parameters.


ORA-01010 invalid OCI operation

Cause: One of the following:

You attempted an invalid OCI operation.
You are using an Oracle client application linked with release 7.1 (or higher) libraries, the environment variable ORA_ENCRYPT_LOGIN is set to TRUE, and you attempted to connect to a release 7.0 (or lower) Oracle database server.
You are connected to a release 7.1 (or higher) Oracle database server, the DBLINK_ENCRYPT_LOGIN initialization parameter is set to TRUE, and you attempted to use a database link pointing to a release 7.0 (or lower) Oracle database server.
You are connected to a release 9.0.2(or higher) Oracle database server and you attempted to use a database link pointing to a release 9.0.1 (or lower) Oracle database server for distributed autonomous transactions.
Action: For the above causes:

Do not use the invalid OCI operation.
If you do not wish to use encrypted connect passwords in your distributed database, then set ORA_ENCRYPT_LOGIN to FALSE. If you wish to use encrypted connect passwords, then you must upgrade all Oracle database servers to release 7.1 (or higher).
If you do not wish to use encrypted database links in your distributed database, then set DBLINK_ENCRYPT_LOGIN to FALSE. If you wish to use encrypted database links, then you must upgrade all Oracle database servers to release 7.1 (or higher).
Do not attempt distributed autonomous transactions on release 9.0.1 (or lower) Oracle database servers.

ORA-01011 cannot use v7 compatibility mode when talking to v6 server

Cause: An attempt was made to use Oracle7 compatibility mode when accessing Oracle version 6.

Action: Use V6 SQL language type. You may need to use the SET COMPATIBILITY V6 command.


ORA-01012 not logged on

Cause: A host language program issued an Oracle call, other than OLON or OLOGON, without being logged on to Oracle. This can occur when a user process attempts to access the database after the instance it is connected to terminates, forcing the process to disconnect.

Action: Log on to Oracle, by calling OLON or OLOGON, before issuing any Oracle calls. When the instance has been restarted, retry the action.


ORA-01013 user requested cancel of current operation

Cause: The user interrupted an Oracle operation by entering CTRL-C, Control-C, or another canceling operation. This forces the current operation to end. This is an informational message only.

Action: Continue with the next operation.


ORA-01014 ORACLE shutdown in progress

Cause: A user tried to log on to Oracle while an instance shutdown was in progress. Oracle logons are disabled while Oracle is being shut down.

Action: Wait until Oracle is brought back up before attempting to log on.


ORA-01015 logon called recursively

Cause: This is an internal error message not usually issued.

Action: Contact Oracle Support Services.


ORA-01016 This function can be called only after a fetch

Cause: The cursor is in an invalid state.

Action: Ensure the appropriate OCI/UPI function is called after the fetch and before the offending function.


ORA-01017 invalid username/password; logon denied

Cause: An invalid username or password was entered in an attempt to log on to Oracle. The username and password must be the same as was specified in a GRANT CONNECT statement. If the username and password are entered together, the format is: username/password.

Action: Enter a valid username and password combination in the correct format.


ORA-01018 column does not have a LONG datatype

Cause: An attempt was made to fetch data using the LONG fetch option, but the specified column was not LONG.

Action: Re-execute the fetch without the LONG fetch option or create the table with a LONG column.


ORA-01019 unable to allocate memory in the user side

Cause: The user side memory allocator returned an error.

Action: Increase the size of the process heap or switch to the old set of calls.


ORA-01020 unknown context state

Cause: This is an internal error message not usually issued.

Action: Contact Oracle Support Services.


ORA-01021 invalid context size specified

Cause: This is an internal error message not usually issued.

Action: Contact Oracle Support Services.


ORA-01022 database operation not supported in this configuration

Cause: The attempted database operation does not conform to the user programming interface (UPI) for the two communicating Oracle servers.

Action: You may need to upgrade one or more of your Oracle servers or re-link your user side application with new libraries. Report the problem to Oracle Support Services.


ORA-01023 Cursor context not found (Invalid cursor number)

Cause: The cursor number is not a valid open cursor.

Action: Make sure that the cursor is open.


ORA-01024 invalid datatype in OCI call

Cause: An OCI program call specified an invalid datatype. In OCI calls, Oracle datatypes are specified as numbers between 1 and 7.

Action: Check the datatype description and enter the correct number for the datatype.


ORA-01025 UPI parameter out of range

Cause: An integer parameter to a UPI function is out of range.

Action: This usually indicates an error in a tool built on top of the Oracle DBMS. Report the error to Oracle Support Services.


ORA-01026 multiple buffers of size > 4000 in the bind list

Cause: More than one long buffer in the bind list.

Action: Change the buffer size to be less than 4000 for the bind variable bound to a normal column.


ORA-01027 bind variables not allowed for data definition operations

Cause: An attempt was made to use a bind variable in a SQL data definition operation.

Action: Such bind variables are not allowed.


ORA-01028 internal two task error

Cause: Received send long message but do not have the cursor context.

Action: Contact Oracle Support Services.


ORA-01029 internal two task error

Cause: Received a request to send the long again when there is no long

Action: Contact Oracle Support Services.


ORA-01030 SELECT ... INTO variable does not exist

Cause: The SELECT... INTO specified in the bind call does not correspond to a variable in the SQL statement.

Action: If it is not possible to correct the statement, then contact Oracle Support Services.


ORA-01031 insufficient privileges

Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges.

Action: Ask the database administrator to perform the operation or grant the required privileges.


ORA-01032 no such userid

Cause: This is an internal error message related to Export/Import.

Action: Contact Oracle Support Services.


ORA-01033 ORACLE initialization or shutdown in progress

Cause: An attempt was made to log on while Oracle is being started or shut down.

Action: Wait a few minutes. Then retry the operation.


ORA-01034 ORACLE not available

Cause: Oracle was not started. Possible causes include the following:

The SGA requires more space than was allocated for it.
The operating-system variable pointing to the instance is improperly defined.
Action: Refer to accompanying messages for possible causes and correct the problem mentioned in the other messages. If Oracle has been initialized, then on some operating systems, verify that Oracle was linked correctly. See the platform-specific Oracle documentation.


ORA-01035 ORACLE only available to users with RESTRICTED SESSION privilege

Cause: Logins are disallowed because an instance started in restricted mode. Only users with RESTRICTED SESSION system privilege can log on.

Action: Request that Oracle be restarted without the restricted option or obtain the RESTRICTED SESSION system privilege.


ORA-01036 illegal variable name/number

Cause: Unable to find bind context on user side.

Action: Make sure that the variable being bound is in the SQL statement.


ORA-01037 maximum cursor memory exceeded

Cause: An attempt was made to process a complex SQL statement which consumed all available memory of the cursor.

Action: Simplify the complex SQL statement. Alternatively, you can use the NO_EXPAND hint which prevents the cost-based optimizer from considering OR-expansion for queries having OR conditions or INLISTS in the WHERE clause. Usually, the optimizer considers using OR expansion and uses this method if it decides the cost is lower than not using it. Refer to the Oracle9i Database Performance Tuning Guide and Reference for information about using hints.


ORA-01038 cannot write database file version string with ORACLE version string

Cause: An attempt was made to write datafile headers in an old format. The new format cannot be used until after the database has been verified as being compatible with this software version.

Action: Open the database to advance to the new file formats, then repeat the operation. If the operation is required before the database can be opened, then use the previous software release to do the operation.


ORA-01039 insufficient privileges on underlying objects of the view

Cause: An attempt was made to explain plan on other people's view without the necessary privileges on the underlying objects of the view.

Action: Get necessary privileges or do not perform the offending operation.


ORA-01040 invalid character in password; logon denied

Cause: There are multibyte characters in the password or some characters in the password are not in US7ASCII range.

Action: Resubmit the password with valid characters.


ORA-01041 internal error. hostdef extension doesn't exist

Cause: Pointer to HSTDEF extension in HSTDEF is null.

Action: Contact Oracle Support Services.


ORA-01042 detaching a session with open cursors not allowed

Cause: An attempt was made to detach a session which had open cursors.

Action: Close all the cursors before detaching the session.


ORA-01043 user side memory corruption [string], [string], [string], [string]

Cause: The application code corrupted some of the user memory used by Oracle.

Action: Make sure that the application code is not overwriting memory.


ORA-01044 size string of buffer bound to variable exceeds maximum string

Cause: An attempt was made to bind a buffer whose total size would exceed the maximum size allowed. Total array size for arrays is calculated as:

(element_size)*(number of elements)


Action: Reduce the buffer size.


ORA-01045 user string lacks CREATE SESSION privilege; logon denied

Cause: A connect was attempted to a userid which does not have create session privilege.

Action: Grant the user CREATE SESSION privilege.


ORA-01046 cannot acquire space to extend context area

Cause: Oracle could not extend the current area any further because the operating system would not supply any more space. A system-specific message should appear following this message.

Action: Close some cursors and try again or check operating system quotas to use more virtual memory. See your operating system-specific Oracle documentation.


ORA-01047 The above error occurred in schema=string, package=string, procedure=string

Cause: This message is displayed after a previous message to provide more specific information.

Action: See the cause and action for the previous message.


ORA-01048 Couldn't find the specified procedure in the given context

Cause: The procedure user specified in deferred RPC does not exist.

Action: Check to make sure that the procedure exists and is visible to the replication process.


ORA-01049 Bind by name is not supportted in streamed RPC

Cause: This error occurs when a newer server version requests from an older server version an operation that is not supported.

Action: You may need to upgrade one or more of your Oracle servers or relink your user application with new libraries.


ORA-01050 cannot acquire space to open context area

Cause: Oracle could not open a new context area because the operating system would not supply any more space. A system-specific message should appear following this message.

Action: Close some cursors and try again or check operating system quotas to use more virtual memory. See your operating system-specific Oracle documentation.


ORA-01051 deferred rpc buffer format invalid

Cause: The deferred RPC data in SYS.DEF$_CALL is corrupted.

Action: Contact Oracle Support Services.


ORA-01052 required destination LOG_ARCHIVE_DUPLEX_DEST is not specified

Cause: A valid destination for parameter LOG_ARCHIVE_DUPLEX_DEST was not specified when parameter LOG_ARCHIVE_MIN_SUCCEED_DEST was set to 2.

Action: Either specify a value for parameter LOG_ARCHIVE_DUPLEX_DEST, or reduce the value for parameter LOG_ARCHIVE_MIN_SUCCEED_DEST to 1.


ORA-01053 user storage address cannot be read

Cause: A bind variable or other user area could not be read by Oracle.

Action: Check that binds are done correctly on valid user buffers, then retry the operation.


ORA-01054 user storage address cannot be written

Cause: A define, FETCH... INTO or SELECT... INTO, variable or other user area could not be written to by Oracle.

Action: Check that INTO variables and indicators are correctly specified. Then retry the operation.


ORA-01057 invalid or ambiguous block.field reference in user exit

Cause: The reference to a block.field identifier in a user exit is incorrect or ambiguous, probably because it is misspelled or incomplete.

Action: Check syntax and identifier spelling. Then correct the reference.


ORA-01058 internal New Upi interface error

Cause: Attempt to delete non-existent HSTDEF extension.

Action: Contact Oracle Support Services.


ORA-01059 parse expected before a bind or execute

Cause: The client application attempted to bind a variable or execute a cursor opened in a PL/SQL block before the statement was parsed.

Action: Ensure the statement is parsed before a bind or execute.


ORA-01060 array binds or executes not allowed

Cause: The client application attempted to bind an array of cursors or attempted to repeatedly execute against a PL/SQL block with a bind variable of type cursor.

Action: Bind a single cursor or execute the PL/SQL block once.


ORA-01061 cannot start up a V8 server using a V7 client application

Cause: You are using an Oracle client application linked with version 7 (or lower) libraries and you attempted to start up a V8 (or higher) server.

Action: Use a client application linked with V8 (or higher) libraries.


ORA-01062 unable to allocate memory for define buffer

Cause: Exceeded the maximum buffer size for current platform.

Action: Use piecewise fetch with a smaller buffer size.


ORA-01070 Using an old version of Oracle for the server

Cause: An attempt was made to run an older, obsolete Oracle Server.

Action: Upgrade the server.


ORA-01071 cannot perform operation without starting up ORACLE

Cause: An attempt was made to perform an operation before Oracle was started.

Action: Start Oracle. Then retry the operation.


ORA-01072 cannot stop ORACLE; ORACLE not running

Cause: An attempt was made to stop Oracle, but Oracle was not running.

Action: No action required.


ORA-01073 fatal connection error: unrecognized call type

Cause: An illegal internal operation was attempted.

Action: Contact Oracle Support Services.


ORA-01074 cannot shut down ORACLE; inside a login session - log off first

Cause: An attempt was made to shut down Oracle inside a logon session.

Action: Log off before shutting down Oracle.


ORA-01075 you are currently logged on

Cause: An attempt was made to log on while already logged on.

Action: No action required.


ORA-01076 multiple logons per process not yet supported

Cause: Oracle does not support multiple logons per process.

Action: No action required.


ORA-01077 background process initialization failure

Cause: A failure occurred during initialization of the background processes.

Action: Refer to the diagnostic information in the accompanying message stack or in the trace file and take appropriate action.


ORA-01078 failure in processing system parameters

Cause: Failure during processing of initialization parameters during system startup.

Action: Further diagnostic information should be in the error stack.


ORA-01079 ORACLE database was not properly created, operation aborted

Cause: There was an error when the database or control file was created.

Action: Check what error was signaled when the database was first created or when the control file was re-created. Take appropriate actions to re-create the database or a new control file.


ORA-01080 error in shutting down ORACLE

Cause: A failure occurred during system shutdown.

Action: Refer to the diagnostic information in the accompanying message stack and take appropriate action.


ORA-01081 cannot start already-running ORACLE - shut it down first

Cause: An attempt was made to start Oracle while it was already running.

Action: Shut down Oracle first, if you want to restart it.


ORA-01082 'row_locking = always' requires the transaction processing option

Cause: "row_locking = always" is specified in the INIT.ORA file. This feature is not supported by ORACLE without the transaction processing option.

Action: Remove it from INIT.ORA file or set it to "default" or "intent".


ORA-01083 value of parameter "string" is inconsistent with that of other instances

Cause: The value of the given initialization parameter is required to be the same for all instances in the cluster database configuration.

Action: Change the value of the initialization parameter in the initialization parameter file to match that of other cluster database instances.


ORA-01084 invalid argument in OCI call

Cause: The failing OCI call contains an argument with an invalid value.

Action: Use valid argument values. For more information, see the Oracle Call Interface Programmer's Guide and the appropriate programming language supplement.


ORA-01085 preceding errors in deferred rpc to "string.string.string"

Cause: Errors were encountered when the named procedure was executed as a deferred remote procedure call.

Action: Correct the cause of the preceding errors.


ORA-01086 savepoint 'string' never established

Cause: An attempt was made to roll back to a savepoint that was never established.

Action: No action is required.


ORA-01087 cannot start up ORACLE - currently logged on

Cause: An attempt was made to start up Oracle by a user who is currently logged on.

Action: Log off. Then issue the STARTUP command.


ORA-01088 cannot shut down ORACLE while active processes exist

Cause: Users are still logged into the instance.

Action: Either wait for all users to logoff or use SHUTDOWN IMMEDIATE.


ORA-01089 immediate shutdown in progress - no operations are permitted

Cause: The SHUTDOWN IMMEDIATE command was used to shut down a running Oracle instance, terminating any active operations.

Action: Wait for the instance to be restarted or contact the database administrator.


ORA-01090 shutdown in progress - connection is not permitted

Cause: The SHUTDOWN command was used to shut down a running Oracle instance, disallowing any connects to Oracle.

Action: Wait for the instance to restart or contact the database administrator.


ORA-01091 failure during startup force

Cause: Unable to destroy the old SGA.

Action: Manually remove the old SGA. See your operating system-specific Oracle documentation for instructions. Then retry the STARTUP command.


ORA-01092 ORACLE instance terminated. Disconnection forced

Cause: The instance connected to was terminated abnormally, probably due to a SHUTDOWN ABORT. The current process was forced to disconnect from the instance.

Action: Examine the alert log for more details. Contact the database administrator to determine when the instance is restarted. Attempt to reconnect after the instance is running again.


ORA-01093 ALTER DATABASE CLOSE only permitted with no sessions connected

Cause: There is at least one more session, other than the current one, logged in to the instance. ALTER DATABASE CLOSE is not permitted when other sessions are active.

Action: Find the other sessions and disconnect them. Then reissue the ALTER DATABASE CLOSE statement. Also, issue the SHUTDOWN IMMEDIATE command to force users off the system, or issue the SHUTDOWN ABORT command to shut down the database without waiting for users to be forced off.


ORA-01094 ALTER DATABASE CLOSE in progress. Connections not permitted

Cause: An attempt was made to connect while the database is being closed with the ALTER DATABASE CLOSE statement.

Action: Attempt to connect again when the database is open. Contact the database administrator to find out when the database will be open.


ORA-01095 DML statement processed zero rows

Cause: A DML cursor from the OTEX() call processed 0 rows when executed.

Action: Caller can either do a rollback or ignore the message and execute the rest of the cursors in the cursor array.


ORA-01096 program version (string) incompatible with instance (string)

Cause: The program was linked with a different version of the server than the instance to which it is attempting to connect.

Action: Relink the program against the same version of Oracle as the instance or restart (startup force) the database using the program's version of the SERVER.


ORA-01097 cannot shutdown while in a transaction - commit or rollback first

Cause: An attempt was made to shut down the database while a transaction was in progress.

Action: Either commit or rollback the current transaction and then attempt to shut down the database.


ORA-01098 program Interface error during Long Insert

Cause: The application program interface could not insert or update a LONG column because of an internal error when a TTCGETV call fails. For example, a network read error or one of the parameters passed to the call is invalid.

Action: Retry the insert or update.


ORA-01099 cannot mount database in SHARED mode if started in single process mode

Cause: An attempt was made to mount a database in parallel mode with the initialization parameter SINGLE_PROCESS set to TRUE.

Action: Either mount the database in EXCLUSIVE mode or set the initialization parameter SINGLE_PROCESS to FALSE before starting the instance in parallel (shared) mode.


ORA-01100 database already mounted

Cause: An attempt was made to mount a database with the name of a currently mounted database.

Action: No action is required.


ORA-01101 database being created currently mounted by some other instance

Cause: Some other instance has the database of same name currently mounted and you are trying to create it.

Action: Either change the database name or shut down the other instance.


ORA-01102 cannot mount database in EXCLUSIVE mode

Cause: Some other instance has the database mounted exclusive or shared.

Action: Shut down the other instance or mount in a compatible mode.


ORA-01103 database name 'string' in controlfile is not 'string'

Cause: The database name in the control file does not match your database name.

Action: Either find the correct control file or change your database name.


ORA-01104 number of controlfiles (string) does not equal string

Cause: The number of control files used by this instance disagrees with the number of control files in an existing instance.

Action: Check to make sure that all control files are listed.


ORA-01105 mount is incompatible with mounts by other instances

Cause: An attempt to mount the database discovered that another instance mounted a database by the same name, but the mount is not compatible. Additional errors are reported explaining why.

Action: See accompanying errors.


ORA-01106 database must be closed before dismounting

Cause: An attempt was made to dismount a database before it was closed.

Action: Close the database, then retry the operation.


ORA-01107 database must be mounted for media recovery

Cause: An attempt to perform media recovery was made but the database is not mounted.

Action: Mount the database.


ORA-01108 file string is in backup or media recovery"

Cause: Either media recovery is actively being applied to the file, or it is being backed up while the database is in NOARCHIVELOG mode. It cannot be used for normal database access or crash recovery.

Action: Complete or cancel the media recovery session or backup.


ORA-01109 database not open

Cause: A command was attempted that requires the database to be open.

Action: Open the database and try the command again.


ORA-01110 data file string: 'string'

Cause: This message reports the file name involved with other messages.

Action: See the associated messages for a description of the problem.


ORA-01111 name for data file string is unknown - rename to correct file

Cause: The datafile was missing from a CREATE CONTROLFILE command or BACKUP CONTROLFILE RECOVERY was done with a control file that was saved before the file was created.

Action: Rename the MISSING file to the name of the real file.


ORA-01112 media recovery not started

Cause: An attempt to continue media recovery is being made but media recovery was not started.

Action: No action is required.


ORA-01113 file string needs media recovery

Cause: An attempt was made to open a datafile that is in need of media recovery.

Action: First apply media recovery to the datafile identified in the message, then retry the operation.


ORA-01114 IO error writing block to file string (block # string)

Cause: The device on which the file resides is probably offline. If the file is a temporary file, then it is also possible that the device has run out of space. This could happen because disk space of temporary files is not necessarily allocated at file creation time.

Action: Restore access to the device or remove unnecessary files to free up space.


ORA-01115 IO error reading block from file string (block # string)

Cause: The device on which the file resides is probably off line.

Action: Restore access to the device, then retry the operation.


ORA-01116 error in opening database file string

Cause: Usually the file is not accessible.

Action: Make sure the datafile is in the expected location and can be accessed properly, then retry the operation.


ORA-01117 adding file 'string' with illegal block size: string; limit is string

Cause: An attempt was made to add a datafile with a block size that is greater than the maximum block size allowed.

Action: Retry the operation with a smaller block size.


ORA-01118 cannot add any more database files: limit of string exceeded

Cause: An attempt to add a datafile failed because the limit for such files had already been reached.

Action: If more database space is required, export the database and re-create it with a higher limit for datafiles and perhaps increased file size.


ORA-01119 error in creating database file 'string'

Cause: Insufficient space on device.

Action: Decrease the size of the requested file or allocate a file on another device with more available space. If a file size was not specified in the statement, then specify a file size smaller than the available space on the device.


ORA-01120 cannot remove online database file string

Cause: An attempt was made to drop a datafile when it is online.

Action: Take file offline before dropping.


ORA-01121 cannot rename database file string - file is in use or recovery

Cause: An attempt was made to use ALTER DATABASE RENAME to rename a datafile that is online in an open instance or is being recovered.

Action: Close database in all instances and end all recovery sessions.


ORA-01122 database file string failed verification check

Cause: The information in this file is inconsistent with information from the control file. See accompanying message for reason.

Action: Make certain that the database files and control files are the correct files for this database.


ORA-01123 cannot start online backup; media recovery not enabled

Cause: An attempt to start backup of an online tablespace failed because media recovery is not enabled.

Action: Enable media recovery and retry this operation.


ORA-01124 cannot recover data file string - file is in use or recovery

Cause: An attempt to do media recovery found that the file was not available for recovery. Either it is online and the database is open in some instance, or another process is currently doing media recovery on the file.

Action: Do not do media recovery.


ORA-01125 cannot disable media recovery - file string has online backup set

Cause: An attempt to disable media recovery found that an online backup is still in progress.

Action: End the backup of the offending tablespace and retry this command.


ORA-01126 database must be mounted EXCLUSIVE and not open for this operation

Cause: An operation failed because the database was not mounted in exclusive mode.

Action: Shut down Oracle and mount the database in exclusive mode.


ORA-01127 database name 'string' exceeds size limit of string characters

Cause: The specified database name is too long.

Action: Shorten the database name to eight characters or fewer, then retry the operation.


ORA-01128 cannot start online backup - file string is offline

Cause: An attempt to start an online backup found that one of the files is offline.

Action: Bring the offending files online and retry this command or do a cold backup.


ORA-01129 user's default or temporary tablespace does not exist

Cause: The user's default or temporary tablespace was dropped.

Action: Reassign the default or temporary tablespace.


ORA-01130 database file version string incompatible with ORACLE version string

Cause: The named datafile was created under an incompatible version of Oracle, or the file is invalid or non-existent.

Action: Shut down and restart the correct version of Oracle or check the references to the datafile and make sure it exists.


ORA-01131 DB_FILES system parameter value string exceeds limit of string

Cause: The specified value of the initialization parameter DB_FILES is too large.

Action: Reduce the value of the DB_FILES parameter and retry the operation.


ORA-01132 length of database file name 'string' exceeds limit of string characters

Cause: The specified datafile name is too long.

Action: Shorten the file name and retry the operation.


ORA-01133 length of log file name 'string' exceeds limit of string characters

Cause: The specified redo log file name is too long.

Action: Shorten the file name and retry the operation.


ORA-01134 database mounted exclusive by another instance

Cause: An attempt to access a database failed because it is mounted in exclusive mode by another instance.

Action: Either shut down the other instance or wait for the other instance to either close the database or mount it in parallel mode, before retrying the operation.


ORA-01135 file string accessed for DML/query is offline

Cause: An attempt was made to access a datafile that is offline.

Action: Bring the datafile back online.


ORA-01136 specified size of file string (string blocks) is less than original size of string blocks

Cause: A file size was specified in the AS clause of the ALTER DATABASE CREATE DATAFILE statement, and the size was smaller than the size needed.

Action: Create the file with a larger size.


ORA-01137 data file string is still in the middle of going offline

Cause: It was not possible to get the lock for a file that is offline when attempting to bring it online. The most likely cause is that the lock is still held by the instance that is took it offline.

Action: Wait for the other instance to release the lock on the file.


ORA-01138 database must either be open in this instance or not at all

Cause: The requested operation cannot be done when the database is mounted but not open in this instance, and another instance has the database open.

Action: Execute the operation in an open instance, open the database in this instance, or close the database in the other instances.


ORA-01139 RESETLOGS option only valid after an incomplete database recovery

Cause: The RESETLOGS option was given in ALTER DATABASE OPEN, but there has been no incomplete recovery session.

Action: Reissue the ALTER DATABASE OPEN statement without specifying '.


ORA-01140 cannot end online backup - all files are offline

Cause: All the files were found to be offline when attempting to end an online backup.

Action: No action required. Online backup does not need to be ended for this tablespace.


ORA-01141 error renaming data file string - new file 'string' not found

Cause: An attempt to change a datafile's name in the control file failed because no file was found with the new name.

Action: Make sure that the datafile has been properly renamed by the operating system and retry.


ORA-01142 cannot end online backup - none of the files are in backup

Cause: None of the files were found to be in online backup when attempting to end an online backup.

Action: No action required. Online backup does not need to be ended for this tablespace.


ORA-01143 cannot disable media recovery - file string needs media recovery

Cause: An attempt to disable media recovery found a file that needs media recovery, thus media recovery cannot be disabled.

Action: Recover the offending file or drop the tablespace it belongs to and retry this command.


ORA-01144 File size (string blocks) exceeds maximum of string blocks

Cause: Specified file size is larger than maximum allowable size value.

Action: Specify a smaller size.


ORA-01145 offline immediate disallowed unless media recovery enabled

Cause: ALTER TABLESPACE ... OFFLINE IMMEDIATE or ALTER DATABASE DATAFILE ... OFFLINE is only allowed if the database is in ARCHIVELOG mode.

Action: Take the tablespace offline as usual or do a shutdown abort before attempting the required operation. It is worthwhile reconsidering the backup strategy for the database. The attempted operations can be done if ARCHIVEREDO LOG mode is enabled.


ORA-01146 cannot start online backup - file string is already in backup

Cause: An attempt was made to start an online backup, but an online backup was already started for one of the datafiles.

Action: End the first backup before beginning another.


ORA-01147 SYSTEM tablespace file string is offline

Cause: A file belonging to the SYSTEM tablespace has been marked offline by the database administrator. The database cannot be started until all SYSTEM tablespace files are online and can be opened.

Action: Bring the file online.


ORA-01148 can not mount database PARALLEL without a lock manager installed

Cause: An attempt was made to mount the database PARALLEL without the existence of a Lock Manager.

Action: Mount the database in EXCLUSIVE mode.


ORA-01149 cannot shutdown - file string has online backup set

Cause: An attempt to shut down normally found that an online backup is still in progress.

Action: End the backup of the offending tablespace and retry this command.


ORA-01150 cannot prevent writes - file string has online backup set

Cause: Tablespace cannot be taken offline or made read-only when online backup is running. Ending the backup entails writing the file header, which this operation, were it permitted, would prevent.

Action: End the online backup and then take the tablespace offline or make it read-only.


ORA-01151 use media recovery to recover block, restore backup if needed

Cause: Crash recovery or instance recovery could not apply a change to a block because it was not the next change. This can happen if the block was corrupted and then repaired during recovery. This message is usually accompanied by ORA-01172.

Action: There is additional information for ORA-01172. Perform a RECOVER datafile for the file containing the block. If this does not resolve the problem, restore the file from a backup and recover it again.


ORA-01152 file string was not restored from a sufficiently old backup

Cause: An incomplete recovery session was started, but an insufficient number of redo logs were applied to make the database consistent. This file is still in the future of the last redo log applied. The most likely cause of this message is forgetting to restore the file from backup before doing incomplete recovery.

Action: Apply additional redo log files until the database is consistent or restore the datafiles from an older backup and repeat recovery.


ORA-01153 an incompatible media recovery is active

Cause: Attempted to start an incompatible media recovery or open resetlogs during media recovery or RMAN backup . Media recovery sessions are incompatible if they attempt to recover the same data file. Incomplete media recovery or open resetlogs is incompatible with any media recovery. Backup or restore by RMAN is incompatible with open resetlogs.

Action: Complete or cancel the other media recovery session or RMAN backup.


ORA-01154 database busy. Open, close, mount, and dismount not allowed now

Cause: Some operation is in progress that expects the state of the instance to remain open or mounted.

Action: Wait for the operation to complete and try again. If attempting a normal database shutdown, try SHUTDOWN ABORT.


ORA-01155 the database is being opened, closed, mounted or dismounted

Cause: The attempted operation will not succeed while the instance is in one of the states mentioned in the message.

Action: Wait for the open, close, mount, or dismount to complete and try again. If attempting a normal database shutdown, try SHUTDOWN ABORT.


ORA-01156 recovery in progress may need access to files

Cause: Either media or instance recovery is in progress. The recovery may need access to the files that the attempted operation tried to use.

Action: Wait for the recovery to complete and try again.


ORA-01157 cannot identify/lock data file string - see DBWR trace file

Cause: The background process was either unable to find one of the data files or failed to lock it because the file was already in use. 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. The accompanying error from the operating system describes why the file could not be identified.

Action: At the operating system level, make the file available to the database. Then either open the database or do an ALTER SYSTEM CHECK DATAFILES.


ORA-01158 database string already mounted

Cause: Another instance has a database by this name mounted.

Action: Find which instance is still running. Perhaps you have not lost the control files after all.


ORA-01159 file is not from same database as previous files - wrong database id

Cause: Not all of the files specified in CREATE CONTROLFILE are from the same database. The database ID of this file does not match that from the first file specified.

Action: Check the list of files provided to the CREATE.


ORA-01160 file is not a string

Cause: The named file in the DATAFILE or LOGFILE section of the CREATE CONTROLFILE command does not appear to be as stated.

Action: Check the mentioned file.


ORA-01161 database name string in file header does not match given name of string

Cause: The database name given at the command line does not match the database name found in the file header.

Action: Chance are good that the database name specified at the command line is incorrect. Resolve the discrepancy, and resubmit the command. If you are attempting to change the database name, be sure to use the SET DATABASE option.


ORA-01162 block size string in file header does not match configured block sizes

Cause: CREATE CONTROLFILE discovered that the block size for this file is incompatible with any of the configured cache blocksizes in the initialization parameter file.

Action: Configure the appropriate cache for this block size using one of the (DB_2K_cache_size, DB_4K_cache_size, DB_8K_cache_size, DB_16K_cache_size, DB_32K_cache_size) parameters.


ORA-01163 SIZE clause indicates string (blocks), but should match header string

Cause: The size specified in bytes in the SIZE clause of the CREATE CONTROLFILE statement does not equate to the number of blocks recorded in the header.

Action: Specify the correct file name and size (in bytes).


ORA-01164 MAXLOGFILES may not exceed string

Cause: MAXLOGFILES specified on the command line too large.

Action: Resubmit the command with a smaller value for MAXLOGFILES.


ORA-01165 MAXDATAFILES may not exceed string

Cause: MAXDATAFILES specified on the command line too large.

Action: Resubmit the command with a smaller value for MAXDATAFILES.


ORA-01166 file number string is larger than string (string)

Cause: File mentioned in CREATE CONTROLFILE has a file number which is larger than that specified for MAXDATAFILES or MAXLOGFILES.

Action: Increase the maximum specified on the command line.


ORA-01167 two files are the same file/group number or the same file

Cause: There is an overlap of file numbers in the files specified on the command line or the same file is specified twice. If they are not the exact same file then one is likely to be a backup of the other. If they are two members of the same log they must be specified together in a group file specification. This message will also appear if the same control file appears more than once in the CONTROL_FILES parameter in the INIT.ORA file. If this happens, check for additional error messages.

Action: Confirm that the file mentioned is not a repeat of a file already mentioned in the command. If they are different files then omit the earlier backup. If they are members of the same log, insure they are in the same group file specification. If this message appears because of a duplicate control file, check the CONTROL_FILES parameter in the INIT.ORA file and see if a file is specified more than once. If all files names appear to be unique, check to make sure that the actual control files themselves are unique. For example, in UNIX check for a symbolic or a hard link to another control file in the list.


ORA-01168 physical block size string does not match size string of other members

Cause: The file is located on a device with a different physical block size than the other members in the group.

Action: Use a physical device with matching block size.


ORA-01169 DATAFILE number 1 not found. Must be present

Cause: Datafile number 1 was not specified in a CREATE CONTROLFILE command.

Action: Locate datafile number 1 and resubmit the CREATE CONTROLFILE command.


ORA-01170 file not found 'string'

Cause: A file specified in the CREATE CONTROLFILE statement was not found. All datafiles and all redo log files, if NORESETLOGS was used, must be accessible by the process that issues the CREATE CONTROLFILE statement.

Action: Check the statement for a typing mistake in the file name and check for the existence of all files. Then issue the statement again after correcting the file names.


ORA-01171 datafile string going offline due to error advancing checkpoint

Cause: The checkpoint in the file header could not be advanced. See accompanying errors for the reason. The datafile will be taken offline the same as for a write error of a data block.

Action: See accompanying errors for details. Restore access to the file, do media recovery, and bring it back online.


ORA-01172 recovery of thread string stuck at block string of file string

Cause: Crash recovery or instance recovery could not apply a change to a block because it was not the next change. This can happen if the block was corrupted and then repaired during recovery.

Action: Do a RECOVER DATAFILE for the file containing the block. If this does not resolve the problem, then restore the file from a backup and recover it.


ORA-01173 data dictionary indicates missing data file from system tablespace

Cause: One of the following:

The database is recovered to a point in time in the future of the control file.
A datafile from the system tablespace is omitted from the issued CREATE CONTROLFILE statement.
Action: One of the following:

Recover the database from a more recent control file.
Re-create the control file, ensuring all datafiles are included for the system tablespace in the command line.

ORA-01174 DB_FILES is string buts needs to be string to be compatible

Cause: The maximum number of database files supported by this instance is not the same as for the other instances. All instances must be able to open all the files any instance can open.

Action: Change the value of the DB_FILES parameter to be compatible.


ORA-01175 data dictionary has more than the string files allowed by the instance

Cause: The data dictionary is found to have more files than that which can be supported by this instance.

Action: Shut down the instance and restart with a larger value for DB_FILES.


ORA-01176 data dictionary has more than the string files allowed by the controlfie

Cause: After a CREATE CONTROLFILE, the data dictionary was found to have more datafiles than that supported by the control file.

Action: Re-create the control file with a larger value for MAXDATAFILES.


ORA-01177 data file does not match dictionary - probably old incarnation

Cause: When comparing the control file with the data dictionary after a CREATE CONTROLFILE or OPEN RESETLOGS, it was noted that this datafile was inconsistent with the dictionary. Most likely the file is a backup of a file that was dropped from the database, and the same file number was reused for a new file. It may also be that an incomplete recovery stopped at a time when this file number was used for another datafile.

Action: Do a CREATE CONTROLFILE with the correct file or none at all.


ORA-01178 file string created before last CREATE CONTROLFILE, cannot recreate

Cause: An attempt was made to use ALTER DATABASE CREATE DATAFILE to re-create a datafile that existed at the last CREATE CONTROL file command. The information needed to re-create the file was lost with the control file that existed when the file was added to the database.

Action: Find a backup of the file, and recover it. Do incomplete recovery to time before file was originally created.


ORA-01179 file string does not exist

Cause: During datafile recovery, a file was listed that was not part of the database.

Action: Recheck the file name. Remember to use single quotation marks at the SQL*DBA command line. Remember also that the file name is translated in the operating environment of SQL*DBA.


ORA-01180 can not create datafile 1

Cause: An attempt was made to create datafile 1 using ALTER DATABASE CREATE DATAFILE.

Action: Recover file from a backup or re-create the database.


ORA-01181 file string created before last RESETLOGS, cannot recreate

Cause: An attempt was made to use ALTER DATABASE CREATE DATAFILE to re-create a datafile that existed at the last RESETLOGS database open.

Action: Find a backup of the file, and recover it. Do incomplete recovery to time before file was originally created.


ORA-01182 cannot create database file string - file is in use or recovery

Cause: An attempt was made to use ALTER DATABASE CREATE DATAFILE to re-create a datafile that is online in an open instance or is being recovered.

Action: Close database in all instances and end all recovery sessions.


ORA-01183 cannot mount database in SHARED mode

Cause: Some other instance has the database mounted exclusive.

Action: Shut down the other instance and then mount shared.


ORA-01184 logfile group string already exists

Cause: An ALTER DATABASE ADD LOGFILE statement specified a log number for the new log which is already in use.

Action: Specify a different log file number, or let the database choose an unused value.


ORA-01185 logfile group number string is invalid

Cause: An ALTER DATABASE ADD LOGFILE statement specified a log number for the new log which is too large.

Action: Specify a correct log file number.


ORA-01186 file string failed verification tests

Cause: The datafile did not pass the checks to insure it is part of the database. See the accompanying error messages for the reason the verification failed.

Action: Make the correct file available to the database. Then, either open the database, or execute ALTER SYSTEM CHECK DATAFILES.


ORA-01187 cannot read from file string because it failed verification tests

Cause: The datafile did not pass the checks to insure it is part of the database. Reads are not allowed until it is verified.

Action: Make the correct file available to the database. Then, either open the database, or execute ALTER SYSTEM CHECK DATAFILES.


ORA-01188 Block size string in header does not match physical block size string

Cause: A log file member given to CREATE CONTROLFILE is on a physical device that has a different block size than the device originally used to create the log.

Action: Move the file to a device with the correct block size or use the RESETLOGS option to CREATE CONTROLFILE.


ORA-01189 file is from a different RESETLOGS than previous files

Cause: In a CREATE CONTROLFILE command, either this file or all previous files were backups from before the last RESETLOGS. This may also occur if this is a file that is offline and has been offline since before the last RESETLOGS.

Action: If the file was taken offline normal before the last RESETLOGS, and is still offline, omit it from the CREATE CONTROLFILE command. Rename and online the file after the database is open. Otherwise find the version of the mentioned file consistent with the rest of the datafiles and resubmit the command.


ORA-01190 controlfile or data file string is from before the last RESETLOGS

Cause: An attempt was made to use a datafile when the log reset information in the file does not match the control file. Either the datafile or the control file is a backup that was made before the most recent ALTER DATABASE OPEN RESETLOGS.

Action: Restore file from a more recent backup.


ORA-01191 file string is already offline - cannot do a normal offline

Cause: When attempting to do a normal tablespace offline, it was discovered that one of the files in the tablespace was already offline.

Action: Either bring the datafile online first, or use another tablespace offline option.


ORA-01192 must have at least one enabled thread

Cause: At least two redo log files from at least one thread must be specified in the CREATE CONTROLFILE command line.

Action: Find the missing redo log files and retry the command with the newly found redo log files included in the command line.


ORA-01193 file string is not the same file seen at start of recovery

Cause: A different copy of the file was accessed the last time media recovery looked at the file header. A backup of the file was restored or the meaning of the file name changed during recovery.

Action: Ensure the correct file is available, and then retry recovery.


ORA-01194 file string needs more recovery to be consistent

Cause: An incomplete recovery session was started, but an insufficient number of logs were applied to make the file consistent. The reported file was not closed cleanly when it was last opened by the database. It must be recovered to a time when it was not being updated. The most likely cause of this error is forgetting to restore the file from a backup before doing incomplete recovery.

Action: Either apply more logs until the file is consistent or restore the file from an older backup and repeat recovery.


ORA-01195 online backup of file string needs more recovery to be consistent

Cause: An incomplete recovery session was started, but an insufficient number of logs were applied to make the file consistent. The reported file is an online backup which must be recovered to the time the backup ended.

Action: Either apply more logs until the file is consistent or restore the database files from an older backup and repeat recovery.


ORA-01196 file string is inconsistent due to a failed media recovery session

Cause: The file was being recovered but the recovery did not terminate normally. This left the file in an inconsistent state. No more recovery was successfully completed on this file.

Action: Either apply more logs until the file is consistent or restore the backup again and repeat recovery.


ORA-01197 thread string only contains one log

Cause: During CREATE CONTROLFILE all threads represented in the logs must be represented by at least two logs. A "last log" and a second log. The named thread