Installing and Managing Primavera P6 DataBases
Installing and Managing Primavera P6 DataBases
Installing and Managing Primavera P6 DataBases
Contents
Preface ................................................................................................................................. 3
Introduction ......................................................................................................................... 4
Background ....................................................................................................................... 4
Why Understanding Database Servers is Important? ......................................................... 4
Re-installing P6, Not That Easy!! ........................................................................................ 5
What is a Database Server? ............................................................................................... 5
Chapter 1 .............................................................................................................................. 6
Types of Databases Available for use with P6 .................................................................... 6
Why Does the Database Server Type Matter?.................................................................... 6
Chapter 2 .............................................................................................................................. 7
Differences between Databases ........................................................................................ 7
Why does Multiple Databases Matter? .............................................................................. 7
Chapter 3 .............................................................................................................................. 8
Download P6 and install it. ................................................................................................ 8
Download P6 8.2 ............................................................................................................ 8
Install P6 8.2 ................................................................................................................ 15
Chapter 4 ........................................................................................................................ 18
Creating a new database ................................................................................................. 18
Creating a new SQL Database ....................................................................................... 18
Creating a new Oracle Database .................................................................................. 24
Configuring a database .................................................................................................... 30
SQL Database Configuration ......................................................................................... 30
Password problem solution .......................................................................................... 38
Chapter 5 ............................................................................................................................ 41
Check Database Size ........................................................................................................ 41
SQL Express .................................................................................................................. 41
Oracle Express.............................................................................................................. 44
Chapter 6 ............................................................................................................................ 47
Backing up your Schedules .............................................................................................. 47
P6 Export - XER Option ................................................................................................. 48
Page 1 of 57
Contents
P6 Export - XML Option ................................................................................................ 50
Backing-up your Full Database ......................................................................................... 51
SQL Express Database .................................................................................................. 51
Oracle Express Database .............................................................................................. 54
Page 2 of 57
Preface
Preface
PlanningEngineer.net is an online project management website, we are a PM Office online
simulation aiming to share knowledge, books, several courses as well as online consultancy.
One-size fits all, does not work to project management. You need to learn how to create
your own plans as per project conditions and requirements. We share new courses, ideas,
approaches, and techniques, which help to increase your project management knowledge
to be able to create your own project management plans.
So, All what you may need for enhancing the perfect planning career, you will find it with us,
our members is our riches so we work in accordance with your needs and requirements to
fit our services to benefit you.
This E-Book is prepared by Eng. Ahmed Mohamed Sghair, Reviewed and Edited by Eng.
Yasmeen Sultan for our esteemed members, the book is named Installing and Managing
Databases with primavera R 8.2, all planning engineers and schedulers most stressful issues
with Primavera, is installing it and Managing the databases, the database setup, size,
backupetc., so we will take you in a step by step tour through installing and managing all
about primavera databases.
A P6 Planning Engineer & Scheduler is required to know much more than just how to
schedule; he / she must plan, maintain, and repair the database. The only alternative you
have is to trust that Primavera and their support staff have done this for you and knows
what is best, but in this case you have to patient.
To make it easier for you, our E-Book explains what a Database Server is and what you need
to know to keep your CPM scheduling platform up and running. So our book is divided in to
6 chapters which will cover the following topics:
1.
2.
3.
4.
5.
6.
Database types
Differences between databases
Downloading and Installing P6
Creating and configuring a new database
Checking the database size
Backing up the databases
We will attempt to describe these issues and solutions for both Oracle Express as well as MS
SQL Express databases later in this book. This E-book is for planners help but not for the IT
professional personnel.
Page 3 of 57
Introduction
Introduction
Oracle/Primavera P6 software is a high-powered Critical Path Method (CPM) based
scheduling software. It stores all of the scheduling data in relational tables managed by a
separate program called a database manager.
When one purchases P6 planning & scheduling software, a database manager program and
database are also installed if a compatible one does not already exist to support the P6
program. In this book, we will introduce the anther alternative for the database as well.
It is important to remember that the lovable P3 scheduling software also used a database
manager, just not in a client/server configuration. P3 used a 16-bit third-party database
manager called, Btrieve, This low-powered program worked well until three or more users
tried to access the same information at the same time.
The newer P6 program has only increased the complexity by moving the database to a much
higher-powered server model using a standard language called Structured Query Language
(SQL) to communicate between the two programs.
Background
For simplicity, this book assumed that you are running a stand-alone client/server version of
P6, as for the large client servers, there is Professional IT support team shall manage any
issue.
Page 4 of 57
Introduction
Re-installing P6, Not That Easy!!
Even re-installing P6 is a complicated process, it is important to understand that stand-alone
P6 users install two separate programs when they install P6; the P6 scheduling software and
a database manager program.
When it comes to the uninstall of your P6 program, you must uninstall two different
programs from the list of existing programs; the P6 program and the MS SQL or Oracle
Express program.
Many people fail to uninstall the database server when attempting to delete and start over
installing P6 hoping to fix the problem. But the database server is installed as a stand-alone
so the database problem was never reset.
Page 5 of 57
Chapter 1
Chapter 1
Types of Databases Available for use with P6
In the beginning, Primavera installed a free, shareware database server called Interbase,
when you install the P6 Version 3.5 software on a stand-alone machine, you shall also install
Interbase to handle the data. If other approved database servers were already installed on
the machine, then P6 would not install Interbase and would use your existing database
server.
Since that time, the default database server has changed, P6 Version 5 was installed with
MSDE (Microsoft SQL Express 2003), and P6 Version 6 was installed with Microsoft SQL 2005
Express and later switched to Oracle Express (Version G9) sometime after the company was
acquired by Oracle.
Now, P6 Version 7 uses Oracle Express Version 10 as the default database and new
installations of P6 V8.1 use Oracle Express Version 11.
When you upgrade from an earlier version to a later P6 version, the database type remains
the same and only the structure of the database is modified to accommodate then new
schemes. This means that if you started with an earlier version SQL database, then after the
upgrade you kept on the other hand, if you install a new copy of P6, you are forced to
accept the new type of the default database.
As an example, if you want to install MS SQL, on a new P6 V7 or V8.1, then you might want
to first install P6 Version 6.2.1. This will automatically install MS SQL as your stand-alone
database. Next you would then upgrade your software to Version 7. You will keep your SQL
Database for P6 Version 7.
Page 6 of 57
Chapter 2
Chapter 2
Differences between Databases
Aside from having to learn how to use one type of database server or the other, what is the
difference between MS SQL and Oracle? There are minor, technical issues involving ease of
installation and maintenance that no need to go in to here, Oracle is rather odd with how
they store large files such as pictures. The real important difference for the typical P6 user is
in the ability to create separate databases.
The full versions of Oracle and MS SQL both support the creation and maintenance of
separate databases. The difference is that the Express version of Oracle does not allow the
user to create and maintain more than one database while MS SQL Express does.
Page 7 of 57
Chapter 3
Chapter 3
Download P6 and install it.
Download P6 8.2
1. Go To edelivery.oracle.com
2. Sign In or Sign Up
Page 8 of 57
Chapter 3
3. Agree to the Terms & Conditions. Then click on Continue
Page 9 of 57
Chapter 3
4. Select a Product Pack (Primavera) and a Platform. Click Go
Page 10 of 57
Chapter 3
6. For local installs download Applications, Database Setup and Documentation
Page 11 of 57
Chapter 3
7. Save the Zip files to your Downloads folder
Page 12 of 57
Chapter 3
8. Open the Zip files with WinZip and drag the folder to your Downloads or a folder of
your choice.
Page 13 of 57
Chapter 3
9. We highly recommend that you read the instructions for the installation you will do;
you may find something useful
Page 14 of 57
Chapter 3
Install P6 8.2
1. Open the Client Applications folder and double click Setup and then click Run
Page 15 of 57
Chapter 3
Page 16 of 57
Chapter 3
Page 17 of 57
Chapter 4
Chapter 4
Creating a new database
So now its the hard decision time, before you run the dbsetup.bat file to create a new
database you must decide the following:
Page 18 of 57
Chapter 4
1. Choose Microsoft SQL Server
Note: We know the computers name by looking at Windows Start Button / Control Panel
/ System and Security / System. The Database host port is typically, 1433 but one can
confirm this by looking into the Registry (program name, regedit) at
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SNI9.0\VI
A\Property1.
Page 19 of 57
Chapter 4
3. In the new screen, enter the name for new database name. Do not use any spaces in
the new name. A typical new name might be, SANDBOX. For brevity, the file
addresses below start with, C:\Program Files\MSSQL\Primavera\MSSQL.1
And then finish with what is listed below,
Database name: (your new name without any spaces in it)
Data file: \MSSQL\DATA\ (new name) _DAT.MDF
Log file: \MSSQL\DATA\ (new name) _LOG.MDF
Database code page: Database default
Page 20 of 57
Chapter 4
4. You will then create a list of SQL Server users. Check the box for, Use existing
privileged user. You can enter either pubuser or privuser for the user name.
Whichever one you choose, that is the name you will later need to use when you
create the database alias. The default password is the same name as the user name.
Page 21 of 57
Chapter 4
Page 22 of 57
Chapter 4
Now the installation is completed, restart your computer and open the primavera
program from the icon and type the user name admin and the password admin to log in
Page 23 of 57
Chapter 4
Creating a new Oracle Database
1. Choose Oracle then click on Next
2. Add the primavera default password Prima123Vera and database default name XE
Page 24 of 57
Chapter 4
3. Click Next
4. Click create
Page 25 of 57
Chapter 4
5. Click Next
6. Type the password in each cell same to user name above. i.e. administrative user
name : admuser administrative password: type same username (admuser) without
brackets and confirm same password, Then click next to go to next step
Page 26 of 57
Chapter 4
7. Choose the primavera password lets say admin
Click the Install button to complete the process. Now you are almost done.
After you finish adding your new database, you will have to create a P6 database
alias.
Page 27 of 57
Chapter 4
Page 28 of 57
Chapter 4
Now the installation is completed, restart your computer and open the primavera
program from the icon and type the user name admin and the password admin to
log in.
Also during the installation of P6 it will install new Oracle database and you need
only to configured it after the end of installation
Page 29 of 57
Chapter 4
Configuring a database
SQL Database Configuration
After you add a new database, you will have to introduce it to P6. P6 may see the
database name but it cannot connect to it until you configure it, this issue sometimes
arises independently of a new database while trying to log into P6. The program finds
that for whatever reason, it cannot connect to the requested database.
To edit the P6 database connection, you must start P6 and get to the P6 Login screen. Do
not attempt to login to P6 at this point. Instead, click on the small, square button marked
with three periods (an ellipsis) just to the right of the listing for Database name. This
brings you to the Edit Database Connections screen. Click on the Add button to create a
new database alias.
You now will see the Select or Create Alias screen. Database alias can be different that
the database name. The alias is the name that will show up in the list of databases when
you log in to P6. We suggest that you use a descriptive name suggesting its contents or
special use and not just something like, PMDB1. A good name will prevent confusion
later.
Page 30 of 57
Chapter 4
The Next button will bring you to the place where you list the connection parameters. A
typical Host name is localhost\primavera. Some older databases (say from the P6
Version 5 era) do not use \primavera after the name. You can confirm the correct name
by viewing the Details section of the Edit Database Connections screen displayed two
screens ago. You should enter your new database name
Page 31 of 57
Chapter 4
The Next button will allow us to tell P6 what database login name and password to use
when it tries to connect to your database. The Database Alias will be entered for you.
The Username and Password will be privuser or pubuser, depending upon what you
entered when previously creating the database. Public group ID should be 1.
The validate Database Connection screen should indicate that you are now a proud
parent of a brand-new P6 baby database. The next time that you login to P6, you will see
you new database alias in the drop- down list of databases. Select that name and then
login using your admin name and password.
P6 then will test the connection.
Page 32 of 57
Chapter 4
Then the connection is successful
If the connection was un-successful, either the database does not exist or an incorrect
password was used.
Page 33 of 57
Chapter 4
1. Oracle Database Configuration
In the login dialog, click on the Database fields ellipse button.
Page 34 of 57
Chapter 4
4. In the Select or Create Alias dialog, choose the following settings.
Database alias PMDB
Dive type Oracle, Then clickNext
verify
or enter
XE
in the
Page 35 of 57
Chapter 4
6. In the Enter Public Login Information dialog, enter the following information.
The default public username is pubprm$pm.
The pubuser password will be the same password you entered during the original
installation, e.g.admin01, i.e. the same password you have been using to login to P6
Professional.
Click Next.
7. In the Validate Database Connection dialog, click Next. This will test the
connection.
Page 36 of 57
Chapter 4
8. If the public username and password are correct you will see the following dialog:
If the connection was un-successful, either the database does not exist or an
incorrect password was used.
9. Click Finish.
Page 37 of 57
Chapter 4
Password problem solution
Even though we will not be adding databases in an Oracle Express environment, we still
have situations where P6 cannot connect to the Oracle database. For completeness, we
should describe the correct parameters to use to re-connect your Oracle Express
database to P6.
Should P6 fail to connect to your Oracle Express database, you will be asked if you want
to reconnect now. Click on Yes and you will see the Select or Create Alias screen. The
default database alias is ORAPMDB and the Driver type is Oracle. The Configure ORACLE
Connection screen will ask you for the Oracle Connection String. Enter XE in this box.
The Enter Public Login Information screen will ask for your Username (pubprm$pm)
Public group ID (1), and you password. Right here is where many stout-hearted gentlefolk
flounder on the Cold Reality Rocks.
You do remember the password that you used when you installed Oracle for the first
time, dont you? (Here is a hint; there is no default password and it is not admin,
password, or any other P6 password.) In other words, you have just joined the group of
long-suffering Oracle users who did not understand that Oracle was asking them to
provide the new password during installation. They thought that they were just trying to
guess the established password and were so relieved when it worked the first time that
they forgot to write down what they entered.
You cannot discover the correct Oracle password. You will soon be temporarily lockedout of P6 if you make too many bad guesses. After a set amount of time (perhaps an
hour), Oracle will automatically unlock and allow further guessing but this lockout
procedure becomes tiresome real soon.
You are able to reset the password to a new one. This will require that you get to the DOS
prompt (Windows Start Button / All Programs / Accessories / Command Prompt) start-up
the Oracle Database Manager and enter a couple of command lines. At the DOS
Command Prompt, you would enter,
C:\>sqlplus / as sysdba
Page 38 of 57
Chapter 4
The prompt will turn into an SQL> prompt, i.e. SQL>. Type the following:
SQL> alter user PUBPRM$PM identified by <new_pass>;
Where <new_pass> is the new password you specify for the user. Dont forget to enter
the ; at the end, or you will be prompted for the 2nd half of your entry ; with a ?
prompt. (In that case, just enter the ";".) You can repeat the alter user command for each
user password that you would like to change.
To exit SQL Plus, type
SQL>exit
And Return or Enter. To exit the windows command prompt, also type,
C:\>exit
And Return or Enter.
Alternate Oracle Database Password Method
You can also download a file called, ChangeMyP6PasswordTo.bat from the Oracle
Knowledge base to perform this task with less typing and with less chance of failure, You
would open the DOS command prompt in the directory where you saved the batch file
and then type,
ChangeMyPasswordTo (new password)
Page 39 of 57
Chapter 4
Once the passwords have been reset for the Oracle Express users, a new connection
must be made from Project Management and Methodology Management to the
database.
When reestablishing the database alias connection to the database, a failure will occur
and report a message similar to 'Bad Private Database Username or Password'. This is
expected behavior since the privileged username's password has also been changed.
Once you have supplied the correct Oracle database password, a couple of clicks will
bring you to the Connection Successful screen.
Page 40 of 57
Chapter 5
Chapter 5
Check Database Size
SQL Express
P6, Version 4 & 5 systems used MSDE, which only have 2 GB of space available. Luckily,
SQL Express 2005 and 2008 both support 4 GB. The good news is that SQL Express 2008
R2 now supports up to 10 GB. MS SQL Express 2008 R2 is not automatically installed on
P6 systems, but that does not stop one from manually installing it and having P6 use it.
To check the SQL Express database size, click on the Windows Start button, select All
Programs, Microsoft SQL Server 2008 R2 folder, and then SQL Server Management Studio
Express.
Page 41 of 57
Chapter 5
Now all of the necessary information in the Connect to Server window should already be
entered for you if you use Windows Authentication.
If this does not work, you may use SQL Server Authentication with a Login ID of sa and
the Password, sa. Click on the Connect button to continue.
Page 42 of 57
Chapter 5
The SQL Server information is laid out as an expandable tree. Expand the Databases
section and right-click on the database in question. The default P6 database name will
probably be SANDBOX. Now select the menu item, Properties. The General tab will list
the database size with the heading, Size. 4,096 MB (4 GB) is your normal limit.
Note in my case the size only 230 MB, but dont worry this is only my case.
Page 43 of 57
Chapter 5
Oracle Express
To check on your Oracle Express database size, Click on the Windows Start button, open
the Oracle Database 10g Express Edition folder, and click on the Go To Database
Home Page entry. This will launch Internet Explorer and you will use this strange way to
talk to your data server residing on your computer.
Page 44 of 57
Chapter 5
You must now login to the server. The Username is, admprm$pm and the password is
whatever you set it to when you first installed the Oracle database. This has nothing to
do with your P6 passwords.
Experience has shown that roughly 95% of all people with an Oracle Express database do
not actually know their Oracle Database Password (this figure also includes many
professional IT Admin personnel.). There is no default. We will cover this subject in more
detail in the Oracle Database Configuration section later in this paper.
Once you click on the Login button, you will see the Home Page. On the right-hand side,
is a very easy-to-read storage Usage Monitor. You can easily see how close you are to the
4 GB (4,096 MB). Remember, Oracle Express only supports 4,096 MB of storage. Dont let
the green meter fool you into thinking that you have more space available that you
actually do.
Page 45 of 57
Chapter 5
Page 46 of 57
Chapter 6
Chapter 6
Backing up your Schedules
To prevent you having to start over again with a database full error (or any other type of
hard-disk error,) we recommend that you backup your schedule data before you have a
problem. There are many ways to do this, producing different types of backups of varying
usefulness. The first method is to use the P6 Export function.
Using P6, first open the schedule or schedules that you want to backup. You can only backup
schedules that are currently open. You can backup multiple schedules at the same time (and
in the same XER file) if all of those schedules are open at the same time. Now select File /
Export.
Page 47 of 57
Chapter 6
The Type of export will be your next option. The options include,
Primavera PM / MM (XER)
Primavera Contractor (XER)
Primavera PM (XML)
Spreadsheet (XLS)
Primavera Project Planner (P3)
Microsoft Project
8.2 or later
8.1
8.0
7.0
6.2
6.1
6.0
5.0
Page 48 of 57
Chapter 6
Why do the versions matter? If you are transferring the schedule to someone with a
lower version that the one that you saved it in, then they will be unable to read your XER
backup file. Primavera would tell you that the reason that P6 refuses to import later XER
versions is that the earlier versions do not support features found in the later versions
and might cause a loss or even a corruption of data. Those differences are not published
by Primavera and would make a terrific subject for a research paper.
There is a work-around to the problem of P6 not accepting your later-version import.
First, make a backup copy of your XER file. Then use a pure-text editor such as Notebook
to open the XER file.
The first line will contain the version type like the partial line shown below,
Administrator
Page 49 of 57
Chapter 6
Backing up the entire EPS structure will typically take many hours and will create a file
many times the size of the original database.
P6 Export - XML Option
The XML option creates a web-like HTML description text file containing some of the
schedules information with the file extension of, .XML. This is supposed to be a new
universal standard communication between non-compatible software. Because this is a
growing industry standard, some options only found in P6 are not currently supported.
Since not all of the schedules information is saved using this option, this makes the XER
backup a better option for maintaining and transmitting backups.
The types of XML backup versions available are
Professional R8.2
P6 EPPM R8.2
P6 EPPM R8.1
The distinction is very telling and important. As of Version 8 (which Primavera calls
Release 8 or just R8), there are two different, incompatible database types; the standalone P6 Professional and Enterprise Project Portfolio Management (EPPM). P6
Professional is strictly a client/server model while the EPPM is web based with an
optional limited-function client/server module.
Primavera is saying that the two versions will have different features and that the
databases will be different and incompatible. By design, one type or XML backup cannot
import the other type of XML backup.
Even more telling is the fact that there are no XML settings for P6 versions prior to
Version 8. XML backups have been around since 2007 with the release of P6 Version 6. Is
Primavera abandoning all Version 6 and Version 7 XML backups?
Page 50 of 57
Chapter 6
Even though XML does not backup items such as your CPM settings, it does have one
feature that the XER option lacks; saving project layouts. XML backups give the user the
option to save current project layouts and filters. This produces a second file different
from the XML file and the two files are saved together in a ZIP compressed folder. One
can also manually create a Layout and Filters .plf backup file for one layout at a time
using P6 menu item, View / Layout / Open and clicking on the Export button.
Page 51 of 57
Chapter 6
Select Full backup type and then supply a destination file name. C:\program
files\MSSQL\Primavera\mssql.1\MSSQL\Backup\pmdb$primavera.bak is the typical
default. (Someone doesnt want just anyone to stumble across this file.) (Or your
database name in my case I named database SANDBOX).
You can add multiple backups into this same file. It took the Author a little over 30
seconds to backup a 500 MB database. The backup file was 200 MB in size.
There is enough room on your hard-disk to backup the database every week without
even making a noticeable dent in the amount of free space let over. You can zip this
backup file to a tenth of its original size for transportability.
Page 52 of 57
Chapter 6
Restoring the SQL Express backup is a little trickier for MS SQL Express users than that for
those using Oracle Express. From the same SQL Management screen, right-click on the
Databases line and select Restore. The restore screen automatically lists all backups that
you have made in order and lets you select one. It took the Author around 40 seconds to
restore our backup. Next, your must resync the database with P6.
To resync your SQL Express backup, launch SQL Server Management Studio from
Start/Programs/Microsoft SQL Server 2005/SQL Server Management Studio (Express.)
Connect using either Windows or SQL Authentication (as we explain before). Expand the
"Databases" folder on the left and highlight the database name. Then click the "New
Query" button at the top left. The type the following script in the blank window on the
right-hand side.
If you typed it correctly, the words will automatically be colored in the manner shown
above.
Now, be sure that the correct database name is shown in the drop-down box to the right
and just below the New Query button and then click the Execute button to the right of
drop-down box.
Page 53 of 57
Chapter 6
Oracle Express Database
To back up your Oracle Express database, select the Windows Start Button / All Programs
/ Oracle Database 10g Express Edition / Backup Database. You will see a scary black
window and suddenly realize that you are looking at a pre-Windows DOS window.
The scary black window will eventually display white-colored words streaming out into a
full paragraph of technical gibberish. They will then ask you an incomprehensible
question, Are you sure [Y/N]? (Notice that the question is an incomplete question that
omits the object.) Just press the Y key and then the Enter key. There is no further
action required on your part.
You will see pauses and then reams of completely incomprehensible lines that eventually
tells you where the Log File is kept but not where your backup was placed. Press any key
at the prompt to close the scary black window.
Page 54 of 57
Chapter 6
You can use Windows Explorer to verify that Oracle Express left your backup file at, C :\{
directory where you installed the downloaded Oracle XE installation
program}\app\oracle\flash_recovery_area\XE\BACKUPSET\ {todays date}\xxxxx.BKP
where the xxxxx actually was a gibberish of 40 characters. Luckily, Oracle remembers
this horrendously-named location and the recovery routines go directly to the latest
backup area.
Page 55 of 57
Chapter 6
The Authors 3,420 MB database ended-up creating a 1,234 MB sized backup file. You can
zip this file down to 207 MB file. You will need to un-zip the file before using it to restore
the database, but the compressed format makes it much easier to place your backup
someplace where a hard-disk crash will not cause you unrecoverable damage.
Restoring the Oracle Express backup is even easier than making the backup. Select the
Windows Start Button / All Programs / Oracle Database 10g Express Edition / Restore
Database. The scary black window will ask you to confirm that you want to restore the
database with a Y and the Enter Key and then it completed after 7 nail-biting minutes.
Page 56 of 57
Or better then join our Premium Membership to get the full access for an open sky of EBooks, knowledge and Online Courses.
Page 57 of 57