How to increase the session timeout in Primavera P6 EPPM
The session timeout Is the maximum amount of time the user session is active regardless of interaction. In this section, I have explained how to check the default Primavera p6 session timeout and how to increase or decrease the session timeout.
1) What is the default session timeout in Primavera P6
1.1) If you deployed Primavera P6 in WebLogic server then identifying the default session timeout is an easy task. First, you need to login to P6 as an application user, then login to WebLogic server > Deployment > Expand P6.ear > Select P6.war
1.2) Click on the Monitoring > Session tab. You will see the session timeout in Max Inactive Interval as 3600 seconds, so the default Primavera P6 session timeout is 1 hour
2) How to increase of decrease the Primavera P6 Session Timeout
Here we are going to increase the P6 session timeout to 2 hours
2.1) Open a command prompt > Go to the P6Home\P6 directory > Backup the P6.ear file > Issue the following command to unzip the p6.war file from the p6.ear file
jar xf p6.ear p6.war
2.2) Issue the following command to unzip the web.xml file from the p6.war file
jar xf p6.war WEB-INF\web.xml
2.3) Edit the web.xml file in a notepad file > Search for session-timeout > Increase the time to your desired value. I increased it to 120 minutes, 2 hours
2.4) Update the web.xml file back to the p6.war file
jar uf p6.war WEB-INF\web.xml
2.5) Update the p6.war file back to the p6.ear file
Jar uf p6.ear p6.war
2.6) Redeploy the modified p6.ear file into the WebLogic server > Login to P6 to create a session > Check the WebLogic server for the timeout as mentioned in 1.2
About Primavera P6 Jobs, P6 Job Server and P6 Services.jar
In Primavera P6, many of the functionality requires time to complete, say more than 8 seconds. Oracle Primavera predefined these types of long-running functionality as a job which runs in the background. For example, copy and paste Projects. The time required to copy, and paste projects is depending on the number of projects, project size etc., so performing this task as a background job is an efficient method so the user doesn’t need to wait till the paste operation completes. Below I have mentioned some of the Primavera jobs
Schedule a project(‘s)
Summarize a project or EPS
Export an XER file
Import a Project from XML
Export a Project to an XML
Generate PM Report
Store Period Performance
Create Baseline for a Project
Send to Unifier
An example scenario how the P6 job works
Below I have explained an example scenario about how a Job created, processed and finished by Primavera P6
1. User Copy a Project in Primavera P6
2. A record inserted into the JOBSVC table with JOBTYPE = CopyProject and STATUS_CODE = PENDING
3. The job server in P6 web picks the record and start processing and update the STATUS_CODE = RUNNING
4. Meantime, user can perform other activities in P6 and see the status of the Job in VIEW SERVICE STATUS page
5. The P6 Job Server in P6web updates the STATUS_CODE = COMPLETED/FAILED status once it done. The same status can be shown in the view service status.
Where is the P6 Job Server available?
The P6 Job Server is available in all the below Job modules
1. P6.ear (P6 Web Application)
2. Primavera Integration.Ear (P6 Integration API Server)
3. intgserver.ear (P6 Integration API )
4. P6services.jar (P6 Job Server)
5. p6ws.ear (Primavera Web Services)
P6 Job Server Configuration
The primavera admin config lists all the P6 job services. We can see and tune each p6 jobs by opening the P6 admin config > Expand the Configuration used by the p6 modules > Expand services >>Expand each job service and configure the setting
Here, I have expanded the Scheduler job and I can tune as below
Interval => P6 scheduler wait for 10s second before running the next job
Concurrent Threads => 2 Java threads run at a time and each thread takes a scheduler record from JOBSVC table and process it. A value of 0 indicates that this service will not run on the server (A thread per Server core, suppose you have 4 cores than don’t crease the concurrent thread value more than 4)
Active Mode => Choose true if you want jobs processed continuously until all jobs finish. Choose false if you want each job processed according to the Interval.
Like the above, we can enable/disable, increase/decrease concurrent threads of the jobs on each application. For example, I could enable SUMMARIZER, LEVELLER& SCHEDULER on one JOB Server with the high concurrent job and disable others jobs. On a large scale P6 environment, it is necessary to have a dedicated JOB server to process these jobs.
For example, assume there are 200 concurrent users using P6. One is summarizing an EPS, and other is publishing an EPS. If the EPS consist of 1000 project then 1000 record for Summarizer, and 1000 for Publisher records created in the JOBSVC table. P6 web only takes care of these 2000 jobs, then it affects the performance and may get a chance of Job will fail. A dedicated P6 job server is highly recommended.
How to create and run a P6 job Server
Oracle recommends running the P6 Job Server on a dedicated server. The p6services.jar is a jar file that comes with the P6Home directory as shown below
Run the dbconfig and create a separate P6 configuration for P6Services so you can tune the Job configuration.
Make sure the BreBootstrap.xml should point to the new configuration ‘P6 Services’
If you open the admin config, you will notice a separate configuration for P6services.jar like below
Now create a batch file called startP6Service.bat or shell startP6Service.sh & append the following line in it. Place the bootstrap.home and p6services.jar path according to your environment
You can manually invoke the P6 Job server by double click on the batch file. You will see the P6 Services Started Sucessfull message as shown below. This will read all the PENDING jobs in the JOBSVC table based on the JOb setting in admin config
You can put this batch file in Windows Job Scheduler or Linux CRON job as a nightly job so the Job service will run every night at less loading time.
Is it possible to Logout Primavera P6 Web through SQL Query?
Recently I noticed a question in Oracle community forum that sounds interesting to me. The question is ‘How to Log out a Primavera P6 EPPM user through SQL Query‘. I have not faced this type of scenario before, so I checked in to my local p6 weather is it possible.
I know the Primavera P6 inserts records into USESSION table when a user logs into Primavera P6 EPPM. Will it delete the USESSION table after the user Logs out? Yes, P6 deletes the record but not immediately when the user logs out. Instead, the P6 background job deletes the records on a scheduled interval.
The question here is Will deleting the user records in the USESSION table Log-out the user from Primavera P6? I initially thought so but went and tried. The answer is NO. We can not log out the user from P6 by deleting records from USESSION table. I am doing the following three steps to illustrate further
1. User Login to Primavera P6 EPPM
2. Deletes the USESSION table for the corresponding user
3. Refresh the P6 page to see the user is logged out
Let’s begin each points:
1. User Login to Primavera P6 EPPM
Here, I logged into P6 as ADMIN user account
2. Deletes the USESSION table for the corresponding User
Here, I deleted the session for user ADMIN once he logged in. The Query is below:
delete from usession where user_id = (select user_id from users where user_name = ‘admin’)
3. Refresh the Primavera P6
Here, I refresh the page and navigate to another tabs in P6 to check the user is signed out. Actually, the session is still valid
I checked the USESSION table again. P6 created a new session in the USESSION table for the user ADMIN. I have waited for 15 minutes and refreshed P6. It renders well.
I did the same above 3 steps in Primavera Professional for EPPM, that is Login to Professional, Deletes the USESSION table, Refresh the page. I received the following error message, so Deleting USESSION table logs out the P6 Professional. Thanks, Ravi & Nilesh for your valuable comment in LinkediIn.
I guess Primavera P6 Web kills the Session through Java when the user Logs out from P6 (JAVA & JSESSIONID). And this is my knowledge about P6 and not from the Oracle documentation.
Configure Windows Firewall for Microsoft SQL Server 2017 – Part 4
This is the continuation if Microsoft SQL Server installation series. In this section, we walk through how to allow Windows Firewall to work with Microsoft SQL Server. Follow the links if you are interested in Microsoft SQL Server Installation
2. Open the Downloaded file. A wizard will appear like below. Select the option you want. I chose Download MS SQL server installation Media, so I can use the software later
3. Choose the location where you want to download the Microsoft SQL Server
4. The wizard begin to download the Microsoft SQL SERVER
5. Close the wizard once the download is completed. The MS SQL Server software’s will be residing in the location mentioned in step 3
Microsoft SQL Server 2017 Installation
6. Go to the SQL SERVER software folder location and double click on the SQLSERVER2017-DEV-x64-ENU.exe. This will extract the software files and open the MS SQL Server setup wizard
7. Click on the installation on the left-hand side and click on the New SQL Server stand-alone installation or add features to an existing installation
8. Choose the Developer and click Next
9. Select as shown below and click Next
10. Ignore the firewall warning now. We will configure it later
11. I selected all. Select the ones to need for you
12. Choose the option you want and click Next
13. Select as shown below & Click Next
14. Click Next
15. Click on the Server Configuration tab. Here I chose Mixed Mode, so the SQL Server SA user and windows login user are administrators to MS SQL Server.
Note: By clicking Add Current User will add the logged in Windows user account to SQL Server administrator. You can add a different user as well by click on the button Add
16. This is optional. Click on the FILESTREAM tab and enable as shown below to Enable FILESTREAM in MS SQL SERVER
17. Add the user you want as Administrator and click Next
18. Click Next
19. Click Next
20. Add your user account and click Next
21. Click Next
22. Click Accept and Next
23. Click Accept and Next
24. Click on the button Install
25. The installation progress will begin, and it takes some time to complete
26. Sometimes the wizard downloads the required files automatically and sometimes it not. If you see the screen like below, then click on each link and download the files; Place those files in a folder; Input the folder in the install path and click Next
27. Click Close once all completed successfully. You will see a complete message on the title bar, scroll down and check all are successful and check the details bar for the successful status.
If anything failed in this wizard then fix those errors and re-run the installation wizard by running the setup.exe in the software folder and click new install again as like in Step 7
28. You Will find the MS SQL Server in the windows start menu
If you installed Machine Learning then you will see this as well
In My next post, I will explain how to create a database in Microsoft SQL Server