Common errors when a PWA site is deleted ‘incorrectly’

Disclaimer: This post isn’t going to be up to the level of one of Brian Smith’s technical posts and is based on my own experiences and testing. You’re mileage my vary and I encourage you to vigorously test anything detailed in this post before attempting yourself, I accept no liability should you run into issues etc etc.

Recently there have been a number of posts in the project forums from users that have been running into issues when they have deleted a PWA instance incorrectly. Now what do I mean by incorrectly? Well, by deleting the PWA instance any way other than via the Project Server Service Application > Delete Instance.

So to start, what are the errors you can run into?

The Project Web App Path Site is invalid. Correct path and try again.

The most obvious error is not being able to create a new PWA instance with the name of an instance you had previously deleted incorrectly, even though the Project Server Service Application is showing that particular instance does not exist. From my experimenting this can occur if the PWA site collection is deleted from the ContentDB manually (in the example below, the PWA2 site collection).

The Project Web App Site Path is invalid. Correct path and try again

Note this error will also be seen if you are legitimately trying to create a PWA instance with a duplicate path.

Event 7626  – Cannot start queue

The second common error is a number of Event 7626 in the Event viewer indicating the queue’s (both Project and Timesheet) cannot be started. Again, this was seen when the /PWA2 site collection was manually deleted.

Event 7626 : Cannot start queue

The exact errors you may see (for the search engines) are:

Cannot start queue. SSP: <Guid> SiteUID: <Guid> Url: Queue: ProjectQ

Cannot start queue. SSP: <Guid> SiteUID: <Guid> Url: Queue: TimesheetQ

The database specified is already used by another project server. Enter a different server or database name and try again.

This error can occur if the user deletes the ContentDB hosting the PWA site collection and no other PWA instances exist using those Project databases. As you would imagine, you can also see this error if a legitimate PWA site is using those databases, so make sure you are certain.

The database specified is already used by another project server

So how to fix it?

The easiest fix is to restore the deleted site collection or contentdb from a backup, and then delete the site correctly via the Project Server Service Application.

If you don’t have backups then you are going to need to remove the left over configuration manually, using some PowerShell as outlined below.

1. Find the Project Server Service Application

The first command below will bring back all service applications where the TypeName contains the word Project and assigns them into an object called $serviceapp:

$serviceapp = get-spserviceapplication | ? {$_.TypeName –like “*Project*”}

Powershell - get-spserviceapplication

The second command takes the object and then formats the output as seen above. If you don’t see anything returned, then there are either no Project Server Service Application configured, or you may have typed the command wrong.

2. View the Site Collection Properties

Now that the $serviceapp object contains the service application instance, the next thing we want to do is see the site collections associated with it.  To do this, type the following:

$pwainstances = $serviceapp.Sitecollection


This will find the various site collections associated with the instance:

Powershell - Instances in site collection

In this case, there are two instances associated with the Project Server Service Application, the good /PWA one and the incorrectly deleted /PWA2 one.  Notice even though the underlying site collection has been deleted, SharePoint still thinks its there in the configuration.

3. Remove the configuration for the incorrectly deleted instance

To remove the configuration of the /PWA2 site, enter the following:

$toberemoved = $pwainstances | ? {$_.Id –eq “<Id of the instance to delete>”}


Powershell - Select individual instance

The second $toberemoved shows that the object contains the PWA2 instance that is to be removed. To perform the actual removal, enter:


Finally, perform a check to make sure the instance was deleted as follows:

Powershell - Delete site collection

If all went well, the object $toberemoved should be empty meaning the configuration within SharePoint has been removed and you should be free to go and create your PWA site again without error.

24 thoughts on “Common errors when a PWA site is deleted ‘incorrectly’

  1. Thank you so much!!!
    This issue was driving me nuts, I was banging my gead against it for the last two days.

    A small typo here:
    $serviceapp = get-spserviceapplication | ? ($_.TypeName –like “*Project*”}
    should be
    $serviceapp = get-spserviceapplication | ? {$_.TypeName –like “*Project*”}

    “(” replaced by “{“.

  2. Very good post this one, but I’m stuck at point 2. After using the command lines $pwainstances = $serviceapp.Sitecollection and $pwainstances i get no result.
    Therefor I can’t delete the configuration for the incorrectly deleted instance. Any idea what I can do now?

    • If you see no result at that step then SP thinks there are no Site Collections against the service app. I have seen this when you have more than one Project Service App returned from the

      $serviceapp = get-spserviceapplication | ? {$_.TypeName –like “*Project*”} command.

      If you get more than one Service app, you need to add an additional step to select the problem service app by:

      $serviceapptouse = $serviceapp | ? {$_.Id –eq “”}

      Then for the remaining steps substitute the $serviceapptouse variable.

      Otherwise, ping me again..

  3. Alex,

    It’s true that with the $serviceapp = get-spserviceapplication | ? {$_.TypeName –like “*Project*”} command, i will get two Service apps. The addictional step is clear for me, but I don’t get the “Then for the remaining steps substitute the $serviceapptouse variable.” Can you help me further?

    • Hi,
      So in the next step where it says:

      $pwainstances = $serviceapp.Sitecollection

      Change the $serviceapp to be $serviceapptouse and you should be fine :) All the remaining commands should then remain the same.


  4. After first step i got the one service application and after 2nd step got only one pwa
    and i am getting same error what i do now.

  5. Super! Thx a lot :) there was a lot of “parasite” activity from DELETED pwas in database I didn’t know what to do with it :)

  6. Thank you – add me to the list of folks who found themselves in this exact predicament. Whew! Your steps were exactly what I needed to resolve and get to the next step in my deployment. (and I have one more PowerShell script to add to my collection, bonus)

  7. Hi,
    Good posting!
    In Step3 Remove the configuration for the incorrectly deleted instance, Step 1 was not doing anything after mentioning the guid of the instance found in Step 2. No response. Am I doing anything wrong?

  8. Hi, this is a great tip and narrowed me to the nightmare I was fighting with. Until $pwainstance, I’m fine and seeing three instances. Out of which two are no more existing or deleted partially. But when I used the last command to get $toberemoved, I see blank.

    The problem is that still I see ULS logs showing Critical error of trying to access the database of those deleted instances, which is no more available. Appreciate if you could point me to remove those two partially removed instances.

  9. Hi – Great post. Thanks for that.
    I followed the steps and was able to remove my phantom site associated with the Project Server Application and this stopped the 7626 errors in the event logs. I also deleted a phantom Project Server Application using central Admin that had *no* associated sites.
    None of this fixed my two problems however:
    1. OLAP cubes never build as scheduled although I can do manually
    2. Capacity Data is never calculated even for new cubes. It has been in the past but stopped some time ago. It does show in PWA.
    Can you advise on either of these ?
    Thanks – Andy

    • hi,
      The problems you mention sound like a timer job is not firing to do some of the scheduled items. I would have a look in CA and see if there are timer jobs disabled for PS for your particular instance. Best bet on this to get a more directed outcome might also be to post to the Project Server forums on TechNet.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s