Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Import excel files realtime

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-11-06 : 04:22:08
Hi,
Using SSIS, I am successfully importing data from excel files into a table in sql server 2005.
These excel files are ALWAYS open and are being updated from external sources i.e. third party tools.
After doing alot of investigations, I have reached the conclusions as follows:
When the excel files are NOT being updated, then the ssis package works
BUT when the excel files are being updated, then the ssis package does not work. The error is:

[Excel Source [749]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Please note that the excel files MUST be open so that they get updated by the third party tool.
AND, every few minutes i.e. 5 mins, my ssis package should import these excel files.

Question:
How is it possible to load the excel data while it is being updated by external third party.

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-11-06 : 04:23:29
Have you read this topic?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

It also contains information about how to read from Excel files.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-11-06 : 04:48:59
Hi,
These queries give the same problem as if I am using ssis.
They work if the excel files are closed or are not being updated. But if the excel files are open then I get the following error:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".


This is what I am using as you pointed in the link.
select *
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=I:\ContexSourcesPrices\ContexSourcePrices4GCW.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-06 : 04:54:30
Make sure the file exists in the server;s directory and not at the client
Also file should be closed before running the query

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-11-06 : 05:03:24
Did you also try the error-searching method described on page 5?
Using ODBC?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -