Thursday, June 26, 2014

Unable to Delete A Project in Primavera P6?


Takeaway: Sometimes, while deleting a project in Primavera P6, an error message comes up saying “other users have the current project open you may not delete the Primavera project…”. It may come even when there is only one user working on it! And the file just could not be deleted with the Delete command in the Command bar (or from Menu bar). This post shows how to work with this problem.


Creating, opening and deleting a project is easy in Professional 8.3.x (or simply Primavera P6). The steps are GUI driven and can be done with the help of “Project Toolbar”. A Project is created under Enterprise Project Structure (EPS) and it has its own WBS and underlining activities. However, sometimes the users run into problems while deleting a project. To delete a project, the option given with “Delete” command in the “Command Toolbar” (or selecting the project from the EPS and right clicking to get the Delete option), may not work! 

An error message is popped up and prevents you to delete the project. The message is something like:

“other users have the current project open… you may not delete this Primavera project…”

Some of the reasons for this can be as follows.

Reason – 1:
In Primavera P6, when you open a project, by default, it is opened in shared mode. Shared mode allows multiple users to simultaneously edit a project file. This is one of the fundamentals that is needed in any Enterprise Project Portfolio Management (EPPM). However, when you want to delete the project file, that might pose problem, as it is in a shared mode.

To know the number of users working on a particular project, go to "File" --> "Open" menu from the “Menu bar”. Select the project and then select "Users" button to find out the number of users working on that project.


If there are multiple users, then the project can not be deleted. In such a case of multiple users, ensure that they are relieved of their accesses or their sessions are properly closed.

There is also a possibility that even with one user, you may not be able to delete. In the below screen, with one user, I tried to delete the project. But I was unable to do so. 


The same message comes up as in shared mode. This, unfortunately may keep on growing  as there may be a number of projects which you have created/opened up for your own use, but later on you want to delete them. But unable to do it. Like in my case, there were some 3 projects, which were used for test purpose, but could not delete, even though the number of users is only one, i.e., myself. So what could be other reason?

Reason – 2:
Primavera P6 is connected to a database, which can be a Professional DB or a EPPM DB, unlike file based backend structure which are maintained in some Project Management software. A session is maintained in the DB, when you connect with the P6 professional client. If the Primavera P6 is not closed properly or you have not logged out properly or the P6 client is not terminated properly, the session will be retained. These sessions are orphaned, but are retained in the Database.

Let us check on this a bit more. Close the Primavera P6 Application window, if you have opened. As the Primavera P6 is closed, the session should have been closed as well. But they are not! And there lies the problem.

To find out, we have to log into the Primavera Database and find out the sessions available. Go to the SQL command prompt and login: Command: sqlplus privuser/privuser@XE. As I am logged in as a privuser, I am using the command. You need to have the respective users to check and delete on the sessions. These usernames and passwords are normally given at the time of installation.
 

Note: Oracle XE database is integrated in my setup, which comes packaged with Primavera P6 installer. 

To audit which users are in which projects, we need to review the UPKLIST, USESSION and PROJSHAR tables.  Let us check the UPKLIST table. As you can see, this one is empty. Now check the session on the USESSION table (can check with the same command), which will list out the sessions. The USESSION table tracks user sessions to support project-level locking and licensing.  The PROJSHAR table identifies which projects are currently locked in shared/exclusive mode by user sessions. Let us check on the PROJSHAR table.

There are 3 projects listed with Proj_ID 4547, 4527 and 4565 and they have the respective sessions IDs. To reconfirm, you can again login to Primavera and check these sessions maintaining the old ids even when a new session is established, which is shown in the below screenshot.

So, time to clear up the unwanted sessions. 

If you have logged in to Primavera application, for the above step, close the Primavera P6 application window again. Give commands in the SQL prompt to delete these sessions. You can give one by one command or chain them together to delete the sessions.  For Oracle DB, don’t forget to give a commit command in the end.

***

After you delete the sessions which are put as orphan records in the DB, the project shown in the Primavera P6 Client can be deleted. Login in again into the Primavera Client Apps and delete the EPS and/or projects from Primavera. Right click on the EPS and/or project and delete.  This time the message popped up will be different. 



You can go ahead. The Project (and also EPS, if you want), will be deleted now.


Note: A course covering Project Management Professional (PMP) certification with Oracle Primavera P6 (and its certification) is available. This has been used by professionals worldwide. For details, check:

You may also like:


1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Any comment is welcome - comments, review or criticism. But off-topic, abusive, defamatory comments will be moderated or may be removed.