無法初始化連結伺服器'(null)'的OLE DB提供者 'Microsoft.Jet.OLEDB.4.0'的資料來源物件
這個問題困擾了好久, 有時重啟sql server 就好, 有時得要重開機.
很困擾.
查到這篇文章
OPENROWSET (T-SQL) – Sometimes You Have to Stop and Smell the Roses
講到權限問題, SQL Server service accounts必需要有TEMP directory的讀寫權限.
查看了一下, SQL SERVER是使用本機帳(local system) 號啟動的.
於是乎,再參考一下這篇文章Location of user account temp dir for service accounts
找到使用者對應
- Local Service (NT AUTHORITY\LOCAL SERVICE)
- Network Service (NT AUTHORITY\NETWORK SERVICE)
- Local System (NT AUTHORITY\SYSTEM)
相關的討論在napierm 的回文中,也有說明.
So, the fix is to do one of the following:
- Change the SQL Server's service Log On to "Local System account" OR
- Provide full access to the "\Documents and
Settings\NetworkService\Local Settings\Temp" for any account that needs
to run the queries.
沒有留言:
張貼留言