14 The SQL Server Legacy Wire Protocol Driver : Connection Option Descriptions

Connection Option Descriptions
The following connection option descriptions are listed alphabetically by the GUI name that appears on the driver Setup dialog. The connection string attribute name is listed immediately underneath the GUI name. For example:
Application Using Threads
Attribute
ApplicationUsingThreads (AUT)
In most cases, the GUI name and the attribute name are the same; however, some exceptions exist. If you need to look up an option by its connection string attribute name, please refer to the alphabetical table of connection string attribute names.
Also, a few connection string attributes, for example, Password, do not have equivalent options that appear on the GUI. They are in the list of descriptions alphabetically by their attribute names.
NOTE: SQL Server driver connection string attributes do not use short name equivalents.
Table 14-1 lists the connection string attributes supported by the SQL Server Legacy Wire Protocol driver on Windows.
Windows
UNIX and Linux
Table 14-2. lists the connection string attributes supported by the SQL Server Legacy Wire Protocol driver on UNIX/Linux.
NOTE: SQL Server driver connection string attributes do not use short name equivalents.
Alternate Servers
Attribute
AlternateServers
Description
A list of alternate database servers to which the driver tries to connect if the primary database server is unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify must be in the form of a string that defines the physical location of each alternate server. All of the other required connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(Address=addressvalue[, . . .])
You must specify the network address of each alternate server.
NOTE: An alternate server address in IPv6 format must be enclosed in double quotation marks.
Example
The following two Alternate Servers values define two alternate database servers for connection failover:
AlternateServers=(Address=MySQLServer\Instance1,
Address="255.125.1.11, 5002")
In this example, the network address of the last alternate contains commas. In this case, enclose the network address with double quotation marks as shown.
Default
None
GUI Tab
Failover tab
AnsiNPW
Attribute
AnsiNPW
Description
Determines whether ANSI-defined behaviors are exposed.
Valid Values
yes | no
When set to yes (Enabled), the driver uses ANSI-defined behaviors for handling NULL comparisons, character data padding, warnings, and NULL concatenation. If the driver appears to be truncating trailing blank spaces, this attribute should be set to no.
When set to no (Disabled), ANSI-defined behaviors are not exposed.
Default
yes (Enabled)
GUI Tab
n/a
Application Name
Attribute
APP
Description
The name Microsoft SQL Server uses to identify your application.
Valid Values
string
where string is your application name.
Default
None
GUI Tab
Advanced tab
AttachDBFileName
Attribute
AttachDBFileName
Description
The name of the primary file of an attachable database.
Valid Values
string
where string is name of the primary file of an attachable database.
Include the full path and escape any slash ( \ ) characters if using a C character string variable:
AttachDBFileName=C:\\MyFolder\\MyDB.mdf
This database is attached and becomes the default database for the connection. To use AttachDBFileName, you must also specify the database name in either the SQLDriverConnnect DATABASE parameter or the SQL_COPT_CURRENT_CATALOG connection attribute. If the database was previously attached, Microsoft SQL Server will not reattach it; it will use the attached database as the default for the connection.
Default
None
GUI Tab
n/a
AutoTranslate
Attribute
AutoTranslate
Description
Determines how ANSI character strings are translated.
Valid Values
yes | no
If set to yes (Enabled), ANSI character strings sent between the client and server are translated by converting through Unicode to minimize problems in matching extended characters between the code pages on the client and the server.
These conversions are performed on the client by the SQL Server Legacy Wire Protocol driver. This requires that the same ANSI code page (ACP) used on the server be available on the client.
These settings have no effect on the conversions that occur for the following transfers:
If set to no (Disabled), character translation is not performed.
The SQL Server Legacy Wire Protocol driver does not translate client ANSI character SQL_C_CHAR data sent to char, varchar, or text variables, parameters, or columns on the server. No translation is performed on char, varchar, or text data sent from the server to SQL_C_CHAR variables on the client. If the client and Microsoft SQL Server are using different ACPs, then extended characters can be misinterpreted.
Default
yes (Enabled)
GUI Tab
n/a
Connection Retry Count
Attribute
ConnectionRetryCount
Description
The number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established.
The Connection Retry Delay option specifies the wait interval, in seconds, to occur between retry attempts.
Valid Values
0 | x
where x is a positive integer from 1 to 65535.
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established during the retry attempts, the driver returns an error that is generated by the last server to which it tried to connect.
Default
0
GUI Tab
Failover tab
Connection Retry Delay
Attribute
ConnectionRetryDelay
Description
The number of seconds the driver waits between connection retry attempts when Connection Retry Count is set to a positive integer.
Valid Values
0 | x
where x is a positive integer from 1 to 65535.
If set to 0, there is no delay between retries.
If set to x, the driver waits between connection retry attempts the specified number of seconds.
Default
3
GUI Tab
Failover tab
Data Source Name
Attribute
DataSourceName (DSN)
Description
The name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where string is the name of a data source.
Default
None
GUI Tab
General tab
Database Name
Attribute
DATABASE
Description
The name of the database to which you want to connect.
Valid Values
database_name
where database_name is the name of a valid database.
Default
None
GUI Tab
General tab
Default User Name
Attribute
UID (use LogonID for odbc.ini file)
Description
The default user ID used to connect to your database. Your ODBC application may override this value or you may override it in the logon dialog box or connection string.
Valid Values
userid
where userid is a valid user ID with permissions to access the database.
Default
None
GUI Tab
Advanced tab
Description
Attribute
Description (n/a)
Description
An optional long description of a data source. This description is not used as a runtime connection attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where string is a description of a data source.
Default
None
GUI Tab
General tab
Enable Quoted Identifiers
Attribute
QuotedID
Description
Determines whether the driver allows the use of quoted identifiers.
Valid Values
yes | no
If set to yes (Enabled), Microsoft SQL Server enforces ANSI rules regarding quotation marks. Double quotation marks can only be used for identifiers, such as column and table names. Character strings must be enclosed in single quotation marks, for example:
SELECT "au_id"
FROM "authors"
WHERE "au_lname" = 'O''Brien'
If set to no (Disabled), applications that use quoted identifiers encounter errors when they generate SQL statements with quoted identifiers.
Default
no (Disabled)
GUI Tab
Advanced tab
Fetch TSWTZ as Timestamp
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Description
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid Values
0 | 1
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the fetched value.
Default
0 (Disabled)
GUI Tab
Advanced tab
Fetch TWFS as Time
Attribute
FetchTWFSasTime (FTWFSAT)
Description
Determines whether the driver returns column values with the time data type as the ODBC data type SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
Supported only for Microsoft SQL Server 2008.
Valid Values
0 | 1
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not searchable when they are described and fetched as timestamp
NOTE: When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day parts of the timestamp must be set to zero.
Default
0 (Disabled)
GUI Tab
Advanced tab
IANAAppCodePage
Attribute
IANAAppCodePage
Description
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application is not Unicode‑enabled or if your database character set is not Unicode. Refer to Chapter 4 “Internationalization, Localization, and Unicode” in the DataDirect Connect Series for ODBC Reference for details.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1 Latin-1).
Valid Values
IANA_code_page
where IANA_code_page is one of the valid values listed in Chapter 1 “Values for the Attribute IANAAppCodePage” in the DataDirect Connect Series for ODBC Reference. The value must match the database character encoding and the system locale.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Language
Attribute
LANGUAGE
Description
The national language to use for Microsoft SQL Server system messages.
Valid Values
lang
where lang is the language to use for Microsoft SQL Server system messages. This overrides the default language specified for the login on the server. If no language is specified, the connection uses the default language specified for the login on the server.
Default
None
GUI Tab
Advanced tab
Load Balancing
Attribute
LoadBalancing (LB)
Description
Determines whether the driver uses client load balancing in its attempts to connect to the database servers (primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers option.
Valid Values
0 | 1
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers (primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their sequential order (primary server first, then, alternate servers in the order they are specified).
Default
0 (Disabled)
GUI Tab
Failover tab
Network
Attribute
Network
Description
The name of a network library dynamic-link library.
Valid Values
string
where string is the name of a network library dynamic-link library. The name need not include the path and must not include the .DLL file name extension, for example, Network=dbnmpntw.
Default
None
GUI Tab
n/a
PWD
Attribute
PWD (use Password for odbc.ini file)
Description
The password that the application uses to connect to your database. The Password option cannot be specified through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon dialog box or a connection string.
Valid Values
pwd
where pwd is a valid password.
PWD need not be specified if the login has a NULL password.
Default
None
GUI Tab
n/a
QueryLogFile
Attribute
QueryLogFile
Description
The full path and file name of a file to be used for logging data about long-running queries. The QueryLog_On option must be set to yes.
Valid Values
string
where string is the full path and file name of the file to be used for logging data.
Default
None
GUI Tab
n/a
QueryLog_On
Attribute
QueryLog_On
Description
Determines whether data about long-running queries data is logged.
Valid Values
yes | no
When set to yes (Enabled), logging data about long-running queries data is enabled on the connection.
When set to no (Disabled), long-running query data is not logged.
Default
no (Disabled)
GUI Tab
n/a
QueryLogTime
Attribute
QueryLogTime
Description
A digit character string specifying the threshold for logging data about long-running queries.
Valid Values
string
where string is a digit character string specifying the threshold in milliseconds, for logging data.
Any query that does not receive a response in the time specified is written to the long-running query log file.
Default
None
GUI Tab
n/a
Regional
Attribute
Regional
Description
Determines how currency, date, and time data are converted.
Valid Values
yes | no
When set to yes (Enabled), the SQL Server Legacy Wire Protocol driver uses client settings when converting currency, date, and time data to character data. The conversion is one way only; the driver does not recognize non-ODBC standard formats for date strings or currency values.
When set to no (Disabled), the driver uses ODBC standard strings to represent currency, date, and time data that is converted to string data.
Default
yes (Enabled)
GUI Tab
n/a
SAVEFILE
Attribute
SAVEFILE
Description
The name of an ODBC data source file into which the attributes of the current connection are saved.
Valid Values
string
where string is the name of an ODBC data source file into which the attributes of the current connection are saved if the connection is successful.
Default
None
GUI Tab
n/a
Server
Attribute
SERVER
Attribute
Address
Description
The location of the server.
Valid Values
IP_address | named_server | named_instance | server_name
where
IP_address is the IP address of the server to which you want to connect. Specify this address as: IP_address, port_number. For example, you can enter 199.226.224.34, 5000.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See “Using IP Addresses” for details about these formats.
named_server is the named server address of the server to which you want to connect. Specify this address as: named_server, port_number. For example, you can enter SSserver, 5000.
named_instance is a named instance of Microsoft SQL Server. Specify this address as: server_name\instance_name. If only a server name is specified with no instance name, the driver uses the default named instance on the server.
server_name is the name of a server on your network. It must be an entry on the Alias tab of the SQL Server Network Client Utility or the network name of a server running Microsoft SQL Server. You can enter (local) when the driver is on the same computer as the Microsoft SQL Server database. You can connect to a local copy of Microsoft SQL Server, even when it is a non-networked version. Microsoft SQL Server 2000 and higher support multiple instances of Microsoft SQL Server running on the same computer.
Default
None
GUI Tab
General tab
StatsLogFile
Attribute
StatsLogFile
Description
The full path and file name of a file to be used for recording SQL Server Legacy Wire Protocol driver performance data. The StatsLog_On option must be set to yes.
Valid Values
string
where string is the full path and file name of the file to be used for recording data.
Default
None
GUI Tab
n/a
StatsLog_On
Attribute
StatsLog_On
Description
Determines whether SQL Server Legacy Wire Protocol driver performance data is made available.
Valid Values
yes | no
When set to yes (Enabled), SQL Server Legacy Wire Protocol driver performance data is captured.
When set to no (Disabled), SQL Server Legacy Wire Protocol driver performance data is not available on the connection.
Default
no (Disabled)
GUI Tab
n/a
Use NT Authentication
Attribute
Trusted_Connection
Description
Specifies that the SQL Server Legacy Wire Protocol driver request a secure (or trusted) connection to Microsoft SQL Server.
Valid Values
0 | 1
When set to 1 (Enabled), Microsoft SQL Server uses integrated login security to establish connections using this data source, regardless of the current login security mode at the server. Any login ID or password supplied is ignored. The Microsoft SQL Server system administrator must have associated your Windows network ID with a Microsoft SQL Server login ID.
When set to 0 (Disabled), Microsoft SQL Server uses standard login security to establish connections using this data source. In this case, you must specify a login ID and password for all connection requests.
Default
0 (Disabled)
GUI Tab
Advanced tab
Use Snapshot Transactions
Attribute
SnapshotSerializable
Description
Allows your application to use the snapshot isolation level if your Microsoft SQL Server database is configured for Snapshot isolation. Supported only for Microsoft SQL Server 2005 and higher.
See “Isolation and Lock Levels Supported” for details about using the snapshot isolation level.
This connection option can affect performance. See “Performance Considerations” for details.
Valid Values
0 | 1
When set to 1 (Enabled) and your application has the transaction isolation level set to serializable, the application uses the snapshot isolation level.
When set to 0 (Disabled) and your application has the transaction isolation level set to serializable, the application uses the serializable isolation level.
This option is useful for existing applications that set the isolation level to serializable. Using Snapshot Transactions in this case allows you to change to the snapshot isolation level with no or minimum code changes. If developing a new application, you can code it to set the connection attribute SQL_COPT_SS_TXN_ISOLATION to the value SQL_TXN_SS_SNAPSHOT.
Default
0 (Disabled)
GUI Tab
Advanced tab
Workstation ID
Attribute
WSID
Description
The workstation ID that is used by the client.
Valid Values
string
where string is the workstation ID.
Default
None
GUI Tab
Advanced tab