인스턴트 클라이언트 OCCI 라이브러리를 사용하여 Oracle 데이터베이스에 연결하기 위해 Ubuntu에서 다음 테스트 프로그램을 실행하려고합니다.Ubuntu ORA-24960 : OCI_ATTR_USERNAME 속성이 최대 허용 길이 인 255보다 큽니다.
#include <iostream>
#include <occi.h>
using namespace oracle::occi;
int main() {
Environment *env = Environment::createEnvironment(Environment::DEFAULT);
Connection *conn = env->createConnection("user", "1234");
env->terminateConnection(conn);
Environment::terminateEnvironment(env);
}
이
g++ main.cpp -L ~/instantclient_12_2 -locci -lclntsh -I ~/instantclient_12_2/sdk/include
를 컴파일 할 때 오류가 없다 그러나 나는 우분투 16.04, GCC 5.4.0을 실행하는거야
terminate called after throwing an instance of 'oracle::occi::SQLException'
what(): ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255
Aborted
를 얻을 실행할 때와 나는 같은 결과를 얻을 수 즉석 클라이언트 11.2 및 12.2.
이 질문은 전에 질문되었습니다 : https://stackoverflow.com/questions/40022118/ora-24960-the-attribute-oci-attr-username-is-greater-than-the-maximum 대답은 리눅스에는 적용 할 수 없습니다 (또는 요점을 놓치고 있습니다).
도움을 주시면 감사하겠습니다.