
CUBRID 에러 코드 확인하기
조회 수 3535 추천 수 0 2012.05.24 02:27:03CUBRID 서버에 로깅되는 모든 에러 로그 메시지와, CCI API 함수가 에러를 리턴하는 경우에 CUBRID 에러 코드를 사용한다.
에러 로그 메시지는 브로커 프로세스, 서버 프로세스, 매니저 프로세스와, cubrid 유틸리티에서 발생할 수 있다.
CCI API가 에러 코드를 리턴하는 경우는 예를 들어, cci_execute() 함수가 0보다 작은 값을 반환하는 경우이다.
CUBRID 서버 에러 코드 파일(dbi.h, cubrid.msg)의 확인
에러 코드 명은 dbi.h, 에러 코드 메시지는 cubrid.msg 파일에서 확인할 수 있는데,
dbi.h 파일은 CUBRID 설치 후
- $CUBRID/include 디렉터리 이하에 존재한다.
cubrid.msg 파일은 CUBRID 설치 후
- $CUBRID/msg/en_US(한글은 ko_KR.eucKR 혹은 ko_KR.utf8) 디렉터리 이하에 존재한다.
- 서버 에러 메시지의 확인은 "$set 5 MSGCAT_SET_ERROR" 이하의 메시지 그룹을 참고한다.
CUBRID 주요 에러 메시지 확인
실제 리턴되는 값은 cubrid.msg의 에러 번호 앞에 -가 붙는다. 주요 에러 메시지를 살펴보면 다음과 같다.
* Unique 키 위반
670 Operation would have caused one or more unique constraint violations.
886 "%1$s" caused unique constraint violation. | unique 키 위반
* Lock timeout 관련
73 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on object %6$d|%7$d|%8$d. You are waiting for user(s) %9$s to finish.
74 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on class %6$s. You are waiting for user(s) %7$s to finish.
75 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on instance %6$d|%7$d|%8$d of class %9$s. You are waiting for user(s) %10$s to finish.
76 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s on page %6$d|%7$d. You are waiting for user(s) %8$s to release the page lock.
* deadlock 관련
966 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on object %6$d|%7$d|%8$d because of deadlock. You are waiting for user(s) %9$s to finish.
967 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on class %6$s because of deadlock. You are waiting for user(s) %7$s to finish.
968 Your transaction (index %1$d, %2$s@%3$s|%4$d) timed out waiting on %5$s lock on instance %6$d|%7$d|%8$d of class %9$s because of deadlock. You are waiting for user(s) %10$s to finish.
1021 A deadlock cycle is detected. %1$s.
1083 Specific information about deadlock.