简体   繁体   English

SSIS Excel 临时目录权限问题

[英]SSIS Excel Temp Directory Permissions Issue

Data Flow Task:Error: Excel Source failed the pre-execute phase and returned error code 0xC02020E8.数据流任务:错误:Excel 源在预执行阶段失败并返回错误代码 0xC02020E8。

Data Flow Task:Error: Opening a rowset for "Sheet$" failed.数据流任务:错误:打开“Sheet$”的行集失败。 Check that the object exists in the database.检查数据库中是否存在 object。

  1. SSIS Package was working prior to a few days ago. SSIS Package 几天前还在工作。
  2. The Package successfully downloads the.xlsx file from the source server Package 成功从源服务器下载.xlsx文件
  3. The package runs successfully when manually initiated from SSISDB package 从SSISDB手动启动时运行成功
  4. The package fails when run from the SQL Job从 SQL 作业运行时 package 失败
  5. The proxy is setup correctly代理设置正确
  6. When I put the domain account that is configured on the proxy in the Administrators group on the SSIS server the job runs successfully当我将在代理上配置的域帐户放在 SSIS 服务器上的管理员组中时,作业成功运行
  7. It SEEMS to be related to the size of the Excel spreadsheet from everything that I have read in researching the issue.从我在研究该问题时阅读的所有内容来看,它似乎与 Excel 电子表格的大小有关。

The Job running the failing package runs three other packages in order.运行失败 package 的作业按顺序运行其他三个包。 Package 1 and 3 fail, Package 2 and 4 work fine. Package 1 和 3 失败,Package 2 和 4 工作正常。 All of the packages are consuming different Excel spreadsheets.所有包都使用不同的 Excel 电子表格。

No - I cannot get the provider to provide us.csv files (well - we're asking but there's no guarantee that they'll do it).不 - 我无法让提供商提供 us.csv 文件(好吧 - 我们正在询问,但不能保证他们会这样做)。

No - I'm not installing Excel on the SSIS server so that our BI developers can write a program to convert the.xlsx to.csv - but I'm thinking about installing Python so that they can do it不 - 我不是在 SSIS 服务器上安装 Excel 以便我们的 BI 开发人员可以编写程序将 .xlsx 转换为 .csv - 但我正在考虑安装 Python 以便他们可以做到这一点

No - I'm not going to keep the service account running the job in the Administrators group on the server不 - 我不会让服务帐户在服务器上的管理员组中运行作业

Everything I've looked at implies that it's a permissions issue on some temp folder that the Access Database drivers (we were using the ACE 12 drivers - and now we're using the ACE 16 drivers - 64 bit) are writing their temp data to that the service account doesn't have access to.我看过的所有内容都表明,Access 数据库驱动程序(我们使用的是 ACE 12 驱动程序 - 现在我们使用的是 ACE 16 驱动程序 - 64 位)正在将它们的临时数据写入其中,这是某个临时文件夹的权限问题服务帐户无权访问。

I've granted Full Control to the service account running the job (which is different from the service account running the SSIS services)我已经授予运行作业的服务帐户完全控制权(这与运行 SSIS 服务的服务帐户不同)

C:\Users<ssis_service_account>AppData\Local\Temp C:\用户 <ssis_service_account>AppData\Local\Temp

c:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp c:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp

c:\users\Default\AppData\Local\Temp c:\用户\默认\AppData\Local\Temp

c:\windows\serviceprofiles\localservice\AppData\Local\Temp c:\windows\serviceprofiles\localservice\AppData\Local\Temp

c:\Windows\Temp c:\Windows\Temp

no joy.没有快乐。

I also logged into the server locally using the proxy account credentials so that a user profile for that proxy account would get created.我还使用代理帐户凭据在本地登录到服务器,以便为该代理帐户创建用户配置文件。 The job ran once and then failed every time after that.该作业运行一次,之后每次都失败。

The ONLY thing that seems to work is to give the Proxy administrator access to the server.似乎唯一可行的是授予代理管理员访问服务器的权限。 Needless to say - this does not appear to be a good thing.不用说——这似乎不是一件好事。

Any ideas?有任何想法吗?

And yes - I'm sure that the.xlsx file has not changed its format - nor has it changed the worksheet name that the data resides on - as, as I've stated, the package runs fine when manually initiated.是的 - 我确定 .xlsx 文件没有改变它的格式 - 它也没有改变数据所在的工作表名称 - 正如我所说的那样,package 在手动启动时运行良好。 It's when it's run by the SQL Agent job is where it fails - and it only fails if the Proxy is not on the local server administrators group.它是由 SQL 代理作业运行时失败的地方 - 只有当代理不在本地服务器管理员组中时它才会失败。

Lastly, we have tried using 32-bit mode but we can't have the 32-bit and 64-bit of the driver installed at the same time.最后,我们尝试过使用32位模式,但我们无法同时安装32位和64位的驱动程序。

SQL Server 2016, Windows Server 2012 R2 SQL 服务器 2016,Windows 服务器 2012 R2

Check your system log for any COM server application error entry.检查您的系统日志中是否有任何 COM 服务器应用程序错误条目。 if you found the entry, then.如果你找到了条目,那么。

  1. Add user to DCOM group将用户添加到 DCOM 组
  2. Add user to Microsoft Sql Server Integration Services将用户添加到 Microsoft Sql 服务器集成服务
  3. Add user to Microsoft Excel Application将用户添加到 Microsoft Excel 应用程序

You have 4 steps and all doing the same thing on different excel files right?你有 4 个步骤,并且都在不同的 excel 文件上做同样的事情,对吗? two of those steps succeed with the same user and two fail right?其中两个步骤对同一个用户成功,两个失败,对吗?

Troubleshooting steps I will take are.我将采取的故障排除步骤是。

  1. Ensure all 4 folders have the same permissions.确保所有 4 个文件夹具有相同的权限。 Also check file permissions, as this could be different from the folder permissions.还要检查文件权限,因为这可能与文件夹权限不同。
  2. Check the file source, I had a very similar problem and noticed that if I open and save the file before putting it in the folder the process succeeds.检查文件源,我遇到了一个非常相似的问题,并注意到如果我在将文件放入文件夹之前打开并保存文件,过程就会成功。 I asked the vendor to always open the file to ensure it was good and then save it.. problem solved for me although they haven't still figured that file out.我要求供应商始终打开文件以确保它是好的,然后保存它。尽管他们还没有弄清楚该文件,但我的问题已经解决了。 3.I will put the problem in a folder and success to check if it is a file problem or folder problem 3.我会把问题放到一个文件夹里面,然后成功查看是文件问题还是文件夹问题

I just finished troubleshooting with Process Monitor.我刚刚使用 Process Monitor 完成故障排除。 It appears that there is something called office cache, and it's location it's elusive... to say the least.似乎有一种叫做办公室缓存的东西,它的位置难以捉摸……至少可以这么说。 For the default profile in modern windows versions should be c:\Users\Default\AppData\Local\Microsoft\Windows\NetCache\Content.MSO.对于现代 windows 版本中的默认配置文件应为 c:\Users\Default\AppData\Local\Microsoft\Windows\NetCache\Content.MSO。 Absolutely non-viable...根本活不下去……

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM