url 인자로 전달된 접속 정보를 이용하여 데이터베이스로 연결을 시도한다. CCI에서 HA 기능을 사용하는 경우, 이 함수의 url 인자에 active 서버의 연결 정보 및 장애 발생 시 failover할 standby 서버의 연결 정보를 명시해야 한다. 서버 연결에 성공하면 연결 핸들 ID를 반환하고, 실패하면 에러 코드를 반환한다.
int cci_connect_with_url (char *url [, char *db_user, char *db_password ])
<url> ::=
cci:CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>]
<properties> ::= <property> [&<property>]
<property> ::= althosts=<alternative_hosts> [&rctime=<time>]
<alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>]
<host> := HOSTNAME | IP_ADDR
<time> := SECOND
--connection URL string when a property(althosts) specified for HA
URL=cci:CUBRID:127.0.0.1:31000:db1:::?althosts=127.0.0.2:31000,127.0.0.3:31000
--connection URL string when properties(althosts,rctime) specified for HA
URL=cci:CUBRID:127.0.0.1:31000:db1:::?althosts=127.0.0.2:31000,127.0.0.3:31000&rctime=600