After deleting a database - receiving 3760 Errors in eventviewer

Application logs error (start)
SQL Database 'XXXX' on SQL Server instance 'np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query' not found. Additional error information from SQL Server is included below.

Cannot open database "XXXX" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
(end log data)

After taking over an SBS 2008 server I have the above 3760 error occuring about every 5 minutes in the application logs.

XXXX = database name

History, or the closest thing to it, of what I can figure out has occurred.

1) Company XXXX (same name as database) is a vendor for my client
2) No one at my client or the vendor remembers ever creating a database or installing anything on the SBS 2008 server.
3) Client does remember just deleting the database becuase it's logging files had grown so big and no one knowing what it was for.
4) About every five minutes I get the error.  

Everything that I've found so far points me to going into the properties for NT AUTHORITY\NETWORK SERVICE and making sure it is a DBO for the database... well the database is gone.

I have looked through IIS admin for any possible application/website that may be referencing this database.  either I'm looking in the wrong place or it doesn't exits.

Ditto for looking in Sharepoint administrator.

I am looking for suggestions on how to clean this error out and resolve the problem.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Evan CutlerVolunteer Chief Information OfficerCommented:
It sounds like you have a detach error.
I always detach a db before I Delete it completely.

Try this in CMD Prompt (administrator):
sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
use master
alter database XXXX set single_user with rollback immediate
sp_detach_db XXXX
dougclingmanAuthor Commented:

when the response after I enter the first "go" command id the following:

Changed database context to 'master'.
Msg 5011, Level 14, State 5, Server Servername\MICROSOFT##SSEE, Line 2
User does not have permission to alter database 'XXXX', or the database doe
s not exist.
Msg 5069, Level 16, State 1, Server Servername\MICROSOFT##SSEE, Line 2
ALTER DATABASE statement failed.

where XXXX = the name of the database in the error
where servername = the actual production server name
dougclingmanAuthor Commented:
sorry about that... poor english skills today I guess.

"when the response after I enter the first "go" command is the following:" should have been -

The response I get after I enter the first "go" command is the following:

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

dougclingmanAuthor Commented:
Increasing the points.  
I assume it is a sharepoint server. If yes,you need to remove the name of the content database from the central management.
Go to
Application Management- > content database -> remove it.
Or else check the below link:-

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Normaly before that error there should be another error-line whit error severity and state, especially last is interesting. Expect yours to be 27 or 38.

Possible to profiler trace to see more details about the origin of this attempt

There will stil b a shedulled job or a service be running from that vendor that is trying every 5 minutes to do his thing with that database.
When deleting a database because it's becoming to big means something is filing it! And dropping something you don't know very well should involve a period of searching for errors that something is missing.  As earlier mentioned better first block access (read only, detach ....) after already tracing on usage to find what things should be stopped of trying again.
Ryan McCauleyEnterprise Analytics ManagerCommented:
Have you checked the default database for the "NETWORK SERVICE" user in SQL Server? If their default database is set to a database that's no longer on the server, it will cause the login to fail when a different database isn't specified as part of the connection string, which could get you this error.

Check the properties on that account in SQL Server and if it's set to the missing database (or is blank), then change it to something else.
dougclingmanAuthor Commented:
TempDBA: It was listed in Sharepoint.  I removed it from sharepoint and will monitor for additional errors (will be onsite in the morning).

jogos: thank you for the advice about carefully removing a database.  That will be good for the others who read this.  Just wish the person who removed it before I took the server over would have followed common logic.

RM: did not find that.
dougclingmanAuthor Commented:
Thanks for pointing out the exact location in Sharepoint to look for that.  I had looked in Sharepoint ... but obviously not the right spot.

Thanks for the help.  As of this morning there are no errors for this database.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.