際際滷

際際滷Share a Scribd company logo
Before you Start
I highly recommend you make a backup of your database prior to running any SQL commands. If you break something, youll
want to have a contingency plan.
How To Check Your POBS Table Data in MS SQL Using The
Command-Line
If youre 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 dont 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 its empty, good. If its not, then
well clean it up.
1) Open a Command Prompt in Windows.
2) Login to your SQL Express database engine with the following command:
sqlcmd -S server1SQLExpress -U SqlUserAccount -P SqlPassword
On my system, this looks something like this:
sqlcmd -S localhostSQLExpress -U sa -P Prima123Vera
Its best to login with the sa user  hopefully you know the password. You might try Prima123Vera if you dont  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 youre in.
Lets get a listing of all of the databases in your install. Type the following at the prompt:
SELECT name from sys.databases
Go
These are on separate lines. You should see a list of all of your databases. Now lets pick one.
4) Set a database to use
Once youve identified your database name, you want to tell SQL that youll be working inside that db. Type this:
use my_db_name_here
Go
Heres what you should get in response.
5) Query the POBS Table
To see what data is in the POBS Table, lets run this query:
select * from POBS
Go
If your result was more that 0 rows affected, like mine here, then youve got some data in the POBS table that will be affecting
your import / export performance.
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 youre this far, the cleaning part is easy. Simply run the following command
delete from POBS
Go
Thats it. Youre 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 youve 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.
2) Find the POBS table
Start by finding your database in the Object Explorer window.
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:
How To Clean Your POBS Table Data in MS SQL Using Management
Studio
Ok. If you have data, then lets delete everything from the entire table. Its a simple command. Type:
delete from POBS
Click Execute.
How To Check Your POBS Table Data in Oracle XE
If youre using Oracle Database Express Edition 10g, aka Oracle XE, the free database that ships with Primavera P6 version 8.x,
then youll 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, youll 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 cleanup-steps-nauman
2) Run the SQL command.
From here, youll want to access the menu on the large SQL icon and choose SQL Commands -> Enter Command.
Once youve got a blank command-entry screen loaded, youll 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, its 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
and now its done.

More Related Content

Pobs cleanup-steps-nauman

  • 1. Before you Start I highly recommend you make a backup of your database prior to running any SQL commands. If you break something, youll want to have a contingency plan. How To Check Your POBS Table Data in MS SQL Using The Command-Line If youre 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 dont 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 its empty, good. If its not, then well clean it up. 1) Open a Command Prompt in Windows.
  • 2. 2) Login to your SQL Express database engine with the following command: sqlcmd -S server1SQLExpress -U SqlUserAccount -P SqlPassword On my system, this looks something like this: sqlcmd -S localhostSQLExpress -U sa -P Prima123Vera Its best to login with the sa user hopefully you know the password. You might try Prima123Vera if you dont 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 youre in. Lets get a listing of all of the databases in your install. Type the following at the prompt:
  • 3. SELECT name from sys.databases Go These are on separate lines. You should see a list of all of your databases. Now lets pick one. 4) Set a database to use Once youve identified your database name, you want to tell SQL that youll be working inside that db. Type this: use my_db_name_here Go Heres what you should get in response. 5) Query the POBS Table To see what data is in the POBS Table, lets run this query:
  • 4. select * from POBS Go If your result was more that 0 rows affected, like mine here, then youve got some data in the POBS table that will be affecting your import / export performance. 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 youre this far, the cleaning part is easy. Simply run the following command delete from POBS Go Thats it. Youre done and you POBS table is now empty. Make sure to read the recommendations at the end of this article.
  • 5. How To Check Your POBS Table in MS SQL using Management Studio If youve 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. 2) Find the POBS table Start by finding your database in the Object Explorer window.
  • 6. 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
  • 7. Click the ! Execute button on the toolbar. You might an empty table or you might see a result like this: How To Clean Your POBS Table Data in MS SQL Using Management Studio Ok. If you have data, then lets delete everything from the entire table. Its a simple command. Type:
  • 8. delete from POBS Click Execute. How To Check Your POBS Table Data in Oracle XE If youre using Oracle Database Express Edition 10g, aka Oracle XE, the free database that ships with Primavera P6 version 8.x, then youll 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, youll 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.
  • 10. 2) Run the SQL command. From here, youll want to access the menu on the large SQL icon and choose SQL Commands -> Enter Command. Once youve got a blank command-entry screen loaded, youll type in the following: select * from POBS
  • 11. 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, its 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 and now its done.