Friday, June 22, 2012

Killing User Sessions in P6

The first step is to find out the user_id of the user that we wish to remove. You can do this by running something like the following, but substituting the string in the LIKE expression to find the user in question:

SELECT *

FROM users

WHERE LOWER(user_name) LIKE LOWER('%PSN9954%');



Having got the user_id we disable their session. A few versions ago this involved removing rows from a number of tables, but with the introduction of the background jobs life has become far easier. All we need to do is mark the record from the USESSION table by setting the delete_session_id to zero and giving the delete_date column a value, which I take from the system date. The example code below assumes the user_id is 123.



UPDATE usession

SET delete_session_id=0, delete_date=GETDATE()

WHERE user_id = 999;



So long as background jobs are running properly, and they should be, they will delete the user session record within a minute at most.



In order to give users the option to override their own sessions the following can be added to their PM.ini file:



[Database]



DeleteCurrentUserSessions=TRUE 



Note in P6 8.0 this is now available in the user interface of the Web Application.



For  more details see this article.



http://usingp6.com/administrator/2011/10/14/end-p6-user-session.html

Wednesday, February 22, 2012

Error CVRJC-0348-8 on Primavera

Posts

A User reported an error on Primavera today and I found the fix on the Oracel support Knowledgebase #Bug 9796699: EVENT CODE: 'CVRJC-0348-8' WHEN ACCESSING PROJECT USERS DIALOG SCREEN.

Run the following on the database..

DECLARE @RC int
DECLARE @pret_val int
DECLARE @pret_msg varchar(4000)
EXECUTE @RC = [PMDB_KTT_Corrupt].[dbo].[usession_clear_logical_deletes] @pret_val OUTPUT ,@pret_msg OUTPUT

GO

delete from PROJSHAR where load_status = 'O' and session_id not in (select session_id from usession) or session_id in (select session_id from usession where delete_session_id is not null);

GO

Everything works fine after that....

Wednesday, February 1, 2012

Utility to check broken links on a website

Today I brushed off some old tech and downloaded a tool I’d used many years ago (I may even have blogged this before!) to check if the Intranet had any broken links.  That tool was called XENU (http://home.snafu.de/tilman/xenulink.html)
Download it from the website (http://home.snafu.de/tilman/xenulink.html#Download)
Extract the ZIP file and Run the install.exe
Installation

Click Next
Click “I Agree”
Click Next
Select the destination directory and click Next
Click Install

Click Next
Click Finish.
Running a link check
Start the application from the Start menu / Xenu Link Slewth / Xenu
From the menu screen click the “Check URL” button on the far left of the tool bar

In the dialogue box enter the URL you want to check, e.g. https://intranet.mydomain.com.au and uncheck the “Check external links” option, unless you want to check those sites.
Click OK.
Results are shown in a list where each link is tested to make sure it’s working correctly.

Press <CTRL>B to clear the view of everything except broken links.
Keep your eye on the progress using the status bar.

At the end you will see something like this:

Showing one broken link.

Monday, January 30, 2012

How to fix a Corrupted XER file

From the Oracle Support desk download the PATTLNK_782008_1412-xerFileParserBuilder.xls file.  It’s also available on the drive: \\ap-fs-02\data\EPF\BSG\Downloads\Primavera\Fix XER files.  Copy the Excel sheet to your local machine.
Open the Spread sheet
Enable all content
Click “Load XER file…”
If you get an error message; the reason is that you are missing the “Comdlg32.ocx” file on your machine.  Copy the file \\ap-fs-02\data\EPF\BSG\Downloads\Primavera\Fix XER files\Comdlg32.ocx file to your C:\Windows\System32 directory and try again.
Select the file you want to check and click OK, the Spread sheet with populate with all the information you need.  This can take a long time depending on the size of the export.

On the front page click the “Diagnostics” button.
On the dialogue select “cross check FK”; Task and task_id; TASKRSRC and task_id.

Click “Run Diagnostic”

You will then be shown all the “Task Resources” which have been assigned to “Tasks” that no longer exist.
Note the Row number in the results.

Go to the TASKRSRC tab and remove these rows from the Spread sheet.. Feel free to run the Diagnostics a few times to make sure you have everything covered.

Eventually you should see that no errors are displayed.
Go back to the front page and click the “Build XER File…” button.
Save the fixed XER file to another file and try the Import again.

Tuesday, November 29, 2011

Connecting to a local Team Foundation Server

Here are details of how to connect to TFS for all your Source Control needs within VS2010/2008.
  1. Open Visual Studio
  2. From the “Team” menu select “Connect to Team Foundation Server..”
  3. Click “Servers”
  4. Click “Add”
  5. Enter the URL for the server e.g. “:8080/tfs">http://<server>:8080/tfs” in the Name field and Click “OK” and Click “Close”.

     6. Select the projects you want to have access too and click “Connect”.

    7. Select “Team Explorer” from the bottom right; Then click the “Source Control Node”; Then “Not Mapped” and Finally enter a local directory on which you will store the code.
    8.  Click “Map” and “Yes” if you are prompted to to a Get.

Thursday, November 3, 2011

Customising CSV export in Business Objects

Classic thing today, something that should be very, very simple turned out to be a total pain.  Using the Business Objects fat client you can choose any CSV export parameter you wish to use, however on the InfoView interface these options a read-only!  This is really silly as the engine to generate the reports is exactly the same. 

To get around the problem required a bit of hacking on the underlying InfoView scripts.  this is probably not support by Business Objects, but it was a fairly simple change.

All that is needed is to edit two files (why two? well I’ve no idea, but figured it was safer to do both): \scripts\CSVoptions.js and \html\CSVOptionsDialogue.html which are located in the “C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\java\server\work\APAPPBO01.WebApplicationContainerServer\businessobjects\AnalyticalReporting\12\AnalyticalReporting-12.war\viewers\cdz_adv\language\en” folder.

The code change is simple;

arr=separators.split(' ');

becomes

arr=(separators+' |').split(' ');

Note: You’ll need to reboot the server as TomCat will not register the change.. weird…

Tuesday, July 26, 2011

Business Objects – the basics

Here is some basic information relating to Business Objects which you may find useful..

Setting Up the Server

  • Go to the installer directory
  • Run the "Setup.exe"
  • Note: you’ll need the product code
  • Take all the default settings.

Web Services Available

When installed Business Objects provides 2 main services over the web.
  1. InfoView (:6405/InfoViewApp/logon.jsp">http://<server>:6405/InfoViewApp/logon.jsp); this is the main interface for Users within the Organisation
  2. Central Management Console (:6405/CmcApp/logon.faces">http://<server>:6405/CmcApp/logon.faces) ; this is the administration and control interface for Power Users and Support staff.

Creating and Managing Users

Access the Central Management Console (:6405/CmcApp/logon.faces">http://<server>:6405/CmcApp/logon.faces and click on the User/Group Tab or select "Users and Groups" from the option drop down at the top of the page.

You can create a new User or Group by clicking on the "User List" node and selecting the "New User" icon or "New Group" icon on the menu.

Equally you can edit User/Group details by clicking on the name on the right of the screen.

After you have modified the details you should click "Save" on the bottom right of the screen.