If you’ve been having issues trying to run Primavera P6 Professional as standalone on the Oracle XE database, or you simply want to run standalone when not on the company network and are not an Oracle database expert; you can use a Microsoft SQL Server Express database instead.
This article looks at the process for setting up Primavera P6 Professional R8.3 to use the Microsoft SQL Server database, rather than with Oracle XE for standalone use. Download this article as a PDF file.
Primavera P6 R8.3 installs a copy of the free Oracle XE database on your computer when you choose the standalone installation option. However, this doesn’t always go smoothly and we’ve received numerous enquiries for help getting P6 to connect to that XE database once the installation completes: it’s evidently a common problem.
On a side note: with the recent release of Primavera P6 Professional R8.4, Oracle themselves have abandoned the Oracle XE database for P6 in favor of SQLite, a popular, open source database that installs quickly and easily as part of the standalone installation options: a smart move indeed. See our blog about installation of the Primavera P6 Professional R8.4 release.
In fact, unlike the Oracle XE install, which can take upwards of 20 minutes to install on your machine, you will not even be aware that SQLite got installed. Very slick. Oracle clearly recognizes that consumers of Primavera P6 Professional aren’t necessarily Oracle database experts, and thus removed that need for standalone users; making everything very simple.
That said, for those P6 R8.3 users wishing to move off the Oracle XE and on to something simpler, there’s still the Microsoft SQL Express database option. Being somewhat simpler to install, configure and backup, SQL Server is a good alternative. Here’s a summary of the steps.
- Install a copy of Microsoft SQL Express on your computer.
- Download and run the appropriate version of the Database Setup tool.
- Connect the database setup tool to your SQL Express database instance.
- Create a PPMDB database.
- Connect your P6 Professional Client to that database.
Sound reasonably simple right? Well as always, the devil is in the details. This blog highlights a couple of key show-stoppers that you must know about before attempting this operation: nothing too serious, but frustrating if you have to figure them all out for yourself.
Install Microsoft SQL Server Express
This can be any version. We’ve tested it on SQL 2005, 2008, 2008 R2 & 2012 without issues and in all likelihood you’ll be fine with 2014 too. When you download an SQL Server install package, just make sure you get the ‘With Tools’ version. You will need the Management Studio Express tool to administer the database and the SQL Server Configuration Manager to solve the first of our show-stopper items: and these are included in any executable that contains the letters WT in the file name. For example:
Download and run the .exe file to install the MS SQL Server using default settings except on the dialogs pointed out in the following:
- Assuming you don’t already have it installed, choose the ‘New installation or add features to an existing installation’ option on the first dialog of the SQL Express installer tool.
- Instance Configuration – suggest going with the Named Instance default in this installation dialog: the instance will be called SQLExpress.
- When you get to the Database Engine Configuration dialog, select Mixed Mode authentication and enter a password for the database administrator. Make a note of this password, you will need it whenever you need to add database to the instance you are installing.
- Continue with default settings to the end and go ahead with installation.
All being well, you should see the following success dialog.
Once the installation is complete, test that everything is working OK by logging in using the SQL Server Management Studio tool.
You can login with either Windows Authentication or SQL Server Authentication. In either case you will need to enter the Server Name when you first login. This will be a combination of the computer name \ instance name.
For example: tensix-pc\SQLExpress
A successful login of the Management Studio proves you now have a working SQL Server Express instance on your machine.
Show-stopper # 1 – Setup the TCP/IP port on your SQL Express instance.
Don’t skip this step or you will not be able to proceed any further. When you install SQL Express, it doesn’t set your TCP/IP port, so you’ll have to do that using the SQL Server Configuration Manager.
Here’s how to set the TCP/IP port in your new SQL Express instance:
- In the Windows Start menu, go to the Microsoft SQL Server (version number) | Configuration Tools menu area and choose the SQL Server Configuration Manager
- In the Configuration Manager, select the SQL Server Network Configuration | Protocols for SQLEXPRESS
- Right-click on TCP\IP and choose Enable. Click OK to the resulting prompt – you will restart the service after the next steps.
- Right-click again on TCP\IP and choose Properties.
- In the TCP\IP Properties dialog, click on the IP Addresses tab, scroll to the bottom of the dialog and then enter 1433 in the last field at the bottom of the dialog labelled TCP Port.
- Click OK and again click OK to the prompt.
- Now restart the SQL Server Service to have your changes take effect. You can do this from inside the Configuration Manager by selecting the SQL Server Services option and then right-clicking on the SQL Server (SQL Express) Choose Restart from the menu.
- Once the SQL Service has restarted you can close the Configuration Manager The next step is to use the Primavera P6 Database setup tool to build a database for your Primavera P6 Professional client to login to.
Download and run the appropriate version of the Database Setup tool.
The database setup tool comes as part of the Primavera P6 Professional Applications media package located below the P6_R83_Client_Applications | Database folder.
You need to run the dbsetup.bat file. This kicks off a java application that is used to create the PMDB database in your SQL Server instance. Thus you’ll need a version of Java installed on your machine for this to work. If you don’t have Java on your machine, you can install the one that is provided in the P6 media pack under the P6_R83_Client_Applications | Java folder.
If you don’t have Java, install it NOW. The dbsetup.bat tool won’t work without it.
Show-stopper # 2 – The JAVA_HOME environment variable
Weather you already have Java installed, or you just installed it using the version provided in the media pack, you’ll probably encounter the next show-stopper. Even with Java, the dbsetup.bat tool fails to run and you’ll see the following message.
As the message points out, it failed because no JAVA_HOME environment variable has not been defined in your windows system. And if you do ‘press any key’, you’ll simply continue to wonder why the dbsetup.bat tool hasn’t appeared on your screen yet.
Here’s how to setup your JAVA_HOME environment variable:
- Open the Windows Control Panel.
- Type ‘system’ in the search field.
- In the resulting list, select ‘View advanced system settings’.
- In the Advanced tab of the System Properties dialog, click on Environment Variables…
- In the Environment variables dialog, click the lower New… button to add a new System Variable.
- In the Variable name: field, enter
- In the Variable value: field enter the full path to the Java folder location. For example: C:\Program Files (x86)\Java\jre7
- Click OK to save your new variable and then close all the Control Panel dialogs.
Running the dbsetup.bat tool
Now you can run the dbsetup.bat file simply by double clicking on it in the Windows explorer. After a few seconds the following dialog should appear.
- Select the ‘Install a new database’ and ‘Microsoft SQL Server’ options and then click Next >.
- In the Connection Information dialog, enter the DBA user name and password that you specified in during the setup of your SQL Express database.
- Also be sure to enter the full host name for your SQL Express instance, in this example tensix\sqlexpress; where sqlexpress is the name of the instance defined during the installation of SQL Server.
- Click Next >.
- In the Configure Microsoft SQL Server dialog, enter a name for your database. We recommend PPMDB (to identify this as a Professional Project Management Database).
- Click Next >.
- In the Create SQL Server Users dialog, go with default privuser and pubuser These are used by the P6 client to connect to the database. MAKE A NOTE of your passwords for these two. If you forget them or loose then, you will not be able to connect P6 to your new database.
- Click Next >.
- In the Configuration Options dialog, enter a password for your P6 administrator login. Again, make a note of this; if you lose or forget it, you will not be able to login to P6. You may also want to load the sample data, particularly if you are new to P6. This contains some useful sample projects and global objects that can be helpful in learning P6.
- To build your database, click Install. This may take several minutes, particularly if you selected to load sample data.
- Once completed click the Next > button, then click Finish in the last dialog to close the setup tool.
Now it’s time to connect P6 to the new SQL Database. Follow these next steps:
- Run P6 Professional and in the Login dialog, click on the ellipse button.
- In the Edit Database Connections dialog, click Add…
- In the Select or Create Alias dialog, select Microsoft SQL Server/SQL Express in the Driver type field.
- In the Configure SQL Server Connection dialog, enter the host name and database name for your SQL Server database.
- Click Next.
- Click Next.
- In the Enter Public Login Information dialog, enter the pubuser name and password you defined during the database setup process.
- Click Next.
- In the Validate Database Connection dialog, click Next. This will cause it to test your connection settings.
- If the test is successful, you will see the following message in the following dialog.
If this is not successful, click the Back button and verify your settings.
With a successful connection, you are now ready to login to your new SQL Server Express database. Click on your new Alias from the list of Available Databases and then choose Select.
Login to P6 with your admin password entered during the database setup.
The first time you login to P6 you will see this warning.
Go to Admin | Admin Preferences menu.
Select your industry from the list of choices in the Industry tab of the Admin Preferences dialog.
You are now running Primavera P6 on a standalone database using SQL Server. At any time you can choose to connect to a production database or run P6 as a standalone client when you are on the road or otherwise unable to connect to your production system on the company network. You cannot synchronize with other databases, so any projects you wish to work on should be exported or better still, checked out and exported as an XER file and then imported into your standalone database via the Primavera P6 client. When you’re done with your changes, the process can be reversed.