客户IT只允许集成windows帐号登录,所以web服务器数据库连接改为Integrated Security=SSPI,应用程序池帐号设定为localsystem,同时在db服务器将NT AUTHORITY\LOCAL SERVICE设置为sysadmin。
现在问题来了,一切数据库相关的读,写,删,执行存储过程都没有问题,但是在服务器往excel写入数据确报以下错误。
The requested operation could not be performed because OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" does not support the required transaction interface。
把数据库连接改为user id=sa;password=pwd的方式就没有任何问题。
不知道有没有解决的办法!
------解决思路----------------------
试试:
ssms登录数据库——》连接服务器——》provider 找到【Microsoft.ACE.OLEDB.12.0】 ——》属性——》勾选“允许进程内”
------解决思路----------------------
楼主可以在看看这些参考:
http://blog.csdn.net/kk185800961/article/details/9186335
https://www.simple-talk.com/sql/t-sql-programming/questions-about-using-tsql-to-import-excel-data-you-were-too-shy-to-ask/#first