cancel
Showing results for 
Search instead for 
Did you mean: 

What options for a MS SQL Server Linked Server provider does the SA OLEDB provider support?

02-17-2012 8:02 AM
VolkerBarth Contributor
17417 views 13 comments Go to solution
SAP Managed Tags
Subscribe

The document page on Setting up a Microsoft Linked Server using OLE DB does tell that one has to set the "AllowInProcess" option for the SQL Anywehre OLE DB provider in order to make queries run at all (which I stumbled over lately).

There are several other provider-wide options as well.

I'd like to know if there are general recommendations to set some of them. As this relies partly on the facilities of the provider, I hope that a general recommendation can be made here. My aim would be to specify at least those options that could lead to performance improvements over the default settings (which is "Off" in general).

The list for MS SQL Server 2008 R2 includes these options - and I have included a comment whether I guess this could/should be specified for the 12.0.1 OLE DB Provider.

EDIT: I've corrected my wrong suggestions based on Jack's guidance:

  • AllowInProcess - *("A Boolean value that specifies whether the OLE DB provider is instantiated as an in-process server.") - must be set, see above
  • DisallowAdHocAccess - ("A Boolean value that specifies whether SQL Server allows ad hoc functions with the OLE DB provider.") - AFAIK this is primarily a security feature, so "it depends", as they say... Should only be set if one wants to disallow OPENROWSET and OPENDATASOURCE functions - and it seems useful to allow these functions as they enable "full passthrough queries" against the SQL Anywhere database.
  • DynamicParameters - ("Setting this option allows SQL Server to execute parameterized queries against the OLE DB provider. The ability to execute parameterized queries against the OLE DB provider can yield better performance for certain queries.") - is supported, methinksis supported by default based on the provider's SQL/ODBC conformance flags and need not be set
  • IndexAsAccessPath - ("If nonzero, SQL Server attempts to use indexes of the provider to fetch data. By default, indexes are used only for metadata and are never opened.") - should be set, methinks should not be set, as it would generate wrong syntax
  • LevelZeroOnly - ("A Boolean value that specifies whether all OLE DB providers are supported or just those that are compliant with the level 0 OLE DB interface.") - ??? should not be set, as it would restrict capabilities of the provider
  • NestedQueries - ("Setting this option allows SQL Server to delegate certain queries to the provider that require nesting SELECT statements in the FROM clause.") - can be set, methinks is supported by default based on the provider's SQL/ODBC conformance flags and need not be set (and may have no effect at all for MS SQL)
  • NonTransactedUpdates - ("A Boolean value that specifies whether data updates with the OLE DB provider are logged and are recoverable.") - ??? should not be set, as it would restrict capabilities of the provider
  • SqlServerLike - ("A Boolean value that specifies whether the OLE DB provider supports the LIKE operator as it is implemented in SQL Server.") - is supported, methinks is supported by default based on the provider's SQL/ODBC conformance flags and need not be set (and may have no effect at all for MS SQL)

Any clarification is highly appreciated.

View Entire Topic
jack_schueler
Product and Topic Expert
Product and Topic Expert

Most of these options are for SQL Server backwards compatibility and are ignored by SQL Server when communicating with the SQL Anywhere OLE DB provider. For example:

"Supports LIKE operator" - SQL Anywhere supports LIKE but don’t expect SQL Server to pass a LIKE operator to SQL Anywhere even when this option is selected.

"Nested queries" - SQL Anywhere supports nested queries but don’t expect SQL Server to pass a nested query to SQL Anywhere even when this option is selected.

Check out this page http://msdn.microsoft.com/en-us/library/ms178039.aspx. When you read this, you'll see the correspondence between the SQLPROP properties and many of the options that you can select. Note that the remark "OLE DB providers that support DBPROPVAL_SQL_ANSI92_ENTRY or DBPROPVAL_SQL_ODBC_CORE do not need any one of the SQLPROPSET_OPTHINTS properties" applies to the SQL Anywhere provider.

Do not select the "Index as access path" option. This option is not ignored but it generates invalid SQL Anywhere syntax.

I don't know whether the following have any affect but don't select them since they are meant to downgrade capabilities. - "Level zero only" option. SQL Server queries which interfaces are supported by the SQL Anywhere provider. - "Disallow ad hoc access" option. The provider supports OPENROWSET. - "Non transacted updates" option. The provider supports transactions.