Search code examples
sql-serverwindowssharepointsql-server-2008-r2sharepoint-2010

error on create new config database for sharepoint wih New-SPConfigurationDatabase


I want setup SharePoint 2010 and SQL Server 2008. When I want to create new configuration database with this command:

    New-SPConfigurationDatabase -DatabaseName "SPConfigDB" -AdministrationContentDatabaseName "SPAdminContentDB" -DatabaseServer "DESKTOP-54TIM0H\dadkh" -Passphrase (ConvertTo-SecureString "mypass" -AsPlainText -force) -FarmCredentials (Get-Credential)

run it in SharePoint 2010 Management Shell I have error:

New-SPConfigurationDatabase : Cannot connect to database master at SQL server at DESKTOP-54TIM0H\dadkh. The database migh
t not exist, or the current user does not have permission to connect to it.
At line:1 char:28
+ New-SPConfigurationDatabase <<<<  -DatabaseName "SPConfigDB" -AdministrationContentDatabaseName "SPAdminContentDB" -Dat
abaseServer "DESKTOP-54TIM0H\dadkh" -Passphrase (ConvertTo-SecureString "mypass" -AsPlainText -force) -FarmCredent
ials (Get-Credential)
    + CategoryInfo          : InvalidData: (Microsoft.Share...urationDatabase:SPCmdletNewSPConfigurationDatabase) [New-S
   PConfigurationDatabase], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase

I follow this guide but the problem not solved.

database list

I create a database with name "SPConfigDB" but no result.


Solution

  • problem was IIS! I check status of IIS and it was not active! so I enable it and problem solved!