Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Unable to create web app with PowerShell - An update conflict has occurred

$
0
0

I am trying to create a new Web Application using PowerShell. I need to use PowerShell because I need to create the Web App using classic authentication and not Claims authentication. the first time I created the Web App, everything went great. Ever since the first time, I get an error and the web app creation does not complete. Just as an FYI, I can create a new Web App using Central Admin, but that creates it with Claims authentication which I cannot use.

Here is my PowerShell script

New-SPWebApplication -Name "SharePoint2013 (82)" -ApplicationPool "SharePoint2013-82" -AuthenticationMethod "NTLM" -ApplicationPoolAccount (Get-SPManagedAccount "GLOBAL\SP_AppPool") -Port 82 -URL "http://sharepoint2013"

Here is the error I get in PowerShell

New-SPWebApplication : An update conflict has occurred, and you must re-try this action. The object SPWebApplication
Name=SharePoint2013 (82) was updated by DOMAIN\SP_Administrator, in the powershell (13020) process, on machine SPWEB01.
 View the tracing log for more information about the conflict.
At line:1 char:1
+ New-SPWebApplication -Name "SharePoint2013 (82)" -ApplicationPool "SharePoint201 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...PWebApplication:SPCmdletNewSPWebApplication) [New-SPWebA
   pplication], SPUpdatedConcurrencyException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWebApplicationUnknown SQL Exception 547 occurred. Additional error information from SQL Server is included below.

The DELETE statement conflicted with the REFERENCE constraint "FK_Dependencies1_Objects". The conflict occurred in database "SP_Config", table "dbo.Dependencies", column 'ObjectId'.
The statement has been terminated.

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

I also get  this error from the trace

Unknown SQL Exception 547 occurred. Additional error information from SQL Server is included below.

The DELETE statement conflicted with the REFERENCE constraint "FK_Dependencies1_Objects". The conflict occurred in database "SP_Config", table "dbo.Dependencies", column 'ObjectId'.
The statement has been terminated.

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

I have tried to resolve the issue by performing the following:

  1. Delete the partially created web app using Central Admin or PowerShell
  2. Clear the file system cache on all servers in the farm (Stopping wss timer job, Saving Copy of the cache.ini file from C:\Documents and Settings\All Users\application data\Microsoft\SharePoint\Config folder. Clearing all the .xml files from the location except cache.ini but Edit the cache.ini to have value 1. Starting the timer job)
  3. Use Products Configuration Wizard (no detach, just 'upgrade') - People have said to select the option to disconnect the server from server farm and revert back again at next step (so you actually do not disconnect), but there is no next step that I have encountered. You select 'disconnect', hit next, and the server disconnects.
  4. Restart all the servers in the farm
  5. Run the PowerShell script again...still get the same error

I have tried it on multiple servers in the farm too.








Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>