.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
Subhransu Sekhar Jena
abhays
SP
DotnetUser
Post New Web Links

Cannot fetch a row from OLE DB provider "ADSDSOObject" for linked server

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Sql Server
 

Hi

 

I run following query in sql server 2005

select * FROM         OPENQUERY(collegedc01,
                      'select samAccountName from 'LDAP://collegedc01/ou=students,dc=mycollege,dc=local'
where objectclass = 'user' and objectcategory='person'') ;

I got 17500 records

When I run same script in sql server 2008 64 bit  I got the error message

Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "ADSDSOObject" for linked server "collegedc01"

Then I run the following query in sql server 2008 and it is returning result without any error

select top 17401 * FROM         OPENQUERY(collegedc01,
                      'select samAccountName from 'LDAP://collegedc01/ou=students,dc=mycollege,dc=local'
where objectclass = 'user' and objectcategory='person'') ;

Maximum I can use 17401 without error. If I tried to use any value more than 17401 or without top clause, I am receiving error messgae.

I filter out 174


View Complete Post


More Related Resource Links

Linked Server using ASE OLE DB Provider and Select * into where datetime maps to SQL Server datetime

  
Hi, I'm currently using MSSQL Server 2008 x64 SP1 [Microsoft SQL Server Standard Edition (64-bit)], version 10.0.2531.0.  I'm using Sybase ASE 15.0.3 ESD#3, or 15.5 ESD#1, and doing a simple Select into query where my original table on ASE, pubs..sales with DDL: stor_id     char(4)     not null, ord_num  varchar(20) not null, date         datetime    not null I run this query with Linked Server, using ASE OLE DB Provider x64, 15.5.0.1016: select * into mssql_sales from openquery(ASE1550, 'select * from pubs2..sales') The table mssql_sales has the datetime datatype from ASE mapped to datetime2(7). [With MSSQL Server 2005 the mapping is straight to datetime]. So far no problem.  However, if doing a bulk load out of this table, mssql_sales and trying to bulk into a table on MSSQL Server 2005: C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp odbc.dbo.mssql_sales3 out c:\temp\mssql_sales3.dat -Spvero-2k8vm\pvms2008 -T -n -k Starting copy... 30 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total     : 1      Average : (30000.00 rows per sec.) C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp test.dbo.mssql_sales in c:\temp\mssql_sales3.dat -Spvero-2k3\pvms2005 -T -n -k Starting copy..

Linked Server using ASE OLE DB Provider and Select * into where datetime maps to SQL Server datetime

  
Hi, I'm currently using MSSQL Server 2008 x64 SP1 [Microsoft SQL Server Standard Edition (64-bit)], version 10.0.2531.0.  I'm using Sybase ASE 15.0.3 ESD#3, or 15.5 ESD#1, and doing a simple Select into query where my original table on ASE, pubs..sales with DDL: stor_id     char(4)     not null, ord_num  varchar(20) not null, date         datetime    not null I run this query with Linked Server, using ASE OLE DB Provider x64, 15.5.0.1016: select * into mssql_sales from openquery(ASE1550, 'select * from pubs2..sales') The table mssql_sales has the datetime datatype from ASE mapped to datetime2(7). [With MSSQL Server 2005 the mapping is straight to datetime]. So far no problem.  However, if doing a bulk load out of this table, mssql_sales and trying to bulk into a table on MSSQL Server 2005: C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp odbc.dbo.mssql_sales3 out c:\temp\mssql_sales3.dat -Spvero-2k8vm\pvms2008 -T -n -k Starting copy... 30 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total     : 1      Average : (30000.00 rows per sec.) C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp test.dbo.mssql_sales in c:\temp\mssql_sales3.dat -Spvero-2k3\pvms2005 -T -n -k Starting copy..

Linked Server using ASE OLE DB Provider and Select * into where datetime maps to SQL Server datetime

  
Hi, I'm currently using MSSQL Server 2008 x64 SP1 [Microsoft SQL Server Standard Edition (64-bit)], version 10.0.2531.0.  I'm using Sybase ASE 15.0.3 ESD#3, or 15.5 ESD#1, and doing a simple Select into query where my original table on ASE, pubs..sales with DDL: stor_id     char(4)     not null, ord_num  varchar(20) not null, date         datetime    not null I run this query with Linked Server, using ASE OLE DB Provider x64, 15.5.0.1016: select * into mssql_sales from openquery(ASE1550, 'select * from pubs2..sales') The table mssql_sales has the datetime datatype from ASE mapped to datetime2(7). [With MSSQL Server 2005 the mapping is straight to datetime]. So far no problem.  However, if doing a bulk load out of this table, mssql_sales and trying to bulk into a table on MSSQL Server 2005: C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp odbc.dbo.mssql_sales3 out c:\temp\mssql_sales3.dat -Spvero-2k8vm\pvms2008 -T -n -k Starting copy... 30 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total     : 1      Average : (30000.00 rows per sec.) C:\Program Files\Microsoft SQL Server\100\Tools\Binn>bcp test.dbo.mssql_sales in c:\temp\mssql_sales3.dat -Spvero-2k3\pvms2005 -T -n -k Starting copy..

Cannot create an instance of OLE DB provider "IBMDADB2" for linked server

  
System:  Win 2003, SQL Server 2005, Using an AD win account that is not a member of the Admin group on the server.   Error message from Management Studio query window:   Msg 7302, Level 16, State 1, Line 1 Cannot create an instance of OLE DB provider "IBMDADB2" for linked server "Sname".   Event messages associated with this error:   App Event ID: 19036 The OLE DB initialization service failed to load. Reinstall Microsoft Data Access Components. If the problem persists, contact product support for the OLEDB provider.   Sys Event ID: 10016 The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {2206CDB0-19C1-11D1-89E0-00C04FD7A829}  to the user domain\user SID (S-1-5-21-126051702-1034962659-2130403006-7826).  This security permission can be modified using the Component Services administrative tool.   I'm getting this error message when trying to run an openquery statement through a linked server to DB2. (SELECT * FROM OPENQUERY(Sname, 'SELECT * FROM tablename')) The linked server has a remote login and password that it uses to connect to DB2.   I found this from another post on how to fix this error: Expand Component Services - Computers - My Computer - DCOM Config Select MSDAINITIALIZE Right Click properties then security Under Security - Launch Permission: enable Local Launch and L

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access

  
Hi,I am importing Excel 2007 file into SqlServer 2005 (Sqlexpress). The office 2007 is not installed in the machine. I have downloaded and installed "AccessDatabaseEngine". When I execute following statement SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\File1.xlsx', 'SELECT * FROM [Sheet1$]');The following error is comming:Msg 7399, Level 16, State 1, Line 1The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.Msg 7350, Level 16, State 2, Line 1Cannot get the column information from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".Can any one suggest what should I do to resolve?Thanks,Parmeshthee. Learning .Net 3.5

Trouble with: Linked Server to Oracle using OraOLEDB.ORacle Provider

  

Hi--

 

I am running SQL Server 2005 on Win2k3:

Microsoft SQL Server Management Studio      9.00.2047.00
Microsoft Analysis Services Client Tools      2005.090.2047.00
Microsoft Data Access Components (MDAC)      2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML      2.6 3.0 4.0 6.0
Microsoft Internet Explorer      6.0.3790.1830
Microsoft .NET Framework      2.0.50727.42
Operating System      5.2.3790


I have the OraOLEDB.Oracle provider installed to the (C:\oraclexe) directory.

I am having problems querying from linked oracle server.  When i setup oracle as a linked server and purposely enter an incorrect password the query i run tells me i have an incorrect password.   So it at least knows that.  when i set the correct password and run a query I get this error:

(i replaced the real server name with "someServer".)

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "OraOLEDB.Oracle" for linked server "SomeServer" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 1

C

Error: OLE DB provider "SQLNCLI" for linked server "MHTIS01T" returned message "Multiple-step OLE DB

  

Hi All, i am getting the error (in title) while executing the package.

can somebody tell me how do i solve it?


Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server

  

Dear All,

please to try to help me what could be the problem ?. when  i try to excute my stored proc in my sqlserver management studio it excuting fine when i trying to Excute using Asp.net application it giving Error. iam working on Sql Server, mt linked server is Oracle. my proc is like :

select  ID,Name  from OPENQUERY(TEST, ''
SELECT
 ID ,
 Name  from Details)

Error:Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "TEST".
OLE DB provider "OraOLEDB.Oracle" for linked server "TEST" returned message "ORA-01017: invalid username/password; logon denied".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Please try to guide me i unable run using asp.net App


thanking you,


santhosh


OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Syntax error

  

Hi there.

I have been sitting hours and hours trying to solved this issue with absolutely no luck.

I have the following query:

Code Snippet

DECLARE @sqlScript1 VARCHAR(8000)

-- Import records fron source file (OPENROWSET)

SET @sqlScript1 = 'SELECT * INTO ##tmpOrders FROM OPENROWSET(''Microsoft.Jet.OLEDB.4.0'' ,

''Excel 8.0;Database=' + @fileName + ''', ''SELECT [Sale Time] AS SaleTime, Ref, [Item Title] AS ItemTitle, [Item Type] AS ItemType, [Item Id] AS ItemId,

Quantit

Linked server config shows no Oracle provider

  

Hi,

In a process to config linked server on MSSQLServer2008 on WS2008R2.

Installed Oracle client 11.2, configured the variables TNS_ADMIN, ORACLE_HOME;

configured Data Sources (ODBC)- System DNS ->Oracle with Driver SQORA32.dll and have all Oracle databases in the drop down menu.

Next:

New linked server - Under provider -> there is no Oracle provider listed!?

What I'm missing here?

 

Thx,


ATL OLE DB Provider in SQL Server as linked server

  
Hi
I don't know if this is the good forum for my question:



- I need to create a OLE DB Provider which can work in SQL Server (as a linked server).

- I use Visual Studio 2010, and try to use ATL Framework.
If I start a new projet ATL, and add ATL OLE DB Provider class by defaut
or, if I use examples advancedPV and updatePV.

the builds are ok.

I see the My ole db providers in sql server, but I can not use it.

Error : 7403.

I can use ole providers in others clients (without "begintrans" method) and it work,
 
- what must I implement in the default ATL OLE DB Provider projet for use it in MS SQL Server ?
- where I can find codes sources samples ?
- others solutions ?

thanks in advance

best regards

Francis

VFP MVP

Server 2008 R2 -> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error mess

  

So I am using the aspnet_regiis.exe tool to encrypt sections of the web.config in my asp.net applications and services.  I have done this for years successfully on Windows Server 2003 (IIS 6).  However I just moved some apps over to Windows Server 2008 R2 (with IIS 7.5) and I am now receiving the following error at runtime:

"Server was unable to process request. ---> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data."

Now I am quite familiar with this process and am stumped at what I have missed this time around.  I have done ALL of the following which typically suffices for the process on the server. PLEASE READ ALL AND DO NOT PROVIDE RESPONSES OR LINKS FOR THINGS I HAVE ALREADY DONE Thanks!!  Wink

  1. Imported the keys to the server using aspnet_regiis -pi  Result: Success
  2. Given FULL permission (using -full switch) using aspnet_regiis -pa to ALL of the following accounts  Result: Success
    1. Linked Server to access Excel 2007

        

      Hi

      I'm tried SELECT * INTO XXX FROM OPENROWSET alongwith Microsoft.ACE.OLEDB.12.0.

      Apparently the query requires the sql account to have SYSADMIN privileges.

      Considering that SYSADMIN should not be provided to a database account on a Production Server, I tried using the Linked Server method.

      Following is my code.


      Exec sp_addlinkedserver 'AB2','Ace 12.0','Microsoft.ACE.OLEDB.12.0','\\202.46.215.35\sagarr\Test1\cpc\c2\AB2.xlsx',NULL,'Excel 12.0;IMEX=1'
      Exec sp_addlinkedsrvlogin 'AB2','false',NULL,NULL,NULL
      go
      SELECT * INTO [CPCAB2.xlsx] FROM OPENQUERY([AB2] ,'SELECT * FROM [Sheet1$]')
      Exec sp_dropserver 'AB2','droplogins'


      Now i get the following error

      Error.15247-User does not have permission to perform this action

      My Excel file, Database and Windows Application run on separate machines.

      i have provided the following privileges

      GRANT ALTER ANY LOGIN TO sqlaccount
      GRANT ALTER ANY LINKED SERVER TO sqlaccount


      EXEC sp_configure 'show advanced options', 1
      RECONFIGURE
      EXEC sp_configure 'ad hoc distributed queries', 1
      RECONFIGURE

      The DisAllowAdHocProcess in

Linked Server to access Excel 2007

  
Hi I'm tried SELECT * INTO XXX FROM OPENROWSET alongwith Microsoft.ACE.OLEDB.12.0. Apparently the query requires the sql account to have SYSADMIN privileges. Considering that SYSADMIN should not be provided to a database account on a Production Server, I tried using the Linked Server method. Following is my code. Exec sp_addlinkedserver 'AB2','Ace 12.0','Microsoft.ACE.OLEDB.12.0','\\202.46.215.35\sagarr\Test1\cpc\c2\AB2.xlsx',NULL,'Excel 12.0;IMEX=1' Exec sp_addlinkedsrvlogin 'AB2','false',NULL,NULL,NULL go SELECT * INTO [CPCAB2.xlsx] FROM OPENQUERY([AB2] ,'SELECT * FROM [Sheet1$]') Exec sp_dropserver 'AB2','droplogins' Now i get the following error Error.15247-User does not have permission to perform this action If I execute the query from Query Analyzer it works fine, but fails when I execute it using Windows App and encapsulate code in Stored Proc. My Excel file, Database and Windows Application run on separate machines. i have provided the following privileges GRANT ALTER ANY LOGIN TO sqlaccount GRANT ALTER ANY LINKED SERVER TO sqlaccount EXEC sp_configure 'show advanced options', 1 RECONFIGURE EXEC sp_configure 'ad hoc distributed queries', 1 RECONFIGURE The DisAllowAdHocProcess in Registry has value 0 Please let me know what additional permissions should i set to get it working???
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend