ABIGetVSession
ABIGetVSession#
구문#
int ABIGetVSession (
ABIVSession **aHandle,
unsigned int aExecutingOnly );
인자#
자료유형 | 인자 | 입/출력 | 설명 |
---|---|---|---|
ABIVSession** | aHandle | 출력 | 결과 셋이 저장된 구조체 배열의 메모리 주소를 받아올 포인터 |
unsigned int | aExecutingOnly | 입력 | 0: 전체 세션 조회 1: Active 세션만 조회 |
반환값#
함수 수행이 성공하면 aHandle에 가져온 결과 셋 내의 로우 개수를 반환한다. 실패하면 음의 정수 값으로 에러 코드가 반환된다.
설명#
V$SESSION 성능 뷰를 조회하는 함수이다. 함수가 성공적으로 수행되면 aHandle에 결과 셋이 저장된 ABIVSession 타입의 배열을 가리키는 포인터가 반환된다.
예제#
이 함수와 관련된 프로그램은 4장의 sample_1.c를 참고하도록 한다.
ABIVSession *sVSession;
ABIVSession *sVSessionActiveOnly;
int sRowCount;
int sRowCountActiveOnly;
/* 전체 세션 조회 */
sRowCount = ABIGetVSession( &sVSession, 0 );
/* Active 세션만 조회 */
sRowCountActiveOnly = ABIGetVSession( &sVSessionActiveOnly, 1 );