我从sql SERVER 2012创建了一个链接oledb / odbc连接到Pervasive sql:
USE [master] GO /****** Object: LinkedServer [KSLAP208] Script Date: 2/8/2013 10:38:55 AM ******/ EXEC master.dbo.sp_addlinkedserver @server = N'KSLAP208',@srvproduct=N'Pervasive ODBC Interface',@provider=N'MSDAsql',@datasrc=N'C003',@location=N'localhost' /* For security reasons the linked server remote logins password is changed with ######## */ EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'KSLAP208',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL GO EXEC master.dbo.sp_serveroption @server=N'KSLAP208',@optname=N'collation compatible',@optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'KSLAP208',@optname=N'data access',@optvalue=N'true' GO EXEC master.dbo.sp_serveroption @server=N'KSLAP208',@optname=N'dist',@optname=N'pub',@optname=N'rpc',@optname=N'rpc out',@optname=N'sub',@optname=N'connect timeout',@optvalue=N'0' GO EXEC master.dbo.sp_serveroption @server=N'KSLAP208',@optname=N'collation name',@optvalue=null GO EXEC master.dbo.sp_serveroption @server=N'KSLAP208',@optname=N'lazy schema validation',@optname=N'query timeout',@optname=N'use remote collation',@optname=N'remote proc transaction promotion',@optvalue=N'true' GO
测试连接成功.
但是,当我尝试从数据库中选择时:
select * from [KSLAP208].[C003]..PA_Profile_BASE_1119
Msg 7399,Level 16,State 1,Line 1 The OLE DB provider "MSDAsql" for linked server "KSLAP208" reported an error. The provider reported an unexpected catastrophic failure. Msg 7330,State 2,Line 1 Cannot fetch a row from OLE DB provider "MSDAsql" for linked server "KSLAP208".
我究竟做错了什么?为什么我不能选择?我可以看到linnked服务器上的所有数据库和表.
如果我选择少量的数据选择field1,field2它的工作没有问题.