> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL Server Linked Server

> このページではSQL Server Linked Server をConnect AI の仮想SQL Server API に接続する手順の概要を示します。

## 前提条件

接続する前にまず以下を実行します。

* データソースをConnect AI アカウントに接続します。詳しくは、[Sources](/ja/Sources) を参照してください。
* [Settings](/ja/Settings#personal-access-tokens) ページでPersonal Access Token (PAT) を生成します。PAT をコピーし、認証時にパスワードとして使用します。

## Connect AI に接続する

SQL Server Linked Server からConnect AI の仮想SQL Server API へのコネクションを確立するには以下の手順に従います。

<Steps>
  <Step>
    Open Microsoft SQL Server Management Studio.
  </Step>

  <Step>
    In the **Object Explorer** pane, open **Server Objects**, right-click **Linked Servers**, and select **New Linked Server**.

    <Frame>
      <img src="https://mintcdn.com/cdata/Q0F2YyND00IivWI1/ja/images/sql_client_1.png?fit=max&auto=format&n=Q0F2YyND00IivWI1&q=85&s=e2e498696e117bdfa99a600a995b6179" alt="" width="441" height="289" data-path="ja/images/sql_client_1.png" />
    </Frame>
  </Step>

  <Step>
    The **New Linked Server** dialogue opens. On the **General** page, enter the following information:

    * Enter a memorable name for the server in the **Linked server** field.
    * Select the radio button **Other data source** and select **Microsoft OLE DB Driver for SQL Server** as the provider.
    * In the **Data source** field, enter *tds.cdata.com*,*14333*
    * Leave the other fields empty.

    <Frame>
      <img src="https://mintcdn.com/cdata/Q0F2YyND00IivWI1/ja/images/sql_client_2.png?fit=max&auto=format&n=Q0F2YyND00IivWI1&q=85&s=17644072e7efc28dac3abd6e4f22487f" alt="" width="1851" height="1566" data-path="ja/images/sql_client_2.png" />
    </Frame>
  </Step>

  <Step>
    Select the **Security** page. At the bottom, select the radio button labeled **Be made using this security context** and enter the following information:

    * **Remote login**—Connect AI のユーザー名を入力します。ユーザー名は、Connect AI の画面の右上に表示されています。例：*[test@cdata.co.jp](mailto:test@cdata.co.jp)*
    * **With password**—[Settings](/ja/Settings#personal-access-tokens) ページで生成したPAT を入力します。

    <Frame>
      <img src="https://mintcdn.com/cdata/Q0F2YyND00IivWI1/ja/images/sql_client_3.png?fit=max&auto=format&n=Q0F2YyND00IivWI1&q=85&s=3bfc050d6ff496a53168abaf0aa3cf6b" alt="" width="702" height="664" data-path="ja/images/sql_client_3.png" />
    </Frame>
  </Step>

  <Step>
    Click **OK** to create the server.
  </Step>
</Steps>

Your linked server can now be used to access the data in the data source you specified. If you need to access data from more sources, create another linked server for each one.
