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

Written on . By CPM Solutions

EDIT: Oracle has addressed this issue in a previously released service pack.

A user has also commented on an easier fix below.

“When installing the standalone version of Primavera 6 v7 on Windows 64-bit OS, you can change the default installation directories to a path that does not include “program files (x86)” in it.  The brackets around x86 are the problem with the 10g XE install.  Just rename the path to “C:\Primavera” for the install and “C:\Primavera\Primavera Common” for the common files.  It will work perfect after that!  No need for 11g or instant client or modification of the tnsname.ora file.


Clayton Richards

The fact: you installed Primavera P6 V7.0 in a standalone machine with Windows 7 64 bit operating system, and you are configuring the Oracle database connection for Primavera, then you got the error below:

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

To fix this problem, you need to do the things below:

1. Check if Oracle database server is installed, and if it’s installed , you should see over 6 files in C:\oraclexe\oradata\XE.

2. Install Oracle InstantClient 10.2 (32 bit only) or later in your system. and make sure  the tnsname.ora file in the folder in which Oracle InstanceClient is installed.

XE =
(SID = XE)

Note: you may need to change to your actual IP if Primavea Power Client is install in a different machine, and change port 1521 to the one is used.

3. Make sure you are able to connect to Oracle DB using SQLplus, and here are the steps:

– Go to Windows Start > All Programs >Oracle Database 10g Express Edition, and select Run SQL Command Line.

– When you see the “SQL>” prompt, type the SQL statements below:

SQL> connect privuser/privuser@XE
SQL> select user_name from users;

1 rows selected.

If you see the output above when you enter the SQL statement, you should have no problem connecting the Oracle from Primavera. Otherwise, Primavera database is not created in Oracle, and you need to run dbsetup.bat to create Oracle databases for Primavera.