Receiving error ORA-12154 when attemping to run "create_oracle_user.sql" from SQLPlus.
search cancel

Receiving error ORA-12154 when attemping to run "create_oracle_user.sql" from SQLPlus.

book

Article ID: 160395

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

After finishing the installation of Oracle, the guide mentions the creation of the Symantec DLP schema owner (typically "protect") through the use of the "create_oracle_user.sql" script.  When attempting to run this script in SQLPlus, it rapidly throws the following error:

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


SQL>

It may also throw a bunch of "SP2-" errors.

Resolution

ORA-12154 is a connectivity error.  It is usually associated with an invalid TNSnames.ora entry. 

On page 21 of the Symante_DLP_Oracle_Guide.pdf for version 10.x of Symantec DLP the second step of verifying the TNS entry is:

2. Verify that the following lines are present in the file:

PROTECT =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = port_number))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = protect)

)

)

If these lines do not exist, add them to the file, replacing host_name and port_number with the correct values for your system.

HOWEVER,  many people simply copy the connection entry from the .pdf and paste it in the tnsnames.ora file.  Then they get the error.

DO NOT COPY AND PASTE THE ENTRY FROM THE .PDF FILE!  It contains invisable characters that render the entry invalid.

Either type the entry in line for line, or copy and paste THIS entry:

PROTECT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST =hostname)(PORT = port))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = protect)
    )
  )

... replacing the host and port entries.  Save the tnsnames.ora file and attempt to create the schema owner again.