Excel file on network share - It is already opened exclusively by another user, or you need permission to view and write its data - excel

I am developing an SSIS package that uses a data flow task that has an Excel source. The provider for the connection is Microsoft.ACE.OLEDB.12.0.
If I point the connection manager to a local file on my computer and run the package in Visual Studio, it completes successfully.
However, if I point the connection manager to a UNC network share on my local domain, and run the package from Visual Studio, it fails with the following messages:
Error: 0xC0202009 at MyPackage, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data.".
Error: 0xC020801C at Data Flow Task, Excel Source [2]: 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.
More info:
The file from the UNC share is identical to my local file.
The file from the UNC share is not open before running the package.
My domain user (which I use to run Visual Studio) has Owner permission level for the UNC share. Also, Everyone has Read permission level for the UNC share.
Run64BitRuntime is set to False (probably not relevant).
I am runing Visual Studio locally.

Solved it by using a variable for the file path and then using that variable as an expression for the ConnectionString property of the connection.
I also doubled the backslashes in the variable that contains the pash, so instead of \computer\share\ I used \\computer\share\.
My guess is that the slashes solved the problem, but I've yet to test and find out for sure.

Related

Trying to create an Azure logic app connection but I got error

I'm trying to create a work, recieve a message from SAP.
I build a VM and install latist SAP NCo (SAP Connector for Microsoft .NET 3.0.23.0 for Windows 64bit (x64), May 28, 2020), SAP Logon 760 and on-permises data gateways.
when I trying to create the connection, I got a error report here:
Please check your account info and/or permissions and try again. Details: Failed to process request. Error details: 'Could not load file or assembly 'sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. The system cannot find the file specified.
What should I do? Thanks!
enter image description here
According to the error message, it seems the assembly files might be in the wrong location. So please check and make sure that you copied the assembly files to the data gateway installation folder. You can refer to this tutorial.

SSIS Connection to Excel via ACE.OLEDB as Service Account

We have a process which needs to work with a series of Excel (sigh) files.
The setup is:
SQL agent job run as a SSIS proxy account.
Calls SSIS package on a share on the server.
Which then starts accessing these excel files using the ACE driver.
The process will work under my credentials.
The process will work under other people's credentials.
The process will work in debug mode (although this is not a fair test
as that would use my local machine's driver)
The process will not work using the SSIS proxy account.
The process WILL work if I make the SSIS proxy account an
administrator on the server.
I have ruled out the following:
access to the files share. The account can load text files from
there.
32bit/64bit issues. The account CAN run given sufficient
permissions.
My opinion is that the service account needs some sort of level of permission to be able to use the driver. I can't work out what though.
I have tried LOCAL SECURITY POLICY option "Load and unload device drivers" with no success. ( I did think this had done it, but then realised that I had left the account in the admin group :-( )
Finally, the error message in question:
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager
"TPR_ReadReportsExcelConnection" failed with error code 0xC0202009.
There may be error messages posted before this with more information
on why the AcquireConnection method call failed.
This seems to be beyond the supported scope depending on how you've set up your SSIS proxy account. See Additional Information section here. Not enough points to post an image so here is the important sentence:
provided the SSIS jobs run in the context of a logged-on user with a valid HKEY_CURRENT_USER registry hive

Assertion Failed getting External Data from SQL Server

When I select from the Ribbon Get External Data -> From SQL Server I get the following Assertion Failed dialog from EXCEL:
I have tried this with an Admin account, and after logging off and on, with the same results. If I select -> From Analysis Services I don't get the dialog.
f I choose Ignore I get a dialog to specify connection details but it always fails, reporting an inability to locate the server, even though in SSMS and through TFS I can connect to the server without issues. The DB server is my local machine, though a Named Instance.
(Yes, I have very carefully checked that the server name is correctly specified.)
Has anyone seen this before and can assist in diagnosing the issue?
Update:
The error dialog occurs immediately on clicking on From SQL Server.
If I opt to Retry from the dialog, I get the standard Microsoft Excel has stopped working, would you like to check online for a solution etc. dialog. If I attempt to debug the code I am informed that Source is not available, although symbols appear to be successfully downloaded form the Microsoft Symbol Server.

Run Excel Macro using SSIS throught SQL Jobs failed

I have a task to create Excel VBA and run that macro on SSIS. I can successfully run the Excel Macro from the SSIS Package, but I have a problem when I run that SSIS on SQL Jobs. I have created Credential, Proxy SSIS, and set SSIS unprotected, but it always fails.
Error Message
Executed as user: HARNANDA7-PC\HARNANDA7.
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved.
Started: 11:56:14
Error: 2014-05-28 11:56:17.61 Code: 0x00000001
Source: Script
Task
Description: Exception has been thrown by the target of an
invocation. End Error
DTExec: The package execution returned
DTSER_FAILURE (1).
Started: 11:56:14 Finished: 11:56:17 Elapsed:
2.652 seconds.
The package execution failed. The step failed.
but if i create Folder named "Desktop" on C:/Windows/System32/config/systemprofile/ or C:/Windows/SysWOW64/config/systemprofile/
then the SSIS package runs successfully through SQL Jobs.
I'm confused as to what the problem is here. Can anyone help?
Big thanks
For whatever reason (no one seems to know from what I can gather), Excel requires that the desktop folder be present on your machine. It must use it as a global setting or possibly a default setting for creating files or temporary files. If that folder doesn't exists then (and this is just a guess) excel either has issues creating these temporary files or requires that the Desktop directory exists and, in both cases, throws an error if the Desktop directory does not exist.
I doubt that they would want to make something like this an explicit feature, so it is most likely a bug with Excel.

error while exporting data in an ssis package to an excel destination

I just moved my ssis package from my desktop to my server.The package exports data from sqlserver to an excel sheet. I see the following error when I try to run the package. The error occurs in the excel destination of the dataflow task.
Error at Package [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_ERROR. The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. Error code: 0x00000000.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
Error at Data Flow Task [Excel Destination [16]]: SSIS Error Code
[Excel Destination [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC020 9302. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
I also made the following changes as I had errors before and the package wouldnt even run .
Set the delay validation to false on the data flow task.
set the Run64bitruntime under the project properties to true
Can anyone tell me what I need to do ?
PS : I am running the package on the server and MS excel is not installed on it . Could that be causing the error ?
PS : I am running the package on the server and MS excel is not
installed on it . Could that be causing the error ?
Yes
I did also find another thread describing a solution:
HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine
Which does not involve installing the full version of Office:
NOTE: this DOES work for office 2010 even though it is for 2007
office, dont ask me why it just does :)
download and install this: http://www.microsoft.com/download/en/confirmation.aspx?id=23734
in VS click add data source, follow the wizard and enjoy! :)
They are using Visual Studio but I imagine you should be able to run your SSIS package without having to "add a data source" as it's looking for the COM componetmicrosoft.ace.oledb.12.0 which should now be registered.
I ran into this once and had to save the excel sheets as .csv and use a flat file connection manager:
http://msdn.microsoft.com/en-us/library/ms140266.aspx
an alternative is using 32bit option in SSIS project.
Right Click on Solution and select Properties > Select Debugging and specify FALSE for option Run64Bitruntime

Resources