SQL Server
Property definitions
Data source type:
sqlserverSupported configuration modes (ConnectionPropertiesMode):
UrlMode (connection string mode)
InstanceMode (instance mode)
Same-account instance mode
Name | Type | Example | Required | Description and notes |
regionId | String | cn-shanghai | Yes | The region where the SQL Server instance resides. |
instanceId | String | rm-xxxxx | Yes | The SQL Server instance ID. |
database | String | db1 | Yes | The database name. |
username | String | user1 | Yes | The username. |
password | String | pass1 | Yes | The password. |
securityProtocol | String | authTypeNone | No | Whether to use SSL authentication. Valid values: authTypeNone (no authentication), authTypeSsl (SSL authentication enabled). Default: authTypeNone. |
truststoreFile | String | 1 | No | The truststore certificate file (reference). Required when securityProtocol=authTypeSsl. |
truststorePassword | String | apasara | No | The truststore password. Required when securityProtocol=authTypeSsl. |
readOnlyDBInstance | String | rm-xxxxx | No | The ID of the read-only instance. |
envType | String | Dev | Yes | envType indicates the environment of the data source. Dev for development environment, Prod for production environment. |
Cross-account instance mode
Name | Type | Example | Required | Description and notes |
regionId | String | cn-shanghai | Yes | The region where the SQL Server instance resides. |
instanceId | String | rm-xxxxx | Yes | The SQL Server instance ID. |
database | String | db1 | Yes | The database name. |
username | String | user1 | Yes | The username. |
password | String | pass1 | Yes | The password. |
crossAccountOwnerId | String | 11111 | No | The peer Alibaba Cloud account ID. Required for cross-account access. |
crossAccountRoleName | String | role-name | No | The role name in the peer account for cross-account access. |
securityProtocol | String | authTypeNone | No | Whether to use SSL authentication. Valid values: authTypeNone (no authentication), authTypeSsl (SSL authentication enabled). Default: authTypeNone. |
truststoreFile | String | 1 | No | The truststore certificate file (reference). Required when securityProtocol=authTypeSsl. |
truststorePassword | String | apasara | No | The truststore password. Required when securityProtocol=authTypeSsl. |
readOnlyDBInstance | String | rm-xxxxx | No | The ID of the read-only instance. |
envType | String | Dev | Yes | envType indicates the environment of the data source. Dev for development environment, Prod for production environment. |
Connection string mode
Name | Type | Example | Required | Description and notes |
address | JSONArray | | Yes | Only a single host address and a single port can be configured. |
database | String | db1 | Yes | The database name. |
username | String | user1 | Yes | The username. |
password | String | pass1 | Yes | The password. |
properties | JSON Object | | No | Driver properties. |
securityProtocol | String | authTypeNone | No | Whether to use SSL authentication. Valid values: authTypeNone (no authentication), authTypeSsl (SSL authentication enabled). Default: authTypeNone. |
truststoreFile | String | 1 | No | The truststore certificate file (reference). Required when securityProtocol=authTypeSsl. |
truststorePassword | String | apasara | No | The truststore password. Required when securityProtocol=authTypeSsl. |
envType | String | Dev | Yes | envType indicates the environment of the data source. Dev for development environment, Prod for production environment. |
Data source configuration examples
Same-account instance mode
{
"envType": "Prod",
"instanceId": "rm-xxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx",
"securityProtocol": "authTypeNone"
}Cross-account instance mode
{
"envType": "Prod",
"instanceId": "rm-xxxxx",
"regionId": "cn-shanghai",
"database": "db",
"username": "aliyun",
"password": "xxx",
"securityProtocol": "authTypeNone",
"crossAccountOwnerId": "1234567890",
"crossAccountRoleName": "my_ram_role"
}Connection string mode
{
"envType": "Prod",
"address": [
{
"host": "127.0.0.1",
"port": 5432
}
],
"database": "db",
"properties": {
"queryTimeout": "2000"
},
"username": "aliyun",
"password": "xxx"
}