ORA-12154

Oracle is different with Mysql or sqlServer, it need client connect to DB server. But mysql or sqlServer can connect DB server with specific ip connect.

Install oracle instance client

open Net Manager Oracle Net Config Local Service Naming
click add config new net service.

It actually add a config in this file:
E:\Oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora

1
2
3
4
5
6
7
8
9
10

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)

Problem 1

If install server and client in one machine, server directory will have same config file.

D:\Oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora

So when config done Net Manager connnet to oracle, ORA-12154 may happen.
Then you should doubt, which config PL/SQL use.
In this time use tnsping command.

  1. copy config file content, make two file synchronized.
  2. move path position, put client before db service.

This problem coursed by install sequence
If install DB service first, Client next, then this problem will not happen**

Problem 2

If PL/SQL’s insatll directory have () like 64bit system Program Files (x86),
then no matter how you adjust config, it always alert ORA-12154.
So check software’s insatll path can avoid this problem.