Connection String Properties


You can use the following connection properties with a connection URL or SQL Server 2000 JDBC data sources.

Table 2-1 lists the JDBC connection properties supported by the SQL Server driver, and describes each property. The properties have the form:

property=value 

NOTE: All connection string property names are case-insensitive. For example, Password is the same as password.

Table 2-1. SQL Server Connection String Properties 
Property
Description
DatabaseName
OPTIONAL
The name of the SQL Server database to which you want to connect.
Password
A case-insensitive password used to connect to your SQL Server database. A password is required only if security is enabled on your database. If so, contact your system administrator to get your password.
PortNumber
The TCP port (use for DataSource connections only).
SelectMethod
SelectMethod={cursor | direct}. Determines whether or not Microsoft SQL Server "server cursors" are used for SQL queries.
Setting SelectMethod to direct allows SQL statements to be executed without incurring server-side overhead for managing a database cursor over the SQL statement. Direct mode is the most efficient for executing Select statements; however, applications are limited to a single active statement while executing inside a transaction. If multiple result sets are required from a single query execution, then the application must set SelectMethod to direct.
Setting SelectMethod to cursor allows multiple active statements within a transaction.
The default is direct.
ServerName
The IP address (use for DataSource connections only).
User
The case-insensitive user name used to connect to your SQL Server database. A user name is required only if security is enabled on your database. If so, contact your system administrator to get your user name.


Previous Document Previous Page Next Document Next Page Synchronize TOC Synchronize with Contents