Oracle - TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
rembo
User
Posts: 227

Oracle - TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

Post by rembo »

hello ..
I am try to develop a project that connected to Oracle Database

i have set all Configuration to my oracle DB and i was ablity to bield the project but i got this error while try browse it

C:\xampp\htdocs\oracelproject\vendor\doctrine\dbal\src\Driver\API\OCI\ExceptionConverter.php(72): An exception occurred in the driver: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

here the listener.ora Network Configuration

# listener.ora Network Configuration File: C:\instantclient_19_11\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\Users\lilri\Desktop\oracelDB\WINDOWS.X64_213000_db_home)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\Users\lilri\Desktop\oracelDB\WINDOWS.X64_213000_db_home\bin\oraclr.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)) ----- > i have try add this line but still get same error
    )
  )

any idea ?
thanx...


arbei
User
Posts: 9288

Post by arbei »

rembo wrote:

listener.ora Network Configuration File: C:\instantclient_19_11\listener.ora

vs.

(ORACLE_HOME = C:\Users\lilri\Desktop\oracelDB\WINDOWS.X64_213000_db_home)

Are you sure you are checking the correct .ora file used by your PHP processor?

You install both instant client and oracle, you need to check which .ora is being used, you should also check <Oracle Home>\NETWORK\ADMIN\tnsnames.ora. Make sure the service name you used in PHPMaker is in the correct .ora file.


rembo
User
Posts: 227

Post by rembo »

Thanx to you ... i have check the PHPMaker database Configuration .. was missing to add DB server Name to the connection data
Now it's work , I just add the server of DB Name to the TNS name options

before :
localhost:1521

after fixed :
localhost:1521/orcl


Post Reply