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

# ext_datasource table

> This table contains external datasources, used for databaseintegration of customers and companies.

## ext\_datasource Table (317)

This table contains external datasources, used for databaseintegration of customers and companies.

## Fields

| Name                     | Description                                                               | Type        | Nullable |
| ------------------------ | ------------------------------------------------------------------------- | ----------- | :------: |
| id                       | The primary key (auto-incremented)                                        | PK          |    No    |
| name                     | An alias for this datasource.                                             | String(64)  |    Yes   |
| datatype                 | An enum indicating the type/protocol for this datasource.                 | String(32)  |    Yes   |
| database\_type           | The database type (DbType).                                               | Int         |    Yes   |
| dbname                   | The name used for accessing the datasource.                               | String(32)  |    Yes   |
| hostname                 | The hostname for accessing the datasource.                                | String(255) |    Yes   |
| port                     | The port used for accessing the datasource.                               | Int         |    Yes   |
| path                     | Path to the datasource.                                                   | String(255) |    Yes   |
| username                 | The username used for authenticating against the datasource.              | String(64)  |    Yes   |
| password                 | The poassword used for authenticating against the datasource.             | String(64)  |    Yes   |
| flags                    | Bitmask of flags.                                                         | Int         |    Yes   |
| next\_update             | Next time the update process starts                                       | DateTime    |    Yes   |
| update\_interval         | Number of hours between each database update                              | Int         |    Yes   |
| update\_customer\_count  | Number of customers updated so far                                        | Int         |    Yes   |
| update\_company\_count   | Number of companies updated so far                                        | Int         |    Yes   |
| update\_lock             | Lock to make sure not 2 updates are done simultaniously                   | DateTime    |    Yes   |
| last\_update             | When did the last update occur?.                                          | DateTime    |    Yes   |
| update\_completion\_time | The last update completion time in minutes.                               | Int         |    Yes   |
| update\_error\_message   | The last error message from datasource update.                            | Clob        |    Yes   |
| last\_access             | The last time this datasource was accessed.                               | DateTime    |    Yes   |
| sql\_init                | The SQL init used for configure the server before fetching external data. | Clob        |    Yes   |
| unix\_socket             | Unix socket used with Mysql connections on Linux                          | String(255) |    Yes   |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/ext_datasource.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=309dcdbf1516d704ae4df6a2fd9af874" alt="ext_datasource table relationship diagram" width="434" height="59" data-path="media/loc/en/database/tables/ext_datasource.png" />

## Indexes

| Fields | Types | Description |
| ------ | ----- | ----------- |

## Relationships

| Table                     | Description                                                                                                                               |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [ext\_table](./ext-table) | This table contains entries used for mapping an external table to an internal table (customer or cust\_company) for database integration. |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ext_table table](/en/database/tables/ext-table.md)
- [ext_field table](/en/database/tables/ext-field.md)
- [ExtApp table](/en/database/tables/extapp.md)
- [ExtAppGroupLink table](/en/database/tables/extappgrouplink.md)
- [ExtAppHeadingLink table](/en/database/tables/extappheadinglink.md)
- [Company](/en/automation/crmscript/reference/CRMScript.Native.Company.md)
