New-SPConfigurationDatabase : Cannot open database "SP2010_ConfigDB" requested by the login. The login failed.

Jul 9, 2012 at 3:03 PM

 

 

 

 

 

Any clues on this one? I have increased the 'start-sleep' setting in autspinstallerFunctions.ps1 from 5 to 20.

 

AutoSPInstaller Output:

# Waiting a few seconds seems to help with the Connect-SPConfigurationDatabase barging in on the New-SPConfigurationDatabase command; not sure why...
Start-Sleep 20

Thanks Guys!

 

 

- Checking farm membership for DCHISWSF2AP01 in "SP2010_ConfigDB"...

 

- Attempting to join farm on "SP2010_ConfigDB"...

- No existing farm found.

- Creating config database "SP2010_ConfigDB"...

 

New-SPConfigurationDatabase : Cannot open database "SP2010_ConfigDB" requested by the login. The login failed.

 

Login failed for user 'ADHCSCDEV\spAdminDev'.

At D:\SP-Scripts\SP2010\AutoSPInstaller\AutoSPInstallerFunctions.ps1:807 char:31

+ New-SPConfigurationDatabase <<<< -DatabaseName "$configDB" -DatabaseServer "$DBServe

r" -AdministrationContentDatabaseName "$CentralAdminContentDB" -Passphrase $SecPhrase -FarmCredenti

als $farmCredential

+ CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase:SPCmdletNewSPConfigu

rationDatabase) [New-SPConfigurationDatabase], SqlException

+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase

 

--------------------------------------------------------------

- Script aborted!

- Error creating new farm configuration database

 

 

Jul 9, 2012 at 4:14 PM

You might want to check if 'ADHCSCDEV\spAdminDev' account is assigned dbcreator and securityadmin roles on SQL server.

If you're trying to connect to existing config database, the account shoul be assigned db_owner and SharePoint_Shell_Access roles on this database.

 

Jul 9, 2012 at 4:44 PM

Dbcreator and SA roles assigned to that account... and this is a new install... (no configdb)...

 

Coordinator
Jul 15, 2012 at 5:02 PM

Hmm it doesn't make sense that the account would pass the SQL validation test earlier in the script (which checks for dbcreator and securityadmin roles) but would then fail to login and create the database... do the SQL server logs provide any more insight?

Brian

Jul 16, 2012 at 11:16 PM
It did create the configdb. I increased the sleep time to 30, and that seemed to fix it

-Rick

----- Reply message -----
From: "brianlala" <notifications@codeplex.com>
To: [email removed]
Subject: New-SPConfigurationDatabase : Cannot open database "SP2010_ConfigDB" requested by the login. The ... [autospinstaller:362535]
Date: Mon, Jul 16, 2012 4:28 pm


From: brianlala

Hmm it doesn't make sense that the account would pass the SQL validation test earlier in the script (which checks for dbcreator and securityadmin roles) but would then fail to login and create the database... do the SQL server logs provide any more insight?

Brian

Jul 25, 2012 at 12:07 PM

hey guys,

I'm noticing the same issue. I couldn't get it working even if I try to increase the sleep time. I verified the permissions for the account it is setup as needed. Any thoughts?

Vijay

Aug 25, 2012 at 9:32 AM
Edited Aug 27, 2012 at 3:00 AM

Hi all,

  Encountered this bug today as well with a new install.. Increasing to 30 sleep time doesn't do anything.

Figured out that I had to disconnect the farm if it is broken or accidently installed by the script before it could work again. you can try this and see if it helps you .. Disconnect the farm via Sharepoint Configuration Wizard.

Feb 4, 2014 at 2:19 PM
Hello all,

manually running the Configuration Wizard to disconnect the farm was the solution for me too ! Thanks !

Chantal
May 6, 2014 at 7:47 AM
I also got the same problem. I resolved this problem, by running the PS Configuration wizard and then i disconnected the farm.
Sep 29, 2014 at 5:21 PM
AutoSPInstallerFunctions.ps1 > Line 1651 add...
Disconnect-SPConfigurationDatabase -Confirm:$false
Aug 7, 2015 at 11:20 PM
Hi, have the same exact issue.
  1. AutoSPInstaller created the config db and later I see this error (I have necessary permissions to spinstall account)
  2. I have tried increasing sleep time to 30 - no luck
  3. When I tried to Disconnect-SPConfigurationDatabase :Couldn't found the local farm - still no luck
Did anyone able to fix this issue? Is it related to any other permissions in SQL?