Msdasql For Linked Server Null Reported An Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Cannot Initialize The Data Source Object Of Ole Db Provider "msdasql" For Linked Server "(null)".
About Us Learn more about Stack Overflow the company Business Learn more about cannot get the column information from ole db provider "msdasql" for linked server "(null)". hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Ole Db Provider "msdasql" For Linked Server "(null)" Returned Message
Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error: “OLE DB provider msdasql provider download ”MSDASQL“ for linked server ”(null)“ returned message ”[Microsoft][ODBC Driver Manager] Data source name not found …" up vote 3 down vote favorite 2 If I execute the following command: select * from OpenRowset('MSDASQL', 'Driver={Microsoft Text Driver (*.txt;*.csv)};DefaultDir=C:\;','select top 10 * from C:\x.csv') GO ... then Microsoft SQL Server Management Studio responds with: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". 64-bit odbc text driver I'm running Microsoft SQL Server 2008 R2 on Win 7 x64. I've also tried it on Windows Vista x32, same error. Q. Has anyone successfully run this command on Win 7 x64? Q. Do any of you experts out there know what could be causing the T-SQL command to fail like this? Update: If you get an error that mentions "ad hoc queries", run the following to eliminate it: EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE; GO EXEC sp_configure 'Ad Hoc Distributed Queries', 1; GO RECONFIGURE; GO Update: It works on an out-of-the-box Win7 x64 machine, but I still can't fix this error on my machine. I'll go with "bulk insert" (see my comments below). sql sql-server tsql share|improve this question edited Feb 16 '11 at 12:03 asked Feb 16 '11 at 0:37 Contango 22.3k35139178 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted I just tried it on x64 Win7 and made it work. I think there are a couple problems. I believe you have to add a space between *.txt; and *.csv Don't include the path with the file name This worked: select *
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more
Openrowset Msdasql
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users microsoft access text driver Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping
Microsoft Sql Server Error 7303 Linked Server
each other. Join them; it only takes a minute: Sign up Cannot initialize the data source object of OLE DB provider “MSDASQL” for linked server “(null)” up vote 10 down vote favorite 6 Having an interesting issue. I'm http://stackoverflow.com/questions/5011226/error-ole-db-provider-msdasql-for-linked-server-null-returned-message reading from an excel file on a server via an OpenRowset in Sql2005. I've run the query a number of times without any problems. I've just gone out for a quick meeting and suddenly I get the error "Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)"" I've made sure the files are not in use on the server and even deleted them and recopied them over onto the server and http://stackoverflow.com/questions/1362108/cannot-initialize-the-data-source-object-of-ole-db-provider-msdasql-for-linked still I'm getting the same error. UPDATE: This only seems to happen if I join two selects from different openrowsets. If I run the queries individually they still work fine. I have done the join before without any issues. Ideas? sql-server-2005 openrowset msdasql share|improve this question edited Sep 1 '09 at 12:07 asked Sep 1 '09 at 12:01 StevenMcD 8,864103250 add a comment| 5 Answers 5 active oldest votes up vote 12 down vote accepted The problem comes because the Temp folder of the User under which the SQL server service is running isn't accessible under the credentials which the query is running. Try to to set the security of this temp folder with minimal restrictions. The dsn that gets created every time you run an openrowset query then can be recreated without any credentials conflict. This worked for me without any restart requirements. share|improve this answer edited Sep 9 '11 at 10:39 Tim Cooper 87.1k21162181 answered Jul 16 '10 at 5:48 Rajesh 13612 1 Where would I find this Temp folder? –Slider345 Jan 7 '13 at 17:37 2 For our specific configuration - Windows Server 2008 R2, SQL Server 2008 R2 - the specific TEMP folder we needed to share with domain users was: C:\Users\
Package=> OpenDatasource=> OpenRowset All of these above approaches has own advantages/disadvantages and selecting appropriate approach depends on business requirement. OpenRowset is easy to implement and http://msqltips.blogspot.com/2013/10/cte-in-sql-server.html more customizable approach. To use OpenRowset, MSDASQL -the OLE DB provider for https://ask.sqlservercentral.com/questions/46671/select-from-openrowset-msdasql.html ODBC should be installed in database server. MSDASQL driver can be downloaded from below link, http://www.microsoft.com/en-us/download/details.aspx?id=13255 After installation of driver using above link or Ms-Office MSDASQL will be available on providers list as shown below, Sample Query:- SELECT *FROM OpenRowset('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=D:\SSIS\Data;', -- CSV file residing folder localtion'SELECT linked server TOP 100 * FROM file_name.csv') -- CSV file name Another approach to read text file, select * from openrowset(BULK 'd:\
Hi, I tried to run the statement below in SQL Server 2008 64 Bit and i got the error. Statement : SELECT * FROM OPENROWSET ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt;*.csv)};DBQ=C:\LogReader\AccurateLogReader\;', 'SELECT * from Feeders.txt') Error: OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". Msg 7303, Level 16, State 1, Line 3 Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)". Could you please help me how can i fix this issue. Thanks in Advance Manoj more ▼ 0 total comments 644 characters / 97 words asked Sep 19, 2011 at 05:11 AM in Default Manoj Balakrishnan 11 ● 1 ● 1 ● 1 edited Sep 19, 2011 at 05:36 AM Fatherjack ♦♦ 43.7k ● 79 ● 98 ● 117 add new comment (comments are locked) 10|1200 characters needed characters left ▼ Everyone Moderators Original poster and moderators Other... Viewable by all users 2 answers: sort voted first ▼ oldest newest voted first 0 I couldn't get the MSDASQL drivers to work, but got a result with the ACE drivers (NOTE I am on 64-bit so using the ACE drivers). It might be that I need the 64 bit version of MSDASQL..... < http://blogs.msdn.com/b/sqlforum/archive/2010/12/20/faq-why-cannot-64-bit-msdasql-access-a-csv-text-file.aspx> SELECT * FROM OPENROWSET ( 'Microsoft.ACE.OLEDB.12.0', 'Text;Database=C:\LogReader\AccurateLogReader; ', 'SELECT * from Feeders.txt') If you are on 32-bit, maybe try SELECT * FROM OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Text;Database=C:\LogReader\AccurateLogReader; ', 'SELECT * from Feeders.txt') more ▼ 0 total comments 657 characters / 71 words answered Sep 19, 2011 at 06:37 AM Kev Riley ♦♦ 64k ● 48 ● 61 ● 81 edited Sep 19, 2011 at 06:38 AM add new comment (comments are locked) 10|1200 characters needed characters left ▼ Everyone Moderators Original poster and moderators Other... Viewable by all users 0 Much appreciated. I tried using 'Microsoft.ACE.OLEDB.12.0' and it is working fine.. Cheers Manoj more ▼ 0 total comments 97 characters / 13 words answered Sep 19, 2011 at 10:38 PM Manoj Balakrishnan 11 ● 1 ● 1 ● 1 add new comment (comments are locked) 10|1200 characters needed characters left ▼ Everyone Moderators Original poster and moderators Other... Viewable by all users Your answer toggle preview: Attachments: Up t