Failure at Config DB Creation

Sep 24, 2012 at 9:52 PM

My script is failing at the Config DB creation.  The error looks like this:

 - Checking farm membership for WFE1 in "SP_Config"...

 - Attempting to join farm on "SP_Config"...
 - No existing farm found.
 - Creating config database "SP_Config"...
New-SPConfigurationDatabase : Invalid object name 'master.dbo.spt_values'.
At \\wfe1\C$\SP2010\AutoSPInstaller\AutoSPInstallerFunctions.ps1:823 ch
ar:31
+             New-SPConfigurationDatabase <<<<  -DatabaseName "$ConfigDB" -Data
baseServer "$DBServer" -AdministrationContentDatabaseName "$CentralAdminContent
DB" -Passphrase $SecPhrase -FarmCredentials $farmCredential
    + CategoryInfo          : InvalidData: (Microsoft.Share...urationDatabase: 
   SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SqlExce  
  ption
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon 
   figurationDatabase
 
--------------------------------------------------------------
 - Script aborted!
 - Error creating new farm configuration database

 I ran the script again and goe the following error:

New-SPConfigurationDatabase : SP_Config on SP-SQL contains user-defined
 schema.  Databases must be empty before they can be used.  Delete all of the t
ables, stored procedures and other objects or use a different database.
At \\wfe1\C$\SP2010\AutoSPInstaller\AutoSPInstallerFunctions.ps1:823 ch
ar:31
+             New-SPConfigurationDatabase <<<<  -DatabaseName "$ConfigDB" -Data
baseServer "$DBServer" -AdministrationContentDatabaseName "$CentralAdminContent
DB" -Passphrase $SecPhrase -FarmCredentials $farmCredential
    + CategoryInfo          : InvalidData: (Microsoft.Share...urationDatabase: 
   SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SPUncle  
  anDatabaseException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPCon 
   figurationDatabase

So I deleted the database that had been created and I received the initial error (above) again.

Does anyone know what the trouble might be?

 


Sep 25, 2012 at 2:13 AM

Some google results suggest your master table may be a bad state:

http://www.mckelt.com/post/Invalid-object-name-masterdbospt_values.aspx

http://blogs.msdn.com/b/suhde/archive/2009/04/05/invalid-object-name-master-dbo-spt-values-microsoft-sql-server-error-208.aspx 

http://www.sql-server-performance.com/forum/threads/invalid-object-name-master-dbo-spt_values.1905/ 

Sep 25, 2012 at 6:55 PM

Thank you mongey, you sent me to the right place.

If anyone happens to come across this error in the future.  I was clearing out data from the SQL server from a test installation of SharePoint and I inadvertently deleted the system database called 'master'.  Lucky for me, there is a sql script that resides on the installation media that can rebuild that database.  Just execute the sql script on SQL Server Management Studio (or however you prefer) and you are back up and running.

The file is called "u_tables.sql" and for me, it was found at the following location.

<SQL Server Install Directory>\x64\Setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Install