---
title: Configuring external databases for account-link storage
description: A specific table is required in order for PingFederate to store account links on your database server. Table-setup scripts are provided for supported database servers.
component: pingfederate
version: 13.1
page_id: pingfederate:administrators_reference_guide:pf_config_external_database_for_account_link_storag
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/administrators_reference_guide/pf_config_external_database_for_account_link_storag.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: August 21, 2023
section_ids:
  steps: Steps
  example: Example:
  related-links: Related links
---

# Configuring external databases for account-link storage

A specific table is required in order for PingFederate to store account links on your database server. Table-setup scripts are provided for supported database servers.

## Steps

1. Create a database for account linking using one of the table-setup scripts located in the `<pf_install>/pingfederate/server/default/conf/account-linking/sql-scripts` directory.

2. Go to **System > Data & Credential Stores > Data Stores** and create a new datastore to connect PingFederate to the database. For more information, see [Configuring a JDBC connection](pf_configuring_jdbc_connection.html).

3. On the **Data Stores** window, copy the system ID of the new account-linking datastore.

4. In the `org.sourceid.saml20.service.impl.AccountLinkingServiceDBImpl.xml` file, located in the `<pf_install>/pingfederate/server/default/data/config-store` directory, replace the` <c:item name="PingFederateDSJNDIName"/>` element value with the system ID of your datastore connection and save the file.

   |   |                                                                                                                                                                                                                         |
   | - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | For a clustered PingFederate environment, edit this file on the administrative console node first, and then replicate to other engine nodes using **System > Server > Cluster Management** as explained in later steps. |

   ### Example:

   For example, if the system ID is `JDBC-123456789ABCDEF123456789ABCDEF123456A0AC`, update the `org.sourceid.saml20.service.impl.AccountLinkingServiceDBImpl.xml` file as follows.

   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <c:config xmlns:c="http://www.sourceid.org/2004/05/config">
       <c:item name="PingFederateDSJNDIName">JDBC-123456789ABCDEF123456789ABCDEF123456A0AC</c:item>
   </c:config>
   ```

5. Start or restart PingFederate.

6. If you are running PingFederate in a cluster, go to **System > Server > Cluster Management** and replicate this change to other runtime servers.

## Related links

* [System requirements](../installing_and_uninstalling_pingfederate/pf_system_requirements.html)

* [Configuring a JDBC connection](pf_configuring_jdbc_connection.html)
