Configuring the Adapter for Microsoft SQL Server ODBC
Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.
Declaring Connection Attributes
In order to connect to an Microsoft SQL Server database server, the adapter requires connection and authentication information. You supply this information using the SET CONNECTION_ATTRIBUTES command.
You can:
- Enter connection and authentication information in the WebFOCUS Reporting Server browser interface or ibi Data Migrator desktop interface configuration panes. The consoles add the command to the profile you select: the global server profile (edasprof.prf), a user profile (user.prf), or a group profile (if supported on your platform).
- Manually add the command in the global server profile (edasprof.prf), in a user profile (user.prf), or in a group profile (if supported on your platform).
You can declare connections to more than one Microsoft SQL Server database by including multiple SET CONNECTION_ATTRIBUTES commands. The actual connection to the Microsoft SQL Server takes place when the first query that references the connection is issued. If you issue multiple SET CONNECTION_ATTRIBUTES commands:
- The connection named in the first SET CONNECTION_ATTRIBUTES command serves as the default connection.
- If more than one SET CONNECTION_ATTRIBUTES command contains the same connection name, the adapter uses the attributes specified in the last SET CONNECTION_ATTRIBUTES command.
Configuring an Adapter
- Procedure
- From the WebFOCUS Reporting Server browser interface Applications page, click Get Data.
- In the WebFOCUS Reporting Server browser interface, click the (+) button, and find the adapter on the page or, in the ibi Data Migrator desktop interface, exapnd the Available folder if it is not already expanded.
- In the ibi Data Migrator desktop interface, expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
- Right-click
the adapter name and/or version and select
Configure.
The Add Adapter to Configuration pane opens.
- Enter values for the parameters required by the adapter, as described in the chapter for the specific adapter you want to configure.
- Click
Configure. The configured adapter is added to the
Configured list in the
WebFOCUS Reporting Server browser interface or in the Adapters
list in the ibi Data Migrator desktop interface resources tree.
In the WebFOCUS Reporting Server browser interface, the adapter remains on the Available Adapters list with an asterisk to indicate that at least one connection has been configured. You can configure additional connections from either the Configured or Available list by right-clicking the adapter and clicking Add Connection.
Connection Attributes for Microsoft SQL Server ODBC
The MS SQL Server ODBC adapter is under the SQL group folder.
The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.
Logical name used to identify this particular set of connection attributes. The default is CON01.
Name of the machine where Microsoft SQL Server is running. If that machine has more than one instance of SQL Server installed, provide the server name and instance name as follows: server\instance
There are three methods by which a user can be authenticated when connecting to Microsoft SQL Server:
- Explicit. The user ID and password are explicitly specified for each connection and passed to Microsoft SQL Server, at connection time, for authentication as a standard login. This option requires that SQL Server security be set to SQL Server and Windows.
- Password Passthru. The user ID and password received from the client application are passed to Microsoft SQL Server, at connection time, for authentication as a standard login. This option requires that SQL Server security be set to SQL Server and Windows.
- Trusted. The adapter connects to Microsoft SQL Server as an operating system login using the credentials of the operating system user impersonated by the server data access agent. This option works with either of SQL Server security settings
Primary authorization ID by which you are known to the data source.
Password associated with the primary authorization ID.
Name of the Microsoft SQL Server database used for this connection. The database name, including path, must be enclosed in single quotation marks. This parameter is optional. If not specified, it defaults to the database associated with the authorization ID.
Please refer to Microsoft SQL Server documentation for all available connection string keywords used to change the behavior of the ODBC connection.
Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.
If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).
Store the connection attributes in the server profile (edasprof).
Declare Connection Attributes Manually on Windows
Explicit authentication. The user ID and password are explicitly specified for each connection and passed to Microsoft SQL Server, at connection time, for authentication.
ENGINE MSODBC SET CONNECTION_ATTRIBUTES [connection] server/userid,password [;dbname][;additional_connection_string_keywords]
Password passthru authentication. The user ID and password are explicitly specified for each connection and passed to Microsoft SQL Server, at connection time, for authentication.
ENGINE MSODBC SET CONNECTION_ATTRIBUTES [connection] server/[;dbname][;additional_connection_string_keywords]
Trusted authentication. The adapter connects to Microsoft SQL Server as a Windows login using the credentials of the Windows user impersonated by the server data access agent.
ENGINE MSODBC SET CONNECTION_ATTRIBUTES [connection]server/,[;dbname][;additional_connection_string_keywords]
Overriding the Default Connection
Once connections have been defined, the connection named in the first SET CONNECTION_ATTRIBUTES command serves as the default connection. You can override this default using the SET DEFAULT_CONNECTION command.
Change the Default Connection
ENGINE MSODBC SET DEFAULT_CONNECTION connection
where:
Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.
Is the connection defined in a previously issued SET CONNECTION_ATTRIBUTES command. If this name was not previously declared, the following message is issued:
FOC1671, Command out of sequence
- If you use the SET DEFAULT_CONNECTION command more than once, the connection name specified in the last command serves as the default connection.
- The SET DEFAULT_CONNECTION command cannot
be issued while an uncommitted transaction (LUW) is pending. In
that case, the following message is issued:
FOC1671, Command out of sequence.
Selecting the Default Connection
The following SET DEFAULT_CONNECTION command selects the database server named SAMPLE as the default database server:
ENGINE MSODBC SET DEFAULT_CONNECTION SAMPLE
Controlling the Connection Scope
The SET AUTODISCONNECT command controls the persistence of connections when using the adapter for each of the connections you want to establish.
Control the Connection Scope
ENGINE MSODBC SET AUTODISCONNECT ON {FIN|COMMAND|COMMIT}
where:
Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.
Disconnects automatically only after the session has been terminated. FIN is the default value.
Disconnects automatically after each request. Depending on how often the event occurs, the SET AUTODISCONNECT command may result in considerable overhead. Almost all of this overhead is not related to the server. It is related to the operating system and the data source.
Disconnects automatically only after COMMIT or ROLLBACK is issued as a native SQL command.