none
Error "Failed to connect to the configuration database" when trying to connect new sharepoint site to existing SQL database RRS feed

  • Question

  • I'm using Windows Sharepoint Services 3.0.   We had a hard disk array problem and lost the front-end Sharepoint web site.  The tape backups don't have everything the site needs unfortunately  We still have all the Sharepoint databases though on another server.

    I have a new front-end install of Sharepoint now.  When I run the Sharepoint Products and Technologies Configuration Wizard it sees the databases and accepts the credentials that I type.  Once I click finish, it runs for awhile and then gets the following message: "Configuration Failed.   One or more configuration settings failed.  Competed configuration settings will not be rolled back.  Resolve the problem adn run this configuration wizard again.  The following contains detailed information about the failure: Failed to connect to the configuration database.  An exception of type System.Security.SecurityException was thrown.  Additional exception information: Access denied."

    I've tried using different credentials but other credentials get rejected earlier on in the process.  The credentials I am using are accepted when I type them in and click next.  They are also listed as having full control on the database in SQL.  Just to make sure I have the password correct I reset this password in Active Directory to see if that would help, but I'm having the same issue.

    I've tried using WSS 3.0 and WSS 3.0 with SP2 because some other forum suggested that a version mismatch could cause the problem.   I have not yet tried with WSS 3.0 SP1. 

    I also know there is another Technet thread with the same issue but there doesn't appear to be a solution listed (It's called "Unable to add new frontend machine").
     
    The event viewer says the following: Event Type: Error
    Event Source: SharePoint Products and Technologies Configuration Wizard
    Event Category: None
    Event ID: 104
    Date:  10/1/2009
    Time:  4:51:57 PM
    User:  N/A
    Computer: SERVER1
    Description:
    Failed to connect to the configuration database.
    An exception of type System.Security.SecurityException was thrown.  Additional exception information: Access denied.
    System.Security.SecurityException: Access denied.
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.SharePoint.Administration.SPServer.Update()
       at Microsoft.SharePoint.Administration.SPFarm.Join()
       at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()
       at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()
       at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
    The Zone of the assembly that failed was:
    MyComputer

    Friday, October 2, 2009 12:21 AM

Answers

  • Run the following STSADM commands

    stsadm.exe -o enumsites

       -url <virtual server URL>

       -showlocks

       -redirectedsites

    and

    stsadm -o enumallwebs

       -databasename <database name>

    and

    stsadm -o enumsubwebs

       -url <URL name>

    Let me know how it goes. Also what u can see under the sitecollection lists for that webapp to whichu added the content DB.

     


    Aniket
    • Marked as answer by Lu Zou-MSFT Thursday, October 15, 2009 9:00 AM
    Friday, October 9, 2009 12:35 AM

All replies

  • The best practice is to create a new farm using that same sql instance and then create a new config database and then add the existing content databse to the newly created web app and then delete teh database which are created when u first create a web app(use the exixting databse to the respective web apps which they belongs to old farm). According to my reseach on one of the MS document in MSDN the config backup databse is not going to be useful when u use it to create a new webfrontend.

    Thanks
    Aniket
    Friday, October 2, 2009 6:00 PM
  • I created a new farm and new config database.  I tried adding the existing content database to the Sharepoint Central Administration site on the Application Management tab (I would prefer to add the content database to the regular web site and not the Central Administration site). Nevertheless this was the response:

    "The pre-upgrade scan tool has not yet been run on this database SPContentDatabase Name=SERANetContent Parent=SPDatabaseServiceInstance. You must run the pre-upgrade scan tool before you can continue with the upgrade process. Run the tool from the following path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin\prescan.exe. "

    I wasn't sure which switches to use with prescan.exe but I tried running prescan.exe /all.  The response was "This program requires Windows Sharepoint Services V2."

    Friday, October 2, 2009 6:37 PM
  • You have to create a new webapplication once you setup with your new farm and then add the existing content database to that new webapplication. if the database is too big then add the content database to the webapplication using the "stsadm -o addcontentdb".  what was the version of the old sharepoint farm is it wirh SP1?
    Also verified the permissions both on the SQL server and databases and the web application that the user account you using is have the proper permissions. 
    Thanks


    Aniket
    Friday, October 2, 2009 7:00 PM
  • Ok, I successfully created a new web application.  I'll try adding the existing content database to the new web application now.
    Friday, October 2, 2009 7:16 PM
  • I'm getting the same error when I try to add the existing content database to the new web application:

    "The pre-upgrade scan tool has not yet been run on this database SPContentDatabase Name=SERANetContent Parent=SPDatabaseServiceInstance. You must run the pre-upgrade scan tool before you can continue with the upgrade process. Run the tool from the following path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin\prescan.exe."

    I wasn't sure which switches to use with prescan.exe but I tried running prescan.exe /all.  The response was "This program requires Windows Sharepoint Services V2."

    I am running Windows Sharepoint Services 3.0, not 2.0.  Previously I was also running Windows Sharepoint Services 3.0 (not sure if it had SP1 though).  Do I need to start over with Windows Sharepoint Services 2.0???
    Friday, October 2, 2009 7:47 PM
  • is this database is previously used as WSS 2.0?

    http://support.microsoft.com/default.aspx/kb/937291

    you may give a try for the error message 10 on your own risk ask DB team how that effects.
    Good luck


    Aniket
    Friday, October 2, 2009 10:23 PM
  • The database was used with WSS 3.0 most recently.  I don't know about befor that, but it's very possible the database was used with WSS 2.0  a few years ago. 
    Friday, October 2, 2009 10:27 PM
  • Please confirm with the database team or someone who knows that it belongs to wss 2.0 also do you have any wss 2.0 environment in your company?

    Aniket
    Saturday, October 3, 2009 6:30 PM
  • Hi,

     

    If the existing SharePoint servers have not installed SP1, I would suggest you install SP1 first on all the existing servers and run post configuration wizard. Then add the new server to SharePoint farm to see if it works. You can also try to use command line to add the extra server:

    1.         Open a command prompt window and change to the following directory:

    %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\bin

    2.         Run the following command:

    psconfig –cmd configdb –connect –server <database_server> -database <database_name>

    Note that the database_name above should be the name of the configuration database for the farm you want to connect to.

     

    Hope this helps.

     

    Lu Zou

    Monday, October 5, 2009 3:43 AM
  • We are a small company and do not have a database team.  We are not using WSS 2.0.  Should I attempt using WSS 2.0 to resolve this?
    • Proposed as answer by lmwill Saturday, September 11, 2010 12:13 PM
    Monday, October 5, 2009 7:30 PM
  • Lu,

    There are no other SharePoint servers.   I have already successfully created a new farm consisting of this one and only server.  I am trying to add/connect the old content database to this new Sharepoint server.

    Monday, October 5, 2009 7:32 PM
  • The other network admin here found a Sharepoint database tool that will explore the database and export items directly from the database.  It looks like we are just going to pull out a few select items from the old database using this tool and start with a fresh Sharepoint site otherwise.
    Tuesday, October 6, 2009 4:41 PM
  • BTW, information on the Sharepoint explorer tool and a link to download it can be found at:

    http://blogs.technet.com/sbs/archive/2007/01/05/using-sharepoint-database-explorer-on-sbs.aspx 

    Tuesday, October 6, 2009 6:24 PM
  • It turns out there is a subsite that people want restored and the Sharepoint Explorer tool is not going to help with that. 

    Anyhow I wasn't able to add the database previously because I was trying to add a very old database that expected WSS 2.0.  This was not the correct database.  I have a new blank site and successfully added the correct content database, but I still can't see any of the content or the subsite(s).

    Thursday, October 8, 2009 5:46 PM
  • Run the following STSADM commands

    stsadm.exe -o enumsites

       -url <virtual server URL>

       -showlocks

       -redirectedsites

    and

    stsadm -o enumallwebs

       -databasename <database name>

    and

    stsadm -o enumsubwebs

       -url <URL name>

    Let me know how it goes. Also what u can see under the sitecollection lists for that webapp to whichu added the content DB.

     


    Aniket
    • Marked as answer by Lu Zou-MSFT Thursday, October 15, 2009 9:00 AM
    Friday, October 9, 2009 12:35 AM
  • It's working now somehow.  I've done multiple processes so I don't know what fixed it.   Connecting the correct database obviously didn't hurt.   Thanks for everyone's suggestions and for not giving up.
    Friday, October 9, 2009 9:35 PM
  • Hi,

    I know this is an old post, but I have the same issue. When running your command, I get Access Denied. I cannot understand this, as I have given the SharePointFarm user sysadm. When trying to run the psconfig.exe with dbconfig -connect, I actually get "The password parameter specified with the configdb command is invalid. The password specified for the username accoutn is invalid". This is strange, as I sucessfully am able to open the CMD process with the account that I am giving. Is there a check in SharePoint on special characters etc. that can be the root caus to this?

    Monday, February 27, 2012 2:53 PM
  • You have to login on the server as server admin to run the cmds.

    If its server 2008/R2 you need to run the cmd as run as administrator.

    The account using which u run the command should have enough access to SQL DB.


    Aniket

    Tuesday, February 28, 2012 12:25 AM