ODBC Driver for Couchbase

Build 23.0.8839

Linux DSN の構成

このセクションでは、以下のいくつかのLinux ディストリビューションでODBC 接続をセットアップしDSN を設定する方法を説明します:Ubuntu のようなDebian ベースのシステム、Red Hat Enterprise Linux (RHEL)、CentOS、およびFedora のようなRed Hat Linux プラットフォーム。

Linux の最小バージョン

Red Hat ベースおよびDebian ベースシステムでサポートされる最小バージョンは以下のとおりです。

OSMin. Version
Ubuntu11.04
Debian7
RHEL6.9
CentOS6.9
Fedora13
SUSE12.1

ドライバー依存関係のインストール

必要な依存関係をインストールするには、次のコマンドをルートとしてまたはsudo で実行します。

  • Debian/Ubuntu:
    apt-get install libc6 libstdc++6 zlib1g libgcc1
  • RHEL/CentOS/Fedora:
    yum install glibc libstdc++ zlib libgcc

本製品 が必要とする対応ライブラリは以下のとおりです。

Debian/Ubuntu PackageRHEL/CentOS/Fedora PackageFile
libc6glibclinux-vdso.1
libc6glibclibm.so.6
libc6glibclibrt.so.1
libc6glibclibdl.so.2
libc6glibclibpthread.so.0
libc6glibclibc.so.6
libc6glibcld-linux-x86-64.so.2
libstdc++6libstdc++libstdc++.so.6
zlib1gzliblibz.so.1
libgcc1libgcclibgcc_s.so.1

ドライバーのインストール

標準のパッケージ管理システムを使用してドライバーをインストールできます。

Ubuntu のようなDebian ベースのシステムでは、次のコマンドをroot またはsudo で実行します。

dpkg -i /path/to/driver/setup/CouchbaseODBCDriverforUnix.deb 

RPM パッケージ形式をサポートするシステムでは、次のコマンドをroot またはsudo で実行します。

rpm -ivh /path/to/driver/CouchbaseODBCDriverforUnix.rpm 

ドライバーのライセンス

次のコマンドを実行して本製品 のライセンスを取得します。評価版をアクティベートするには、<key> の入力を省略してください。

cd /opt/cdata/cdata-odbc-driver-for-couchbase/bin/
sudo ./install-license.sh <key>

ドライバーマネージャー経由の接続

ドライバーマネージャーはドライバーをロードし、アプリケーションからドライバーに関数呼び出しを渡します。本製品 をドライバーマネージャーに登録して、ドライバーマネージャーのコンフィギュレーションファイルにDSN を定義する必要があります。

本製品 のインストールでは、本製品 をunixODBC ドライバーマネージャーに登録し、システムDSN を作成します。UnixODBC ドライバーマネージャーは、Python やその他多くのアプリケーションから使用できます。アプリケーションに別のドライバーマネージャーが組み込まれている可能性があります。

DSN の作成

unixODBC をインストールしてDSN を設定するには、unixODBC の使用 を参照してください。OBIEE、Informatica、およびSAS に接続するDSN を作成するには、DataDirect ドライバーマネージャーの使用 を参照してください。

Connecting to Couchbase

To connect to data, set the Server property to the hostname or IP address of the Couchbase server(s) you are authenticating to.

If your Couchbase server is configured to use SSL, you can enable it either by using an https URL for Server (like https://couchbase.server), or by setting the UseSSL property to True.

Couchbase Analytics

By default, the 本製品 connects to the N1QL Query service. In order to connect to the Couchbase Analytics service, you will also need to set the CouchbaseService property to Analytics.

Couchbase Cloud

Set the following to connect to Couchbase Cloud:

  • AuthScheme: Set this to Basic.
  • ConnectionMode: Set this to Cloud.
  • DNSServer: Set this to a DNS server. In most cases, this should be a public DNS service like 1.1.1.1 or 8.8.8.8.
  • SSLServerCert: Set this to the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected. Alternatively, set "*" to accept all certificates.

Authenticating to Couchbase

The 本製品 supports several forms of authentication. Couchbase Cloud only accepts Standard authentication, while Couchbase Server accepts Standard authentication, client certificates, and credentials files.

Standard Authentication

To authenticate with standard authentication, set the following:

  • AuthScheme: Set this to Basic.
  • User: The user authenticating to Couchbase.
  • Password: The password of the user authenticating to Couchbase.

Client Certificates

The 本製品 supports authenticating with client certificates when SSL is enabled. To use client certificate authentication, set the following properties:

  • AuthScheme: Set this to SSLCertificate.
  • SSLClientCertType: The type of client certificate set within SSLClientCert.
  • SSLClientCert: The client certificate in the format given by SSLClientCertType.
  • SSLClientCertPassword (optional): The password of the client certificate, if it is encrypted.
  • SSLClientCertSubject (optional): The subject of the client certificate, which, by default, is the first certificate found in the store. This is required if more than one certificate is available in the certificate store.

Credentials File

You can also authenticate using using a credentials file containing multiple logins. This is included for legacy use and is not recommended when connecting to a Couchbase Server that supports role-based authentication.

  • AuthScheme: Set this to CredentialsFile.
  • CredentialsFile: The path to the credentials file. Refer to Couchbase's documentation for more information on the format of this file.

ドライバーエンコーディングの設定

ODBC ドライバーは、ODBC ドライバーマネージャーで使用するエンコーディングを指定する必要があります。デフォルトでは、Unix 用のCData ODBC ドライバーはunixODBC と互換性のあるUTF-16 を使用するように設定されていますが、他のドライバーマネージャーでは代替エンコーディングが必要な場合があります。

また、ANSI ODBC API を使用するアプリケーションからODBC ドライバーを使用している場合は、ANSI コードページを設定する必要があります。例えば、ANSI アプリケーションに日本語の文字をインポートするには、設定ファイル'/opt/cdata/cdata-odbc-driver-for-couchbase/lib/cdata.odbc.couchbase.ini' でコードページを指定できます。

[Driver]
AnsiCodePage = 932

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839