Skip Ribbon Commands
Skip to main content

Quick Launch

Chris Gideon > Posts > Almost Parallel DB Attach
July 16
Almost Parallel DB Attach

Recently I was helping out in troubleshooting a My Site upgrade when we stumbled on Parallel db attach.

Started multiple SharePoint Management Shell sessions on the same WFE.
Ran the following three database attaches in parallel:
PS C:\Users\mossaccount> Mount-SPContentDatabase -name MySites_Content01 -webapplication http://mysites.contoso.com -databaseserver sqlSvr\sql01


PS C:\Users\mossaccount> Mount-SPContentDatabase -name MySites_Content02 -webapplication http://mysites.contoso.com -databaseserver sqlSvr\sql01


PS C:\Users\mossaccount> Mount-SPContentDatabase -name MySites_Content03 -webapplication http://mysites.contoso.com -databaseserver sqlSvr\sql01

The  error I receive is:
PS C:\Users\mossaccount> Mount-SPContentDatabase -name MySites_Content03 -webapplication http://mysites.contoso.com -databaseserver sqlSvr\sql01
 Mount-SPContentDatabase : Failed to acquire the lock to object [SPWebApplication Name=mysites.contoso.com] after 120 retries.
At line:1 char:24
+ Mount-SPContentDatabase <<<<  -name MySites_Content03
-webapplication http://mysites.contoso.com -databaseserver
sqlSvr\sql01
    + CategoryInfo          : InvalidData:
(Microsoft.Share...ContentDatabase:    SPCmdletMountContentDatabase)
[Mount-SPContentDatabase], SPException
    + FullyQualifiedErrorId :
Microsoft.SharePoint.PowerShell.SPCmdletMountContentDatabase

 

After much review it was discovered that we were simply too fast launching the PS commands. The configuration object was locked from the first command.

How do you get past it?

You give it some time between launches of the PS commands. For example, wait until you see the upgrade.log appear from the first attach before you begin each subsequent one.​

Comments

1

1
 on 2/18/2012 11:31 PM

is there an alternate way

hi Chris,
is there a way we can lock the SPWebApplication object while running stuff in parallel?

regards,
Sridhar
 on 3/30/2012 10:30 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Attachments