# SQLDatabase

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SQLDatabase/

Struct for the SQL database of a document vault.

- **Full name:** `MFiles.SQLDatabase`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-engine"></a>`engine` | [`DBEngine`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.DBEngine/index.md) | 1 | Database engine identification. Values: `DBENGINE_NONE` (0), `DBENGINE_FIREBIRD` (1), `DBENGINE_MS_SQL_SERVER` (2). |
| <a id="f-server_name"></a>`server_name` | `string` | 2 | The data source i.e. the database server name where the vault's database is residing. This is specified for data service DB engines only. It is empty or unset for embedded databases such as Firebird Embedded. |
| <a id="f-database_name"></a>`database_name` | `string` | 3 | The catalog i.e. the database name where the vault's data is residing. Allows the database name to differ from the vault display name. This is not specified in the Firebird case. |
| <a id="f-system_admin_impersonation"></a>`system_admin_impersonation` | [`Impersonation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md) | 4 | Impersonation information for accessing the database engine for administrative purposes. This contains SYSDBA (System Database Administrator) user name and password. If unset, the default user name and password are used. |
| <a id="f-basic_user_impersonation"></a>`basic_user_impersonation` | [`Impersonation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md) | 5 | Impersonation information for accessing the database engine in basic user operations that do not modify the database structure. This contains DB user name and password. If unset, the default user name and password are used. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCVaultsAdmin.TestConnectionToSQLDatabase](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/TestConnectionToSQLDatabase/index.md): Tests whether the server can connect to a Microsoft SQL Server database, for example before creating a vault in it.

<a id="used-in-fields"></a>

## Used in fields

- [`Vault.database_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Vault/index.md#f-database_info): The vault's SQL database.
- [`TestConnectionToSQLDatabaseRequest.sqldb`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/TestConnectionToSQLDatabase/index.md#request): The database server, database name and credentials to test.
