After enabling the Excel Web Services (Oh yes, I have added the document path into the Trusted File Locations in the Central Administration, you can see the post here) I tried to open the Excel file in the browser mode and I have got the following error message.
I have googled about the error message, most of the people suggest to check the event viewer. The event viewer is showing the following Critical error message. Here is the viewer:
The details of event 3760:
Text format of the event:
SQL Database '<Content Database Name>' on SQL Server instance '<Server Instance Name>' not found. Additional error information from SQL Server is included below. Cannot open database "<Content Database Name>" requested by the login. The login failed. Login failed for user '<DomainName\ServiceAccountName>'.
In this above error, we can obviously see the login failed for user ‘<DomainName\ServiceAccountName>’ to access the SharePoint content database. So the solution is grant the permission to this account in the SQL database. (Someone suggested to grant the read access is enough, but for me it didn’t work, so I have granted as db_owner, you might try and see..!). Here are the steps:
Step 1: Go to the content database (you can see in the event log ‘<Content Database Name>’) and click Security node.
Step 2: Click Users on the Security node, you will be getting the all user details on the Object Explorer pane.
Step 3: Just right click on the Users and select the New Users.., you will be getting the following screen.
Step 4: Just enter your service account name (you can see in the event log ‘<DomainName\ServiceAccountName>’) and click the db_owner check box on the Role Members and click ok.
Step 5: Go and check your excel file, wow.. It’s working huh? 🙂
If you don’t want to do the manual process of the above and you are good in PowerShell then you just follow this post and get the solution right away! 🙂
Happy Excel Servicing..! Thanks R./
References:
#1 by Claudio on November 30, 2012 - 2:22 pm
THANK YOU!!!! THANK YOU AND AGAIN THANK YOU!!!
#2 by GP on December 26, 2012 - 2:15 am
Thanks! It worked.
#3 by Bala on February 6, 2013 - 9:56 pm
Very good: I has helped us save time. Thank you
#4 by balatank@hotmail.com on February 6, 2013 - 9:59 pm
Thanks. It has saved us time. Cheers
#5 by Roger on March 6, 2013 - 3:59 am
It’s better to use:
To grant content database access to the managed account
On a SharePoint Server application server, click Start, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell, and then click Run as Administrator.
At the Windows PowerShell Command Prompt, type the following (press Enter after each line):
Copy
$w = Get-SPWebApplication -identity http://
$w.GrantAccessToProcessIdentity(“\”)
#6 by SammyNorway on March 15, 2013 - 5:01 am
Thank You for sharing, helped me a lot.
#7 by Rajanihanth on March 15, 2013 - 6:37 pm
You are very welcome guys, I’m glad this could help!
#8 by Rajanihanth on March 15, 2013 - 6:43 pm
@Roger, I have mentioned about this PowerShell Command in the last paragraph of my post! 🙂 Anyway Thanks!
#9 by Anonymous on March 31, 2015 - 11:40 am
Hey, thanks for this tip. It has helped me a great deal.