Issue with creating Config DB

May 12, 2010 at 6:43 PM
Edited May 12, 2010 at 7:02 PM

The script is having a issue with opening the config db after it creates it. Which is weird if it can create it (i see the db in my sql server), why is it having a issue opening it after creating. I tried having it pass the password in the setinputs file and with it prompting me for the password by leaving the value blank. I have included log file and my setinputs.xml below.

- Creating & configuring (or joining) farm:
 - Enabling SP PowerShell cmdlets...
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.
 - Checking farm membership for SP2010TEST in "sp2010test_ConfigDB"...

 - Attempting to join farm on "sp2010test_ConfigDB"...
 - No existing farm found, creating config database "sp2010test_ConfigDB"...
New-SPConfigurationDatabase : Cannot open database "sp2010test_ConfigDB" reques
ted by the login. The login failed.
Login failed for user 'DEV\SPSAdmin'.
At C:\SharePoint 2010\scripted\AutoSPInstaller.ps1:526 char:31
+             New-SPConfigurationDatabase <<<<  -DatabaseName "$ConfigDB" -Data
baseServer "$DBServer" -AdministrationContentDatabaseName "$CentralAdminContent
DB" -Passphrase $SecPhrase -FarmCredentials $Cred_Farm
    + CategoryInfo          : InvalidData: (Microsoft.Share...urationDatabase:
   SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SqlExce 
  ption
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon
   figurationDatabase
 
ScriptHalted
At C:\SharePoint 2010\scripted\AutoSPInstaller.ps1:527 char:23
+             If (-not $?) {throw <<<< }
    + CategoryInfo          : OperationStopped: (:) [], RuntimeException
    + FullyQualifiedErrorId : ScriptHalted
 
Press any key to exit...

 

 

Here is what my setinputs.xml looks like

 

<DBServer>sql</DBServer>

 <DBPrefix>sp2010test</DBPrefix>

<<CentralAdminContentDB>AdminContentDB</CentralAdminContentDB>
  <ConfigDB>ConfigDB</ConfigDB>
  <FarmPassPhrase>1Farmphrase</FarmPassPhrase>
  <FarmAcct>dev\spsadmin</FarmAcct>
  <FarmAcctPWD>1password</FarmAcctPWD>
  <FarmAcctEmail>spmail@dev.com</FarmAcctEmail>
  <CentralAdminPort>1024</CentralAdminPort>
  <AppPoolAcct>spsadmin</AppPoolAcct>
  <AppPoolAcctPWD>password</AppPoolAcctPWD>
  <PortalDB>PortalDB</PortalDB>
  <PortalName>Home Portal</PortalName>
May 12, 2010 at 7:23 PM
Edited May 12, 2010 at 7:24 PM

As a workaround i ran the New-SPConfigurationDatabase from a powershell window and entered in all the same data i put in setinputs.xml and then ran the script again and the rest of the install went fine. All other db's created with no problems, site collection created etc...

Although i would like to figure out why it is not working.

Coordinator
May 12, 2010 at 7:47 PM

Hmm I did run into the same problem during the course of my testing, but then the problem went away (or at least I haven't seen it again). You can see an artifact of my debugging as I left

#sleep 5

around line 530 in the script; you can uncomment it (remove the #) and try again - for some reason it resolved things during my first few attempts but then I found I didn't need it anymore - I guess maybe it should stay there?

Coordinator
May 12, 2010 at 7:54 PM

BTW, the error "Cannot open database "sp2010test_ConfigDB" requested by the login. The login failed." is actually thrown by the Connect-SPConfigurationDatabase command (and is normal if there is no exiting DB to connect to), but for some reason it appears to come from New-SPConfigurationDatabase - as though the commands were happening in too rapid succession - hence the sleep 5 to try to split things up.

May 12, 2010 at 9:11 PM
brianlala wrote:

BTW, the error "Cannot open database "sp2010test_ConfigDB" requested by the login. The login failed." is actually thrown by the Connect-SPConfigurationDatabase command (and is normal if there is no exiting DB to connect to), but for some reason it appears to come from New-SPConfigurationDatabase - as though the commands were happening in too rapid succession - hence the sleep 5 to try to split things up.

That makes sense. I uninstalled and did it over again with sleep 5 uncommented and it worked fine. Looks like you are right, it must run them so fast it doesn't even see that the DB is created. Thanks for the quick response and help!

Jun 26, 2014 at 6:27 PM
All:
Ran into this issue during an installation of 2013 with the latest build: 3.96. http://resolutionsnet.wordpress.com/2013/03/26/new-spconfigurationdatabase-and-a-login-failure/ was a fix for this issue (Cliff notes: psconfig -cmd configdb -disconnect), probably because I hadn't uninstalled SharePoint, but rather had simply deleted all databases and re-run the installer (is there any suggestion for a "complete re-do" that I forgot to read??). Commenting/uncommenting # Sleep 5 did nothing for me. HTH somebody.
Thanks,
Alex