JDBC Driver for MarkLogic

Build 23.0.8839

接続の確立

JDBC データソースの作成

Java アプリケーションから接続するJDBC データソースを作成できます。CData JDBC Driver for MarkLogic に基づくJDBC データソースの作成は、3つの基本ステップで構成されます。

  • ドライバーのJAR ファイルをクラスパスに追加します。JAR ファイルはインストールディレクトリの[lib]サブフォルダ内にあります。.lic ファイルはJAR ファイルと同じフォルダ内に配置される必要があることに注意してください。
  • ドライバークラスを入力します。次に例を示します。
    cdata.jdbc.marklogic.MarkLogicDriver
  • JDBC URL を入力します。次に例を示します。
    jdbc:marklogic:User='myusername';Password='mypassword';Server='marklogic'
    
    or
    
    jdbc:cdata:marklogic:User='myusername';Password='mypassword';Server='marklogic'

    上記の2つ目の形式は、同じURL 形式を使用しているドライバー間でアプリケーションに競合がある場合は、CData ドライバーを使用していることを確認するために常に使用できます。URL は "jdbc:marklogic:" または"jdbc:cdata:marklogic:" のいずれかから始まり、任意の接続プロパティの名前と値のペアをセミコロン区切りで入力します。

MarkLogic への接続

Picking an API

The CData JDBC Driver for MarkLogic offers access to both the REST and ODBC APIs for MarkLogic. Please see 適切なAPI の選択 for a discussion on which API is right for your use case.

Connection Details

Regardless of which API you are connecting to, you will need to include the following connection details:

  • Server - The server being connected to.
  • Database - (Optional) The specific database to connect to.
  • Port - (Optional) The specific port to use if the default port for the selected API is not being used default.

Create an ODBC Server

If connecting to the ODBC API, please follow the guide in MarkLogic's official website on how to create an ODBC Server, https://docs.marklogic.com/guide/admin/odbc.

Authenticating to MarkLogic

To authenticate to MarkLogic, specify the following connection properties:

  • User - The user to authenticate as.
  • Password - The password of the user.

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