Wednesday, June 16, 2010

The performance counter registry hive is corrupted

One client tried to install SQL Server 2008 in their Windows Server 2003 (Simplified chinese edition), and he got the error below when setup check system:

The performance counter registry hive is corrupted.

Followed the instructions on http://support.microsoft.com/kb/300956 did not work. But the instructions on http://connect.microsoft.com/SQLServer/feedback/details/312847/performance-counter-registry-hive-consistency-check-failed-at-traditional-chinese-windows-server-2003
fixed the issue, and what I did is to export the 009 subkey in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib to a file, then edit the file , and change the value from 009 (English) to 004 (Chinese culture). Next, import the registry file to Windows Registy.

Thursday, June 10, 2010

Primavera gave ORA-12545:Connect failed because target host or object does not exist.

A fellow me and said he got the error below after installing Oracle Primavera P7:

ORA-12545:Connect failed because target host or object does not exist.

I asked him to remove Oracle 10g Express Edition and Oracle Primavera P6 Ver 7, then reinstall again, the problem got fixed.

This error is usually caused by the host setting in both tnsnames.ora and listener.ora. If ip address is used rather hostname, this issue should go away.

Saturday, June 5, 2010

Primavera P3.1 running on Windows XP SP3 issue

One client called me yesterday said his Primavera P3.1 suddenly had problem on the resources module since last month, and it worked fine before. I know P3.1 is a 16 bit application and it won't work in 64 bit system. But his issue for P3.1 was totally different, because only the resources linked to the activity had problem. The symptom is when you select an activity, and click on the Resources tab, and add/change resources for the activity, the entire P3.1 application was close without any warning. I reinstalled P3.1 without luck, and set P3.1 to run compatible with Windows 98 did not fixed. I concluded P3.1 conflicted with other applications running in the background, so I launch msconfig and disabled suspected background services, restarted the windows, and Ooh, the issue's gone! I took me almost 1.5 hours to resolve this problem.

Configure Oracle Instantclient for Primavera P6 Version 7

Primavera P6 Version 7 comes with Oracle 10g Express Edition, and when you install Primavera P6.7 using Standalone option, Oracle 10g Express is automatically installed. But I found a lot of people have problem getting Oracle working with Primavera P6. One of problem is the configuration of Oracle Instantclient. Here is my experience of configuring Oracle Instantclient.

First, you need to download a 32 bit Oracle instantclient even you are installing Primavera in a 64 bit operating system like Windows 7 or Windows Server 2008 R2. The url is http://www.oracle.com/technology/software/tech/oci/instantclient/index.html. After download, unzip this file in folder in your local drive, i.e. c:\instantclient_10.2, then add this folder to the PATH system environment variable from the advanced settings in the Properties of My Computer.
You don't need to configure the tnsnames.ora file, but in case, your Oracle Connection String must use Oracle Easy Connection format like //mymachine.mydomain:port/XE or mymachine.mydomain:port/XE, for example, enter connection string as 192.168.0.10:1521/XE.

If you opt to use tnsnames.ora, the content of this file should look like below:

XE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
)
(CONNECT_DATA =
(SID = XE)
(SERVER = DEDICATED)
)
)


Then, add TNS_ADMIN to your Windows environment variables, the value of TNS_ADMIN is the path to your Oracle Instantclient, i.e. c:\instantclient_10.2, finally restart your Windows. After that, when Primavera prompts for the oracle Connection String, just enter XE. If you don't configure oracle Instantclient properly, the typical error you got is this one:

Bad public user name or password. database server error: ORA-12154: TNS:could not resolve the connect identifier specified.

For more information about Instantclient ,please check http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ape.htm.

Bad public user name or password. Database Server Error: ORA-12170: TNS:Connect timeout occurred

Today I received a phone call from a client, he said when he tried to connect to Oracle from Primavera P6 V7, he got the error below:

Bad public user name or password. Database Server Error: ORA-12170: TNS:Connect timeout occurred

Because he was able to connect to the database in oracle 10g XE with Prmavera project management, and he claimed he did not change the configuration , so firewall or Oracle Instantclient settings should be fine. I further contacted his IT people about the Oracle server. He mentioned he did disable the Large Send Offload for the network adapter in the Oracle server yesterday, and the IT guy said he did not find any connection problem yet. But I think the ORA-12170 error should be caused by this change, and I asked him to disable the network adapter, then enable it again, finally restart the Oracle instance. After that, the ORA-12170 error's gone.

Sunday, May 30, 2010

String or binary data would be truncated.

Just helped a client to upgrade Primavera Expedition V7 to Primavera Contract Manager V12. Then my client reported to me they received the error below in random:

SQLServerException: String or binary data would be truncated.

Checked the JBoss log, I got the full error below:

2010-05-30 10:59:57,281 INFO [STDOUT] DatabaseMgrSessionBean.executeUpdate the update statement is : UPDATE rqch SET rqch.change_number = '00005', rqch.change_date = '2010/05/26' , rqch.title = 'CCO #04-R1 Berth 3 Loading Cage Roof', rqch.additions = 0.0, rqch.deductions = 2733.000, rqch.chng_master_key = '000XXJZEK2169000000000file', rqch.chng_sys_item_type = 'CO', rqch.created_system = 'WEB', rqch.last_edit_system = 'WEB' WHERE rqch.master_key = '00057KdEK1010000000000CPM0'
2010-05-30 10:59:57,296 INFO [STDOUT] ERROR - DatabaseMgrSessionBean.executeUpdate SQLException :
2010-05-30 10:59:57,296 ERROR [STDERR]
com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.

After further analyzed the SQL statement, I found the title field in rqch table is too short (varchar(32)), I changed it to varchar(80), and "String or binary data would be truncated." error disappears.

There was an error in communicating with Excel Calculation Services

Tried to install MOSS 2007 and integrate Primavera With MOSS 2007. However, I got the error message below when testing Sharepoint Server 2007 with Excel Services:

There was an error in communicating with Excel Calculation Services http://sharepoint2007:56737/SharedServices1/ExcelCalculationServer/ExcelService.asmx exception: The request failed with HTTP status 401: Unauthorized. [Session: (null) User: MyLocalDomain\administrator].

I tried all recommendations I got from Internet about this error in the Sharepoint 2007, including using Kerberos authentication, but none of them works. However, I got a tip from an article from Microsoft about using authdiag.msi, I installed authdiag.msi and it detected the error below:

AllowKeepAlive: NTLM requires KeepAlive connections

Then I jumped to IIS Manager, and checked Enable AllowKeepAlive option for all Sharepoint Websites. Immediately, my Sharepoint 2007 was able to open an Excel Workbook in the report dashboard, and the annoying error of "The request failed with HTTP status 401: Unauthorized. " had just gone. My life was saved.