Link to home
Start Free TrialLog in
Avatar of swtjen1
swtjen1Flag for United States of America

asked on

Why is a content db showing failed service logins in Sql Server 2008r2?

We had an old content db that was not mounted and tried to take it offline.  When we did it returned service account login errors.  I am wondering why these errors are happening because this content db is not attached to a site collection.

The only other thing is that our current web app uses the same service account name but I don't see how that would have any bearing on a completely different content db with a different name.  We want to take the db offline and see then see if we need to keep it however it is throwing these errors.  
Avatar of ThatSharepointGuy
ThatSharepointGuy
Flag of Japan image

Well, when you create a content database,  you specify which web application it will be created under...so if all of your content databases are under the same web application, it will use the access account that the web application uses.

Have you tried moving the content database to a new, empty web application?
You could go and create a new web application, and then attach the database there.  

Moving it this way might solve the issue, or at least bring other issues to light.  If possible, make the service account that runs on the 2nd web application different than your 1st web application, so that you can differentiate the errors that (may/most probably will) show up.
You know what, I misread the fact that it wasn't mounted!  Sorry about that!  The access account for that database will still be the same, I believe, as the account that created it.  Even though it is not mounted, the permissions within SQL Server Management Studio on that database are going to be the same.

A quick thing to check would to open up the SQL Server Management Studio, log in, expand databases, expand the database that you're looking for, and check out the security, logins, and roles on it.  You can change the accounts there (removing or adding, etc).  If it's not mounted, you should be fine.

And since it's not mounted into SharePoint, you can back the LDF and MDF and logs to a file share somewhere, and then remove the database completely from your SQL server...which should get rid of pretty much all of your errors.  You still have the LDF/MDF/Logs, so you can re-attach the database to the SQL server if needed, and from there attach it to a site collection if needed.

But if you're looking to just completely remove this database from the picture to see if your farm is ok without it, then do what I suggested with backing up the database, and then removing it from the database.  You can always restore later, and since nobody is using it, it shouldn't cause any problems.
Not sure what version of SharePoint you are on, but I've seen this issue in multiple 2010 farms.  Random SQL login failures to databases that are attached to apps.  I'm starting to think it's a bug in 2010.
Avatar of swtjen1

ASKER

Yeah this database is not mounted to any site collection and it is a 2007 db that we moved over to a 2008 sql r2.  It was a temporary content db we used to move over information into our 2010 environment.

We ran a trace and it appears to be coming from a test server (Sharepoint 2007) we don't even use any more.  I went to look at the web application list and site collections and that content db is not listed anywhere.  So that confuses me more.  

Maybe it could be attached to an app somewhere?  I will look and see if that could be the case but I'm not sure how.  Thank you for your suggestions.
So, is SharePoint and SQL on different servers?  Or all on one?  if different, where are you seeing the errors (what log)?
ASKER CERTIFIED SOLUTION
Avatar of ThatSharepointGuy
ThatSharepointGuy
Flag of Japan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
update please.