In order to use Primavera P6 Professional, you must first set up a database. There are several different types of databases available, depending on how you will be utilizing the program.

If you plan to use Primavera P6 as a standalone user, you will want to set up a SQLite Database. This type of database allows just one user to access it, rather than multiple collaborators. 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 other users to the program. Any P6 features involving other users, such as Security Profiles, are not accessible in this database type. If P6 is being utilized for a whole company, you may need multiple people accessing the same projects within the database. This is not possible with a SQLite database.

If you’re planning to collaborate with others in Primavera P6, you will want to use a SQL Server Database. This is a shared database that allows multiple users to access the same project data. With SQL Servers, all the features of the program will be available – including Users and Security Profiles. However, not all users will necessarily be able to access the same data. The application administrators can pick and choose which users have access to specific projects. For workplaces, SQL Server databases are generally required. The only downside to using a SQL Server is the installation process. This server type is not prepackaged and instead must be set up manually.

Setting up a SQL Server can be a cumbersome process, as it requires the installation of several different applications. Many users choose to outsource this process – which is a service we provide here at Taradigm. However, it is possible to do it on your own – as long as you follow these steps in 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

In this article, we will outline the process of setting up a Microsoft SQL Server database for Primavera P6, following these steps.

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. You can download the newest version, Microsoft SQL Express 2022, for free on Microsoft’s website here.

In the lower right hand corner, under the section for Express, select Download now.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The application will automatically begin to download. Within your Downloads folder, double click on the .exe file to start the installation process.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The SQL Server Express Edition window will open.

First, you’ll need to choose an installation type. Because you will need to adjust some of the installation settings along the way, select Custom.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

This will open up the SQL Server Installation Center where you can specify how you want the program installed.

To start, choose the New SQL Server stand-alone installation or add features to an existing installation option.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The SQL Server Setup window will open. For the most part, you will just press Next to continue with the installation, except for the following sections:

Instance Configuration

When you get to the Instance Configuration step, select Named Instance.

The default named instance, SQLExpress, will already display here. However, you can change this name 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Once the named instance has been set, select Next to continue.

Database Engine Configuration

When you get to the Database Engine Configuration step, under Authentication Type, select Mixed Mode.

Enter and confirm a password 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 current user for your PC will display. 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

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:

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

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. You can find this 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Double click on the .exe file in your Downloads folder to run the installation.

Within the Microsoft SQL Server Management Studio Installation window, select Install.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Run through the installation using the default settings.

Test your installations

You should now have both Microsoft SQL Server Express and Microsoft SQL Server Management Studio installed. Now, you should test the programs to ensure they were properly installed.

To do this, open the Microsoft SQL Server Management Studio application. You can find this in your Windows Explorer under Recently Added programs, or by using the search bar. This file should now also be available within your computer’s Program Files.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The program will prompt you to log in to the SQL Server. Under Server name, you’ll find the server instance you created during the Microsoft SQLServer Express installation. Under Authentication, you can choose to log in using either 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). The password will be the password that you had set up during the Microsoft SQL Server Express installation process.

I recommend keeping Windows Authentication selected to make this easier.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Select Connect.

If you do not receive an error message, you have successfully logged into the SQL Server. 

Step 3: Setup the TCP/IP port on your SQL Express server

Next, you 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.

To do this, open up the SQL Server Configuration Manager. This application is available from the Microsoft SQL Server program files. Once again, use your Windows Explorer to either search for the program, or access the Recently Added programs.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the SQL Server Configuration Manager, select the arrow next to SQL Server Network Configuration. Then, select Protocols for SQLExpress underneath. If you renamed your server instance during creation, that name would display instead of SQLEXPRESS.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

On the right side table, right click on TCP/IP and select Enable.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

A dialogue box will prompt you to restart the service. Select OK – you will do this in just a moment. Before restarting, right click on TCP/IP again and select Properties.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the TCP\IP Properties window, click on the IP Addresses tab. Scroll down to the bottom of the window until you get to the IPAll section. In the text field for TCP Port, type in 1433.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Then, click OK. Once again, a dialogue box will appear, prompting you to restart the SQL Server service. Select OK to exit out of this dialogue box.

You 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Once the SQL Service has 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 now. If you need a license of Primavera P6, you can contact us here for assistance. We can assist you in both acquiring a license and getting the program downloaded onto your computer.

When you download Primavera P6, you will be downloading three zipped files. One file is for the Applications, one is for the Database Setup, and one is for the Integration API. While downloading these files, take note of the Database Setup zip file name. For me, this file was V1005948-01.zip.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Once you have downloaded the files, you should find all 3 zipped folders in your Downloads. Find the folder for the Database Setup, right click on it, and select Extract All. This will allow you to open these files later on.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Step 5: Download and install Java

Next, you need to download and install Java. You download Java for free from the Java website here. Select Agree and Start Free Download and the program will download to your computer.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

When the download is complete, double click on the .exe file in your Downloads folder. Run through the installation by pressing Install.

Once the program is successfully installed, you should see the following window:

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Step 6: Set up the environment variables for JAVA_HOME

With Java installed, you now need to define the JAVA_HOME environment variable in Windows. If this is not done, you 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, use 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The System Properties window will open with the Advanced tab selected. Select the Environment Variables button.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In this window, select the New button underneath the lower System Variable section.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Within the New System Variable window, type JAVA_HOME in the Variable name field. In the Variable value field, enter the name of the path to the Java applications program folder on your computer. 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. Search through the Program Files folder and the Program Files (x86) folder until you find the Java folder. Open up the Java folder and 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.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

With that location copied, paste it into the Variable value field and select OK.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

You can now exit out of the Control Panel windows.

Step 7: Run the dbsetup.bat tool

You can now run the Primavera Database Setup tool.

To do this, return to the Database Setup folder you downloaded along with Primavera P6. If you’ve been following the instructions so far, you would have already extracted this folder. It should now be available from your Downloads folder. The name of this folder will vary depending on the version of P6 you’ve downloaded. For me, this folder was V1005948-01. Open up the folder and the folder within it. Again, this folder will vary depending on the version of P6 downloaded, but for me, this was P6_R2012_Database. In that folder, find the file named dbsetup.bat and double click on it.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The Primavera Database Setup Wizard will automatically open. This will walk you 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.

Then, select Next. 

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the Connection Information screen, you’ll need to enter in the username and password you specified when setting up the SQL Server earlier. You would have done this back in Step 1 of this guide.

By default, DBA username will fill 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.

Within the Database host address field, enter in the host address for the SQL Server you created earlier. This will generally be your computer’s name\SQLExpress, if you had used the default named 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 fill in with 1433. Keep this field as it is and press Next.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the Configure Microsoft SQL Server window, you’ll need to set a name for your database. You can give your database any name. In this example, I’m going to create a database specifically for training, so I’ll set my database name as PPMTRAIN. 

The Data File, Log File, and Database code page fields will fill in automatically. Leave these fields as they are and select Next.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

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 leaving them as the default privuser and pubuser. After you connect P6 to the database, you’ll be able to add additional users, so it’s best to keep the defaults for now.

Make note of both these usernames and passwords – you will need them to connect P6 to the database. With your passwords entered in, select Next.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the Configuration Options window, enter in a username and password for the administrator. 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. If you keep this checked, P6 will preload with sample projects, resources and calendars. I find this data to be very useful, especially for new P6 users, so I recommend keeping this option selected.

Under Currency, you can choose which default currency type to use for the program. You can change this within P6 as well, if you need to adjust it later on. Then, select Install to complete the database setup wizard.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The Database Setup Wizard will begin to build your database. If you chose to load the sample data, this may take a few minutes to complete. Once finished, select Next, and then Finish to exit out of the application.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019
Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

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 you 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 install files, you’ll recall that there were three folders. By default, the program downloads a folder for the Database setup, one for Integration API, and one for the application itself. At this point, you’ll need to find the folder that holds the application itself. This folder will generally have a subfolder named P6_Pro_####, depending on the version downloaded.

For me, this folder was V1005947-01.zip. Just like you did for the database folder, right click on this folder and select Extract All.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The extracted folder will automatically open.

Double click on the P6_Pro folder within it. This folder’s name will vary depending on the version of P6 downloaded. For me, this folder was named P6_Pro_R2012.

Within that folder, double click on the P6ProfessionalSetup folder. Find the application file called P6ProfessionalSetup.exe and double click on it.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the P6 Professional Setup window, keep Typical selected and select OK.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Then, select Install to install the application.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the next screen, you’ll be able to set up the program. By default, Run Database Configuration will be selected – keep this selected and press OK.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

The Database Configuration window will automatically open.

If you already have P6 installed on your computer:

You can access the Database Configuration window by opening up Primavera P6 Professional. Within the log in window, select Edit database configuration.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the Database Configuration window, select Add.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Under Driver Type, choose Microsoft SQL Server/SQL Express if it’s not already selected.

In the Database Alias field, you can enter in a name for the database. It’s generally useful to have this alias match the database name you set earlier. In this example, I’ll set this alias to PPMTRAIN, matching my database.

Under Connection String, enter in the connection string for your database. This will be your Computer Name/Database Name. For me, this would be DESKTOP-54SV0M/PPMTRAIN.

Under Keystore, keep Use default database keystore selected.

Then, select Next to Continue.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

In the next window, you’ll need to enter in your public username and password. These should match the public user credentials that you set up during the database’s creation. If you didn’t change the default public user username, you should set the Username as pubuser.

Under Password, enter in the password that you had assigned to the public user.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

To check if these login credentials are correct, select the Test button. If everything checks out, a dialogue box will let you know that the connection was successful.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Select OK, and then Save.

Another dialogue box will appear, informing you that the Database Alias has been saved.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

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 in to 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. Under Login Name and Password, enter in the credentials you set during database creation.

Select Advanced to expand the section. Under Database, select the database you just created if it’s not already selected.

Hold shift key to keep line markup tools straight in Bluebeam Revu 2019

Select Connect, and you will now have access to your database in Primavera P6. You can now begin to administer the program for other users to access.

If you have any comments, questions or suggestions, please use the comment section on the bottom of this page. Don’t forget to subscribe to our blog to get more Primavera P6 tips & tricks directly in your inbox!

Lauren Hecker is the instructor for the Primavera P6 Professionals training courses. To see her next open enrollment course, please visit our calendar. To schedule an onsite or custom course, please contact us!

19 Comments

  1. jody

    merci beaucoup. c’est clair et tres facile a appliquer

    Reply
  2. Abdul Qadir

    Thanks you

    Reply
  3. rawan

    Dear Lauren, hope you are doing well,
    first thank you for the helpful articles its really helpful,
    but im facing an issue when i add new connection db and click on the test button it gave me a message “bad private user name or password check the public group id. invalid object name ‘PUBUSER’ “

    Reply
    • Lauren Hecker

      Hi Rawan,
      This error is most likely due to an issue during setup. During Step 7: Running the dbsetup.bat tool, you may have changed the pubuser name to another value – if this is the case, you would need to enter in the pubuser field you originally entered in. Also, ensure you have the correct Database Alias entered in as well.

      I recommend trying the setup again from the beginning – I’ve had many times where the database creation failed during the Test and it was usually due to a minor error along the way. If you try again and are still having issues, feel free to contact us further. We can always assist with database setup as a service if needed.

      Reply
  4. Casey Hanson

    I ran into the same issue. Its not a setup problem (I tried redoing the process three times). My issue ended up being with the path name. I have a chain vs. a single server and the slashes are different. So instead of SERVER/DCMS, I have SERVER\FILENAME/DCMS. I was using SERVER/FILENAME/DCMS (slashes same direction) which was throwing the error. Not sure if that is your issue, but it worked for me.

    Reply
  5. Abdallatief

    tanks much for the very helpful article
    I already successfully installed it and accessed from my PC

    I need to know how the other users shall connect. should they have the same database installed on their PCs or done by another method?

    Reply
    • Lauren Hecker

      Hi Abdallatief,
      Once you have the SQL Server set up, your other users should be able to connect by selecting Edit Database Configuration within the P6 startup screen. There, they can press Add to add a new connection. You’ll need to provide them with Connection String you used earlier, and they should just be able to log in to the program.

      Reply
  6. Akash

    HI First of all i would like to thanks you so much for the amazing and clear crystal content you have posted.Really appricated.
    i have tested and saved the db after that i need to login to primavera with public un and pass or admin un nd pass? i tried login with public un nd password it says invalid un and password.

    Can you please advise.

    Thanks

    Reply
    • Lauren Hecker

      Hi Akash,
      Once the database has been set up and saved, you will log in to P6 using the Administrative username and password set – rather than the public/private ones. These steps are outlined in steps 7-9 within the article.
      Hopefully this allows you to log in! If you’re still having trouble, I’m happy to troubleshoot further.

      Reply
  7. Hamed

    Hi Lauren,

    Thank you for the detailed guide.

    Is it possible to reset the Privuser/Pubuser password? I’m trying to restore a database from another computer and can’t connect as the person forgot the password.

    Thanks,

    Reply
    • Lauren Hecker

      Hi Hamed,
      You should be able to do this by following the instructions in Step 7: Running the dbsetup.bat tool and selecting Upgrade an existing database. You will need to have the Administrative username and password, however – if you don’t have these, you may not be able to reset the user Privuser/Pubuser passwords.

      Reply
      • Priyanka Bisht

        How do I reset application user password?

        Reply
        • Lauren Hecker

          Hi Priyanka,
          If your users are able to get into the program, they can reset their own password by going to Edit > User Preferences > Password > Reset Password. If they can’t get into the program but your Administrator can, they can reset a user’s password by selecting Admin > Users . Select the desired user and use the Password button in the General tab to reset their password.

          Reply
  8. Ramon Torres Guzman

    Thanks for this Lauren, I tried this and it worked perfectly. I now have a SQL Server database P6. My issue is travel. why i can not connect to the database if i am outside My company’s internet, say my hotel room or my home network?

    Reply
    • Lauren Hecker

      Hi Ramon,
      A P6 database can not be accessed everywhere. It is connected to the computer that you connect to the SQL Server tool. If this was set up using your company’s SQL network, you may not be able to access it outside of that network. I would get in touch with your It representative to see where the SQL Server network is located, and if you can gain access to it outside of your company’s wifi.

      A good alternative to this as well is P6 EPPM and Oracle Primavera Cloud, which are two “online” P6 options where you can log in to the program from anywhere, as long as you have an intenert connection.

      Reply
  9. Sarang Jaiswal

    Thank you soo much! Great article!

    Reply
  10. Jay Dehal

    Hello Lauren,

    I gotta say, this is the most comprehensive article I’ve ever seen on “How to Set Up a SQL Server Database for Primavera P6”. Not even Oracle has such clear, definitive and precise directives on how to set up a SQL Server Database. Great Job ! Kudos to you !

    Is there any way to determine the private user and public user database user name and password ? I have backed up and restored a couple of databases from one computer to another but for each database connection attempt, I am getting a “Bad user name and password for PUBUSER”. In my previous set up on the old computer, I think I had the same user name and password for each of the databases but I am not sure I did note take note of them. However, the same user name and password does not seem to work for each of the databases on the new computer.

    Any thoughts ? If not, I may have to put in a service request to Oracle.

    Thank you.

    Reply
    • Lauren Hecker

      Hi Jay,
      Thank you for the kind words! Unfortunately, I don’t know any way to get the pubuser/privuser user names and passwords after setting up the database.
      I would recommend contacting Oracle Support to help get this information.

      Reply
  11. Joe

    This tutorial is great and was very helpful when I originally setup a central SQL Express database for P6. I need to retire the existing computer I have this on and move the P6 SQL Express database to a new computer. I was curious if you had a tutorial similar to this one, but more specific to moving a P6 Pro database from one computer/SQLExpress instance to a new computer SQLExpress?

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *