Error: "SP2-0640: Not connected" when creating an Oracle user for Symantec DLP

book

Article ID: 160694

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

When creating an Oracle user, you execute oracle_create_user.sql from SQL*Plus, and the following stream of errors appears. You are logged in as SYS as SYSDBA.

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

Warning: You are no longer connected to ORACLE.
SP2-0640: Not connected

Cause

The Oracle Listener process was not successfully created.

This error indicates that the TNSNAMES.ora file was not created during the installation process.

Specifying the local service will create a TNSNAMES.ora file which can be used as one of the methods for resolving a connection string. While creating the protect user, the script attempts to connect to the database using TNS to resolve the connection. Without that specific information, SQL*Plus has no way to connect and generates the "SP2-0640: Not connected" error.

Resolution

Start the Oracle Net Configuration Assistant

  1. In Windows, navigate to Start > All Programs > Oracle-OraDb11g_home1 > Configuration and Migration Tools > Net Configuration Assistant.
  2. Select Local Net Service Name configuration.
  3. Click Next.
  4. Click Add, and type in a service name (the Database SID, typically "protect").
  5. Click Next.
  6. Accept the default of TCP, and click Next.
  7. Enter the hostname or IP of the Oracle database server, and accept port 1521 (the default listening port).
  8. Click Next.
    You are presented with the opportunity to test.
  9. Click YES, and then click Next. The test may fail, which is OK.
  10. Click Change Login.
  11. Change the password to the same password as the Oracle SYS account.
  12. Click Next.