2

I receive the following error when attempting to create a new SharePoint 2016 Configuration db in SQL 2017.

PS command and Error:

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. PS C:\Users\spintall> New-SPConfigurationDatabase -DatabaseName SharePoint_Config -DatabaseServer dbname -AdministrationContentDatabaseName SharePoint_Admin_Content_DB -LocalServerRole SingleServerFarm

cmdlet New-SPConfigurationDatabase at command pipeline position 1 Supply values for the following parameters: FarmCredentials Passphrase: ******** New-SPConfigurationDatabase : Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'. At line:1 char:1 + New-SPConfigurationDatabase -DatabaseName SharePoint_Config -Database ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...urationDatabase:SPCmdletNewSPConfigurationDatabase) [New -SPConfigurationDatabase], SqlException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase

Environment:

SQL 2017 / SharePoint 2016

I'm logged into the SharePoint server as spinstall. spinstall is a local admin on the server and has the following server roles in SQL: dbcreator, public and securityadmin.

Any thoughts?

0

Looks like two thing missing from your command, PassPhrase and FarmCrednetials. You have add those in your command then run it again. Like this

New-SPConfigurationDatabase -DatabaseName SharePoint_Config -DatabaseServer dbname  -Passphrase (ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential) -AdministrationContentDatabaseName SharePoint_Admin_Content_DB -LocalServerRole SingleServerFarm

New-SPConfigurationDatabase

  • Thanks Waqas. Same message after adding -passphrase and -farm credentials to the command. After running the command I supplied above, I was prompted to enter farm credentials and passphrase. – C1TonyB May 8 '18 at 14:31
  • are you providing the SPinstall credential in the farm or it is different account? could you please check the SQL server logs as well? – Waqas Sarwar MVP May 8 '18 at 14:48
  • The farm credential is a different account (spfarm). I'm checking sql server logs. – C1TonyB May 8 '18 at 14:55
  • that account also required the DB creator and Security admin rights on SQL server – Waqas Sarwar MVP May 8 '18 at 14:58
  • I added spfarm with dbcreator, public, securityadmin and same deadlock message. – C1TonyB May 8 '18 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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