UK Oracle User Group

How to Clean Your P6 POBS Table On MSSQL & Oracle DB

14 August 2015

In his recent blog post, Michael Lepage outlines how to safely clean your Primavera P6 database in Oracle Database Express Edition 10g & MS SQL Express.

In my last post I went deep on how to quickly clean POBS data from a Primavera P6 XER file using a simple text editor. And we discovered that removing POBS data from an XER file greatly improved the import time for large XER files. A big thanks to readers who left comments on that post letting me and you know that there are some 3rd party tools (free and paid) that handle this in a more automated fashion which is good to know.

So the next question is…

“How is POBS data affecting Primavera’s performance?”

We all want our copies of Primavera P6 to hum along and perform well – it’s a given. Slow software sucks. Especially given how most P6’ers (that’s a new term I’m trying out…see if it sticks ;-] ) are power users and really put the software through some paces. When you’re working with huge complex schedules and deadlines loom, every second waiting for the software better be absolutely necessary.

Let’s dig into this issue of POBS data and P6’s performance then.

POBS Data & Primavera P6 Performance

A bit of review first at how POBS is getting around.

The POBS data cycle looks something this:

We know that when a user imports an XER file that has POBS entries in it, that data populates in our Primavera P6 database in the POBS table. So the more files we import that contain POBS data, the larger that POBS table will grow. And as we export projects to XER files, a copy of some of that POBS data moves to the file, and ends up in another Primavera P6 database. Eventually, as we’re finding out now, a large POBS table can have an impact on the performance of Primavera P6.

We already know it has an impact on exporting XER files, which takes longer. And importing an XER file with a lot of POBS data can literally take hours as my client reported. This is pretty much unacceptable.

Does the Data in the POBS table affect overall performance of P6?

I don’t know. Since we don’t really know how the POBS gets generated in the first place.

Sure we know that it gets passed around during import / export – and can accumulate. But what is the original source?

More to come on this soon I hope…

Before you Start

I highly recommend you make a backup of your database prior to running any SQL commands. If you break something, you’ll want to have a contingency plan.

How To Check Your POBS Table Data in MS SQL Using The Command-Line

If you’re using Microsoft SQL Express as your Primavera database engine, then you might have also installed the handy Microsoft SQL Server Management Studio to manage your databases. If you did, you should see it in your Start->All Programs list in Windows.  In case you don’t have SQL Server Management Studio, you can still dig in using the SQLCMD and the command line.

What we want to do here is to check the POBS table in our Primavera database for entries. If it’s empty, good. If it’s not, then we’ll clean it up.

1) Open a Command Prompt in Windows.

clean pobs table p6

2) Login to your SQL Express database engine with the following command:

sqlcmd -S server1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\SQLExpress -U SqlUserAccount -P SqlPassword

On my system, this looks something like this:

sqlcmd -S localhost\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\SQLExpress -U sa -P Prima123Vera

It’s best to login with the “sa” user – hopefully you know the password. You might try “Prima123Vera” if you don’t – it was used in a lot in install guides.

3) Get a listing of databases on your system

If your login was successful, you should see a prompt that looks like “1>”. That means you’re in.

Let’s get a listing of all of the databases in your install. Type the following at the prompt:

SELECT name from sys.databases

These are on separate lines. You should see a list of all of your databases. Now let’s pick one.

4) Set a database to use

Once you’ve identified your database name, you want to tell SQL that you’ll be working inside that db. Type this:

use my_db_name_here

Here’s what you should get in response.

clean pobs table data with sql command line

5) Query the POBS Table

To see what data is in the POBS Table, let’s run this query:

select * from POBS

If your result was more that 0 rows affected, like mine here, then you’ve got some data in the POBS table that will be affecting your import / export performance.

use command line to clean pobs table

Scroll down for how to clean the POBS table.

How To Clean Your POBS Table Data in MS SQL Using The Command-Line

Ok, once you’re this far, the cleaning part is easy. Simply run the following command

delete from POBS

That’s it. You’re done and you POBS table is now empty. Make sure to read the recommendations at the end of this article.


How To Check Your POBS Table in MS SQL using Management Studio

If you’ve got Microsoft SQL Management Studio or something similar, then follow these steps to clean out your POBS table.

1) Login to Microsoft SQL Management Studio

Make sure to login as the “sa” user using SQL Server Authentication.

clean pobs table using sql management studio

2) Find the POBS table

Start by finding your database in the Object Explorer window.

pobs table using sql management studio

Expand the Tables sub-entry and scroll down until your find “dbo.POBS” which is the POBS table. Highlight the table and click the “New Query” button on the toolbar at the top of the screen.

3) Check for entries

Type the following in the query window:

select * from POBS

Click the “! Execute” button on the toolbar.

You might an empty table or you might see a result like this:

check the pobs table for data

How To Clean Your POBS Table Data in MS SQL Using Management Studio

Ok. If you have data, then let’s delete everything from the entire table. It’s a simple command. Type:

delete from POBS

Click Execute.


How To Check Your POBS Table Data in Oracle XE

If you’re using Oracle Database Express Edition 10g, aka Oracle XE, the free database that ships with Primavera P6 version 8.x, then you’ll need to follow these steps to check and clean your POBS table.

1) Open the Database Home Page

Some versions may differ, but I have a Windows program entry in my start menu called “Goto Database Home Page” under the Oracle Database Express Edition 10g folder. Once you get the home page up in a browser, you’ll need to login with the appropriate user to access the proper tables.

In this case, you can login with “admuser”. Again hopefully you know the password.

pobs table in oracle xe

2) Run the SQL command.

From here, you’ll want to access the menu on the large SQL icon and choose “SQL Commands -> Enter Command“.

oracle xe pobs commands

Once you’ve got a blank command-entry screen loaded, you’ll type in the following:

select * from POBS

Then click the Run button. You should now know if your POBS table has any data in it or not. If it does, continue on to the next section.

How To Clean Your POBS Table Data in Oracle XE

In Oracle XE, deleting entries from the table is very straightforward. In the SQL command window, type in the following:

delete from POBS

Your POBS table should now be empty.

However, with Oracle XE, it’s also necessary to disable 2 triggers by running the following SQL commands – as per Oracle support. Run each one separately, not together, as you did the delete command.

alter trigger rt_pobs disable

alter trigger rt_pobs_del disable

It’s pretty easy, and now it’s done.

Is Deleting POBS Data safe?

As far as we know, yes it is safe. In fact, this procedure has been recommended by Oracle support in a document titled “POBS Table Has Grown in Size and Affects Performance With Project Import/Export (Doc ID 1967569.1)“. Since POBS data is not used inside the application, it’s safe to delete it.


I’ve done my best to outline how to safely clean your Primavera P6 database regardless of which database engine you are using. I highly recommend you have a backup in place before you run any SQL commands.

Will this fix all your POBS problems for good?

Probably not. Since POBS data is imported into your database when you import XERs files that contain POBS data, your database may continue to accumulate POBS data. I recommend you use the scripts and processes I’ve outlined to monitor your POBS table on a monthly basis. Then clean as needed.

Can you automate cleaning the table?

Yes. For any of these database platforms, you could create a script that could be triggered to run periodically by the Windows Scheduler to run the delete command and clean the table. If you want me to write-up that procedure, leave me a comment below and I’ll gladly tackle it if there’s interest.

For now, keep on planning and hoping our software gets fixed soon.

Source: Plan Academy

We'd love to get your feedback on this; you'll need a UKOUG login to provide it, so if you don't have one, please click on 'create a web profile' first.

Send this page to your friend

Your details

Your friend's details