The <dsn-create-sql> element will create a System Data Source Name in ODBC representing a connection to a SQL Server database. This is a permanent DSN added to the host system and is not needed if an existing System DSN is already present. This element includes attributes specifying the DSN name, the database instance, SQL Server host, and authentication method (SQL or Windows). Any other parameters for a DSN are set to their defaults as configured on the host system. When using this element within a script, it is recommended that a corresponding <dsn-remove-sql> element exists to remove the same DSN created to allow for the same test script to be played multiple times on the same host system. If the DSN cannot be created a script error is thrown.
Name | Description | Data Type | Default Value | Required |
---|---|---|---|---|
dsn | This attribute specifies the name given to the DSN. This value can contain no whitespace and must adhere to all requirements of a DSN name as specified in ODBC. | string | None | Yes |
server | This attribute specifies the host system upon which the SQL Server service is running. | string | None | Yes |
database | This attribute specifies the database instance to which the DSN should connect. | string | None | Yes |
authentication | This attribute specifies the authentication
method to be used to create a connection the SQL Server service and
database. This may be one of:
|
string | None | Yes |
description | This attribute can contain a text value that will be added to the System DSN as a description. | string | None | No |
overwrite | This attribute specifies whether or not to overwrite an existing System DSN with the same name as the one this element will created. This is a Boolean value, with true indicating the existing DSN should be overwritten and false indicating it should not. | Boolean | False | No |
ignoreErrors | This attribute specifies whether or not any errors returned when creating the System DSN should be ignored. This is a Boolean value, with true indicating errors should be ignored and false indicating they should not be ignored. If this attribute is false or not specified, any error returned when attempting to create the System DSN will result in a script error being thrown. | Boolean | False | No |
common script attributes | This element includes the following common
script attributes:
|
N/A | N/A | N/A |