Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to run the non-GUI version of configuration wizard using power shell because I would like to set config and admin database names. GUI wizard doesn't give you all possible options for configuration (but even though it doesn't do it either).

I run this command:

New-SPConfigurationDatabase
    -DatabaseName "Sharepoint2010Config"
    -DatabaseServer "developer.mydomain.pri"
    -AdministrationContentDatabaseName "Sharepoint2010Admin"
    -DatabaseCredentials (Get-Credential)
    -Passphrase (ConvertTo-SecureString "%h4r3p0int" -AsPlainText -Force)

Of course all these are in the same line. I've broken them down into separate lines to make it easier to read. When I run this command I get this error:

New-SPConfigurationDatabase : Cannot connect to database master at SQL server a
t developer.mydomain.pri. The database might not exist, or the current user does
not have permission to connect to it.
At line:1 char:28
+ New-SPConfigurationDatabase <<<<  -DatabaseName "Sharepoint2010Config" -Datab
aseServer "developer.mydomain.pri" -AdministrationContentDatabaseName "Sharepoint
2010Admin" -DatabaseCredentials (Get-Credential) -Passphrase (ConvertTo-SecureS
tring "%h4r3p0int" -AsPlainText -Force)
    + CategoryInfo          : InvalidData: (Microsoft.Share...urationDatabase:
   SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SPExcep
  tion
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon
   figurationDatabase

I created two domain accounts and haven't added them to any group:

  • SPF_DATABASE - database account
  • SPF_ADMIN - farm account

I'm running powershell console as domain administrator. I've tried to run SQL Management studio as domain admin and created a dummy database and it worked without a problem.

I'm running:

  • Windows 7 x64 on the machine where Sharepoint Foundation 2010 should be installed and also has preinstalled SQL Server 2008 R2 database
  • Windows Server 2008 R2 Server Core is my domain controller that just serves domain features and nothing else

I've installed Sharepoint according to MS guides http://msdn.microsoft.com/en-us/library/ee554869%28office.14%29.aspx installing all additional patches that are related to my configuration.

Any ideas what should I do to make it work?

share|improve this question

2 Answers 2

You appear to be missing the required FarmCredentials parameter to the cmdlet.

If that doesn't help, you may need to run the Powershell console as administrator to get the command to work properly.

http://technet.microsoft.com/en-us/library/ff607838.aspx

share|improve this answer
    
powershell command automatically asks for missing parameters, namely FarmCredentials that I enter when it runs. If I'd omit DatabaseName I would be asked to enter it as well, so consider FarmCredentials not missing. –  Robert Koritnik Jun 5 '10 at 8:11
    
@Robert: if you run SQL Server Management Studio as the user specified in DatabaseCredentials can you properly access the master database? –  MattB Jun 5 '10 at 15:57
    
I haven't explicitly accessed master DB iteself, but I guess if I've successfully created a new DB on the server it had to write to master DB tables anyway. I doubt that Sharepoint installation writes directly to the master DB or does it? Why would it? It has to create new credentials, new databases, tables etc... I don't see any particular reason why explicit access to master DB would be needed? –  Robert Koritnik Jun 7 '10 at 7:50
    
@Robert: I don't either, and you are correct that adding a DB should access the master table and prove you have permissions. I'm more curious about the "as the user specified in DatabaseCredentials portion right now I think. Also - I did a google for part of the error you are getting, and saw a couple of blog posts that say turning off Windows Firewall fixed this problem. Worth a shot I guess. (If it fixes it, you can turn back on Windows Firewall and open UDP 1434 for sqlbrowser.exe) –  MattB Jun 8 '10 at 13:26
    
@MattB: I've disabled firewall but no obvious difference. Actually Sharepoint Foundation 2010 is being installed on the same machine where SQL Server 2008 R2 database is. This is driving me crazy. So many days, no improvement. This makes me look really stupid! –  Robert Koritnik Jun 9 '10 at 16:43

Try logging into the SQl server and verify the perms on the DB created. The user accounts you specified must have dbcreator and dbsecurity roles on SQL server to create the config DB.

HTH

share|improve this answer
    
They do. I didn't bother to rung the powershell command anymore. It just didn't work anyway. So I configured with defaults using the GUI config utility. Which did work. –  Robert Koritnik Oct 3 '10 at 9:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.