Wierd error with MOSS 2007, says not able to connect to database though database is ok
Server Error in '/' Application. Hi, can you please help to get rid of this error. we are building a custom moss application where the UI built user controls. we are using SmartPart webpart to render user controls. we have our business logic as custom dll. when I was trying to do someting with my code, suddenly this error has popped up. I feel there is nothing about the database, other applications are running properly along with central admin, SSP. Also i can log into database and see things there.There is something else wrong and i am not able to figure it out. Please help me. Exact erorr and event log info is pasted here.Thanksharinath Unable to connect to database. Check database connection information and make sure the database server is running. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Unable to connect to database. Check database connection information and make sure the database server is running.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [COMException (0x81020024): Unable to connect to database. Check database connection information and make sure the database server is running.] Microsoft.SharePoint.Library.SPRequestInternalClass.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +0 Microsoft.SharePoint.Library.SPRequest.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +208[SPException: Unable to connect to database. Check database connection information and make sure the database server is running.] Microsoft.SharePoint.Library.SPRequest.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) +249 Microsoft.SharePoint.SPSite.PreinitializeServer(SPRequest request) +346 Microsoft.SharePoint.SPWeb.InitializeSPRequest() +222 Microsoft.SharePoint.SPWeb.EnsureSPRequest() +51 Microsoft.SharePoint.SPWeb.get_Request() +44 Microsoft.SharePoint.SPWeb.GetWebPartPageContent(Uri pageUrl, PageView requestedView, HttpContext context, Boolean forRender, Boolean includeHidden, Boolean mainFileRequest, Boolean fetchDependencyInformation, Boolean& ghostedPage, Byte& verGhostedPage, String& siteRoot, Guid& siteId, Int64& bytes, Guid& docId, UInt32& docVersion, String& timeLastModified, Byte& level, Object& buildDependencySetData, UInt32& dependencyCount, Object& buildDependencies, SPWebPartCollectionInitialState& initialState, Object& oMultipleMeetingDoclibRootFolders, String& redirectUrl, Boolean& ObjectIsList, Guid& listId) +1252 Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.FetchWebPartPageInformationForInit(HttpContext context, SPWeb spweb, Boolean mainFileRequest, String path, Boolean impersonate, Boolean& fGhostedPage, Byte& verGhostedPage, Guid& docId, UInt32& docVersion, String& timeLastModified, SPFileLevel& spLevel, String& masterPageUrl, String& customMasterPageUrl, String& webUrl, String& siteUrl, Guid& siteId, Object& buildDependencySetData, SPWebPartCollectionInitialState& initialState, String& siteRoot, String& redirectUrl, Object& oMultipleMeetingDoclibRootFolders, Boolean& objectIsList, Guid& listId, Int64& bytes) +692 Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetFileForRequest(HttpContext context, SPWeb web, Boolean exclusion, String virtualPath) +210 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.InitContextWeb(HttpContext context, SPWeb web) +79 Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +336 Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext context) +25 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object oSender, EventArgs ea) +322 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 Event log InformationEvent code: 3005 Event message: An unhandled exception has occurred. Event time: 6/19/2008 5:15:27 PM Event time (UTC): 6/19/2008 11:45:27 AM Event ID: f5fd373f52a84038b8edaf6c93370082 Event sequence: 3 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/661828605/Root-1-128583495230678048 Trust level: WSS_Minimal Application Virtual Path: / Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\1234\ Machine name: HARINATH Process information: Process ID: 272 Process name: w3wp.exe Account name: PDB\Administrator Exception information: Exception type: COMException Exception message: Unable to connect to database. Check database connection information and make sure the database server is running. Request information: Request URL: http://harinath:1234/default.aspx Request path: /default.aspx User host address: 10.136.175.70 User: PDB\Administrator Is authenticated: True Authentication Type: NTLM Thread account name: PDB\Administrator Thread information: Thread ID: 1 Thread account name: PDB\Administrator Is impersonating: False Stack trace: at Microsoft.SharePoint.Library.SPRequestInternalClass.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName) at Microsoft.SharePoint.Library.SPRequest.PreInitServer(String bstrAbsoluteRequestUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gApplicationId, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, Boolean fHostHeaderIsSiteName)Custom event details: For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
June 19th, 2008 3:08pm

error is coming for PDB\Administrator account. please verify this user for database rights. check your application identity pool user also on IIS to make sure it has the proper rights on database. can you browse to any of your sharepoint site other than central admin and SSP? most probably those two are running under a different user id in application pool identity and your sharepoint web application is running under a different user which does not have rights on database.
Free Windows Admin Tool Kit Click here and download it now
June 19th, 2008 4:12pm

That may not be the case PDB\Administrator is the domain admin account (within the VPC image). all application pools are running with the pdb\administrator credentials only. Yes I can browse other applications other than SSP and central administrator, where i didnt do any custom programming like user controls etc any other ideas?
June 20th, 2008 9:02am

Check out this post on my blog: http://greggalipeau.wordpress.com/2008/06/07/sharepoint-cannot-connect-to-the-configuration-database/ It has a link to the Microsoft article talking about how SharePoint might not be able to connect to configuration databases. Also, it has a link to a specific database issue I found once that showed up my SharePoint environment. Maybe these links will help you debug through your issue. Your issue seems to have a little different behavior than the error message these links talk about. But, the debug steps they take you through might help you uncover your specific issue. Good luck, Greg
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2008 2:51pm

Hello! I have exactly the same daily in 5 servers farm. "unable to connect to database". MOSS is IU1. WFEs are in DMZ, SQL in backend. No idea what it is. It happens at exactly the same time. My Network, DBA and Antivirus teams have no idea what is it. No idea from MS support. :-( Googling and Blinging does not help also. Plan to setup sniffer between WFEs and SQL tomorrow. Will see. Cheers, Alexey
June 12th, 2009 12:00am

Moving to Admin. Doesn't look like a code questionWSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2009 2:47pm

Hi, Check out this link for help: http://prasanjitmandal.blogspot.com/2010/05/how-to-fix-central-administration.htmlBR, PM
May 28th, 2010 10:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics