你关注过Linked Server OLE DB选项吗?
来源:互联网 发布:c语言游戏开发视频 编辑:程序博客网 时间:2024/05/22 09:05
曾经遇到过一个由于第三方的OLE DB创建的Linked Server 导致SQL Server Crash的案例,最后的解决办法是修改OLE DB Provider选项“Allow inprocess”。所以解决Linked Server的某些问题还是要知道这些选项的含义。
这里我将这些选项以及解释列出来,希望能够对大家有所帮助:
Provider option
Description
DynamicParameters
If nonzero, indicates that the provider allows for the '?' parameter marker syntax for parameterized queries. Set this option only if the provider supports the ICommandWithParameters interface and supports a '?' as the parameter marker. Setting this option enables SQL Server to execute parameterized queries against the provider. Executing parameterized queries against the provider can yield better performance for certain queries.
NestedQueries
If nonzero, indicates that the provider allows for nested SELECT statements in the FROM clause. Setting this option enables SQL Server to delegate certain queries to the provider that require nesting SELECT statements in the FROM clause.
LevelZeroOnly
If nonzero, only level 0 OLE DB interfaces are invoked against the provider.
AllowInProcess
If nonzero, SQL Server allows for the provider to be instantiated as an in-process server. When this option is not set in the registry, the default behavior is to instantiate the provider outside the SQL Server process. Instantiating the provider outside the SQL Server process helps protect the SQL Server process from errors in the provider. When the provider is instantiated outside the SQL Server process, updates or inserts referencing LOB columns (varchar(max), nvarchar(max), varbinary(max), text, ntext, or image) are not allowed.
The SQL Server Native Client OLE DB provider cannot be instantiated out of process. An error is raised if you set the SQL Server Native Client OLE DB provider to run out of process and try to run a distributed query.
NonTransactedUpdates
If nonzero, SQL Server allows for updates, even if ITransactionLocal is not available. If this option is enabled, updates against the provider are not recoverable, because the provider does not support transactions.
IndexAsAccessPath
If nonzero, SQL Server tries to use indexes of the provider to fetch data. By default, indexes are used only for metadata and are never opened.
DisallowAdhocAccess
If a nonzero value is set, SQL Server does not allow for ad hoc access through the OPENROWSET and OPENDATASOURCE functions against the OLE DB provider. When this option is not set, SQL Server also does not allow for ad hoc access.
This option controls the ability of non-administrators to run ad hoc queries. Administrators are not affected by this option.
SqlServerLike
If nonzero, the provider supports the LIKE operator as the operator is implemented in SQL Server. When this option is set, SQL Server will consider pushing to the provider the queries that have LIKE predicates against remote columns as part of the evaluation of the distributed query.
更多信息参考MSDN:ConfiguringOLE DB Providers for Distributed Queries
另外关于Linked Server选项的解释参考:LinkedServer Properties
- 你关注过Linked Server OLE DB选项吗?
- OLE DB provider "MICROSOFT.JET.OLEDB.4.0" for linked server
- [SQL SERVER] 如何linked server連接Oracle (Oracle Provider for OLE DB)
- Setting up a Microsoft Linked Server uing OLE db to Sql Anywhere
- OLE DB provider "SQLNCLI11" for linked server "dbLink01" was unable to begin a distributed transac
- 你关注过孩子的眼睛吗??
- OLE DB provider "SQLNCLI11" for linked server "10.0.9.137" returned message "事务中的登记已经存在。". 消息 7395,级
- OLE DB
- OLE DB
- OLE DB
- ole db
- OLE DB
- Microsoft SQL Server 2000 分布式查询:ole db 连接
- Microsoft OLE DB Provider for SQL Server 错误 '80040e2f'
- VC中使用OLE DB读写SQL Server简明指南
- PB用OLE DB连接MS SQL Server
- PowerBuilder10自动注册OLE DB数据源(sql server 2000)
- OLE DB 数据类型的数据类型映射 (SQL Server Compact Edition)
- 记毕业季—勇敢面对
- Discrete Mathematics——01 命题与命题公式
- poj 2253
- 一个睡五分钟等于六个钟头的方法
- 我不能微笑的原谅自己,没有爱又能怎样:伤感心情日志
- 你关注过Linked Server OLE DB选项吗?
- 线性代数矩阵论——行列式的一些性质推论及Cramer法则
- 线性代数矩阵论——特征值特征向量相似矩阵应用示例
- 性代数矩阵论——矩阵的基本运算——加、减、取负、乘、数乘、转置
- 线性代数矩阵论——矩阵的属性
- 集合论——关系的闭包,等价关系与划分
- sequence题解(贪心)
- DEVICE_ATTR() 与 sysfs接口
- 集合论——二元关系的表示方法,特殊的二元关系及关系的运算