In order to use Primavera P6 Professional, you must first set up a database. There are several different types of databases that can be used, depending on how you will be utilizing Primavera P6.
If you’re using Primavera P6 as a single-user and will not need to collaborate with others, you will want to use a SQLite Database. The SQLite Database comes prepackaged with P6 – essentially, this will be set up for you when you download Primavera P6 as a standalone installation. SQLite is the easiest database to use, but it does come with downsides. For one, you won’t be able to add additional users to the program. Additionally, some features within P6, such as Security Profiles, can not be used within a standalone database. In most cases, when P6 is being utilized for a company, you will need to have multiple people be able to access the same projects and data within the database. This is not possible with a SQLite database.
If you want to use Primavera P6 to allow multiple users to access the same projects and data, you will want to use a SQL Server Database. This is a shared database that allows multiple users to access the same data while giving administrators complete control over what those users can do within the program. With SQL Servers, all of the features of the program will be available – you will be able to set up Users, set permissions, and create Security Profiles. The only downside to using a SQL Server is the installation process – this server type is not prepackaged within the program and must be set up manually.
Setting up a SQL Server can oftentimes be a cumbersome process that requires the installation of several different applications. In this article, we will outline the step by step process of setting up a Microsoft SQL Server database for Primavera P6 Professional. Because of the complexity of this process, it is important to follow these steps as closely as possible in the following order:
1. Install a copy of Microsoft SQL Express on your computer
2. Install a copy of Microsoft SQL Server Management Studio (SSMS) on your computer
3. Setup the TCP/IP port on your SQL Express server
4. Download the Primavera P6 Database Setup Tool
5. Download and Install Java
6. Set up the environment variable for JAVA_HOME
7. Run the dbsetup.bat tool
8. Connect your P6 Professional Client to the database
Step 1: Install a copy of Microsoft SQL Express on your computer
The first thing you will need to do is install a copy of Microsoft SQL Express Server onto your computer. The newest version, Microsoft SQL Express 2019, can be downloaded for free on Microsoft’s website here.
In the lower right hand corner, under the section for Express, select Download now.
The application will automatically begin to download and can be found in your Downloads folder. Double click on the .exe file to start the installation process.
The SQL Server Express Edition window will open.
You’ll be prompted to choose an installation type. Because we will be adjusting some of the installation settings along the way, select Custom.
This will open up the SQL Server Installation Center where you can specify exactly how the program will be installed.
To start with, choose the New SQL Server stand-alone installation or add features to an existing installation option at the top of the window.
The SQL Server Setup window will open. For the most part, you will just continue to just select Next to continue with the installation, with the exception of the following sections:
When you get to the Instance Configuration step, select Named Instance.
The default named instance, SQLExpress, will already be entered here, but this can be changed if desired. This will be the name used in the SQL Server’s installation path. If you do adjust this named instance, make sure to make note of the name you choose, as you will need to use it again later in the process.
DATABASE ENGINE CONFIGURATION
When you get to the Database Engine Configuration step, under Authentication Type, select Mixed Mode
Enter and confirm a password that will be used for the SQL Server administrator. Make sure to write this password down, as you will need to use it when you add a new database to the server.
Under Specify SQL Server administrators, the PC that the database was created on will appear with the current user by default. It’s a good idea to write down the full administrator name (PC name\user) as you will need this to continue setting up the database later on.
Once again, select Next to continue.
Continue the installation using the default settings by selecting the Accept and Next buttons as prompted. With the installation successfully completed, you will see the following dialog box:
Select Close to exit out of the SQL Server Installer.
Step 2: Install Microsoft SQL Server Management Studio (SSMS) on your computer
You will also need to download Microsoft SQL Server Management Studio (SSMS) before continuing. This can be found on the Microsoft website here.
Under the Download SSMS header, you should find a link to download the software. Click the link and the file will automatically begin downloading.
Once again, the file will be able to be found in your Downloads folder. Double click on the .exe file to run the installation.
The Microsoft SQL Server Management Studio Installation window will automatically open. Select Install.
Run through the installation using all of the default settings.
TEST YOUR INSTALLATIONS
With both Microsoft SQL Server Express and Microsoft SQL Server Management Studio installed, you can now test whether both programs were properly installed.
To do this, open the Microsoft SQL Server Management Studio application. This can be found in your Windows Explorer under Recently Added programs, in your Program Files on your local drive, or simply by using the search bar on your computer’s bottom toolbar.
The Server Instance that was created during the installation of the Microsoft SQL Server Express will appear in the Server name field.
Under Authentication, you can choose to log in either using Windows Authentication or SQL Server Authentication. With Windows Authentication, you won’t have to enter in any credentials. With SQL Server Authentication , you will need to enter in a Username and Password. The Username will be sa (standing for Server Administrator) and the password will be the password that you had set up during the Microsoft SQL Server Express installation process.
I recommend simply keeping Windows Authentication selected.
If you do not receive an error message indicating that you weren’t able to log in, you have successfully logged into the SQL Server.
Step 3: Setup the TCP/IP port on your SQL Express server
Next, we need to set the TCP/IP port for the SQL Express server. Without completing this step, you will not be able to properly set up a database.
This is done by first opening the SQL Server Configuration Manager, which is available from the Microsoft SQL Server program files. Once again, this can be found by searching the recent apps in your Windows start menu, looking within the program files on your local disk, or simply by using the Search bar on your computer’s bottom toolbar.
In the SQL Server Configuration Manager, expand the SQL Server Network Configuration section in the left table and select Protocols for SQLEXPRESS (if you renamed your server instance during creation, that name would display instead of SQLEXPRESS).
A dialogue box will prompt you to restart the service. Select OK.
We will restart the SQL Server Service in a moment, but before doing that, right click on TCP/IP again and select Properties.
Click OK. Once again, a dialogue box will appear to let us know that we need to restart the SQL Server service for the changes to take effect. Select OK to exit out of this dialogue box.
We can now restart the SQL Server Service directly from within the Configuration Manager. To do this, select the SQL Server Services option from the left side table. In the right side table, right click on SQL Server (SQLExpress) and select Restart.
Once the SQL Service has successfully restarted, you can close out of the SQL Server Configuration Manager.
Step 4: Download the Primavera P6 Database Setup Tool
If you don’t already have Primavera P6 Professional installed on your computer, you will need to do that at this time. If you need a license of Primavera P6, you can contact us here and we will be able to help you acquire a license and get the program downloaded onto your computer.
When you download Primavera P6 Professional, you will be downloading three zipped files: one for the Applications, one for the Database Setup, and one for the Integration API. While downloading these files, take note of the name of the zip file for the Database Setup – for me, this was named V1005948-01.zip.
Once you have downloaded the files, you should find all 3 zipped folders in your Downloads folder. Find the folder for the Database Setup, and extract it by right clicking on the folder and selecting Extract All.
Step 5: Download and Install Java
Next, we need to download and install Java. This can be downloaded for free from the Java website, here. Select Agree and Start Free Download and the program will download to your computer.
Once the download has been completed, double click on the .exe file which can be found in your Downloads folder. Run through the installation by pressing Install.
You should see the following window once the installation is complete, informing you that the program has been successfully installed:
Step 6: Set up the Environment Variables for JAVA_HOME
With Java installed, we now need to define the JAVA_HOME environment variable in Windows. If this is not done, we will not be able to use the P6 Database Setup tool.
To set up the JAVA_HOME environment variable, first open up your Windows Control Panel. If you can’t find your Control Panel, once again, utilize the search bar on your Windows bottom toolbar.
In the Control Panel window, use the search bar to search for “system”. In the search results list, select Edit the system environment variables. This will be the first result under the System category.
The System Properties window will open up with the Advanced tab selected. Select the Environment Variables button.
In the Environment Variables dialog box, select the New button underneath the lower System Variable section.
In the New System Variable window, type JAVA_HOME in the Variable name field.
In the Variable value field, you are going to enter the full path on your computer to the Java applications program folder. For me, this was C:\Program Files\Java\jre1.8.0_311. This most likely will be in your Program Files.
To find this location, open up your Windows Explorer and access your local disk. From your Local Disk, search through the Program Files folder and the Program Files (x86) folder until you find the Java folder. Open up the Java folder, and open the program folder within it (this will most likely start with jre). Once in that folder, select the address listed in the location string box and copy that text.
With that location copied, paste it into the Variable value field and select OK.
You can then exit out of all of the Control Panel windows.
Step 7: Running the dbsetup.bat tool
We can now run the Primavera Database Setup tool.
To do this, you will want to return to the Database Setup folder that was downloaded along with Primavera P6. If you’ve been following the instructions so far, you would have already extracted this folder and it should be available from your Downloads folder. The name of this folder will vary depending on the version of P6 you’ve downloaded, but for me this folder was named V1005948-01.
Open up the folder and open the folder within it. Again, this folder will vary depending on the version of P6 downloaded, but mine was named P6_R2012_Database.
In that folder, find the item named dbsetup.bat and double click on it.
The Primavera Database Setup Wizard will automatically open. This will walk us through the process of setting up a new database.
Under Database options, keep Install a new database selected.
Under Server Type, select Microsoft SQL Server.
\In the Connection Information screen, you’ll be entering in the username and password that you specified during the setup of your SQL Server earlier on.
By default, DBA username will be filled in with sa (standing for server administrator). Keep this field as it is.
In the DBA password field, enter in the password that you had chosen when creating the SQL Server.
In Database host address, enter in the host address for the SQL Server that was created earlier. This will generally be your computer’s name\SQLExpress, if you had used the default name instance during creation. If you had changed the named instance during creation, the host address would be your computer’s name\named instance.
The Database host port field will automatically be filled in with 1433. Keep this field as it is and press Next.
In the Configure Microsoft SQL Server window, you’ll first set a name for your database. You can give your database any name of your choosing. I’m going to create a database specifically for conducting Primavera P6 training sessions, so I’m going to set my Database name as PPMTRAIN.
The Data File, Log File, and Database code page fields will already be filled in – leave these fields as they are and select Next.
In the Create SQL Server Users window, you can set up two default users – a privileged user and a public user. You can change these usernames if desired, but I recommend just keeping them as the default privuser and pubuser. After P6 is connected to the database, you will be able to add additional users, so it’s best to just keep the defaults for now.
Make note of both these usernames and passwords – they will be required to connect P6 to the database.
With your passwords entered in, select Next.
In the Configuration Options window, you’ll create a username and password for the administrator login. Again, you can change the username, but I recommend keeping the default of admin. Enter in a password, and, again, make note of this password, as you will need it to log in to Primavera P6.
You also have the option to Load sample data. With this option checked, P6 will be preloaded with sample projects, resources, calendars, and other global and project-specific data. I find this data to be very useful, especially for new users of P6, so I recommend keeping this option checked.
Under Currency, you can choose which default currency type tov use for the program. This can be changed within P6 as well, if it needs to be adjusted later on.
Select Install to complete the database setup wizard.
The Database Setup Wizard will then begin to build your database. If you chose to load the sample data, this may take a few minutes to complete. Once the creation has finished, select Next, and then Finish to exit out of the application.
Step 8: Connect your P6 Professional Client to the database
At this point, you have now successfully created a Primavera Database on a SQL Server. Next, you will need to connect Primavera P6 Professional to the database so we can use it within the program.
IF YOU DO NOT HAVE P6 INSTALLED ON YOUR COMPUTER:
Return to your Downloads folder.
When you downloaded the Primavera P6 Professional application files, you will recall that you downloaded three folders: one for the Database setup, one for Integration API, and one for the application itself. You’re going to need to find the folder that holds the application folder (which should be named P6_Pro_####, depending on the version number you downloaded).
For me, this folder was V1005947-01.zip. Just like you did before for the database folder, right click on this folder and select Extract All.
The extracted folder will automatically open.
Double click on the P6_Pro folder within it. Again, depending on the P6 version that you downloaded, this may have a different name, but for me, this folder was called P6_Pro_R2012.
Within that folder, double click on the P6ProfessionalSetup folder. Find the Application file called P6ProfessionalSetup.exe and double click on it.
In the P6 Professional Setup window, keep Typical selected and select OK.
In the next screen, select Install to install the application.
In the next screen, you’ll be able to configure the next steps for the program. By default, Run Database Configuration will be selected – keep this selected and press OK.
The Database Configuration window will automatically open.
IF YOU ALREADY HAVE P6 INSTALLED ON YOUR COMPUTER:
With P6 already installed, you can access the same Database Configuration window by opening Primvera P6 Professional, and selecting the Edit database configuration button.
In the Database Configuration window, select Add.
Under Driver Type, Microsoft SQL Server/SQL Express should already be selected – if it is not, make sure to select this type.
In the Database Alias field, you’ll want to enter in a name for the Database. To keep things simple, I’m going to have my Database Alias be PPMTRAIN, which was the name I assigned to the database during its creation.
Under Connection String, you’re going to enter in the connection string for your database, which will be your Computer Name/Database Name. For me, this would be DESKTOP-54SV0M/PPMTRAIN.
Under Keystore, keep Use default database keystore selected.
Select Next to Continue.
In the next window, you’ll be prompted to enter in your public username and password – these would be the public user credentials that you had setup during the database’s creation. If you didn’t change the default public user username, this field should be filled in with pubuser.
For Password, enter in the password that you had assigned to the public user.
To check if these login credentials are correct, select the Test button. If everything checks out, a dialogue box should open to let you know that the test connection was successful.
Select OK, and then Save.
Another dialogue box will appear to let you know that the Database Alias was saved successfully.
Select OK, and then Exit to exit out of the Database Configuration window.
At this point, you have successfully created a SQL Server Database and connected it to Primavera P6.
LOGGING INTO A NEW PRIMAVERA P6 DATABASE
You can now log in to Primavera P6 Professional and use your newly created database. Once again, open up Primavera P6 Professional. You will want to log in to P6 using the administrative login credentials that you had set up during database creation.
Select Advanced to expand the section. Under Database, make sure that your newly created database is selected – if not, select it.
Select Connect, and you will now be connected to your database in Primavera P6 Professional.
If you have any comments, questions or suggestions, please use the comment section on the bottom of this page, and don’t forget to subscribe to our blog to get more Primavera P6 tips & tricks directly in your inbox!
Lauren Hecker is a Primavera P6 Professional Instructor and teaches Onsite Primavera P6 Courses, virtual Primavera P6 Fundamentals and Advanced courses, and custom onsite or virtual courses. To see her next open enrollment course, please visit our calendar. To schedule an onsite or custom course, please contact us!