Error: “SP2-0640: Not connected” when creating an Oracle user for Symantec DLP
calendar_today
Updated On:
Products
Data Loss Prevention Enforce
Data Loss Prevention
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
- In Windows, navigate to Start > All Programs > Oracle-OraDb11g_home1 > Configuration and Migration Tools > Net Configuration Assistant.
- Select Local Net Service Name configuration.
- Click Next.
- Click Add, and type in a service name (the Database SID, typically “protect”).
- Click Next.
- Accept the default of TCP, and click Next.
- Enter the hostname or IP of the Oracle database server, and accept port 1521 (the default listening port).
- Click Next.
You are presented with the opportunity to test. - Click YES, and then click Next. The test may fail, which is OK.
- Click Change Login.
- Change the password to the same password as the Oracle SYS account.
- Click Next.
Feedback
thumb_up
Yes
thumb_down
No
Я новый пользователь sqldeveloper и пытаюсь создать нового пользователя.
Я использую эту командную строку: create user <myusernanme> identify by <password>
Но я получаю такую ошибку: SP2-0640: Not connected
Может кто-нибудь мне помочь?
2 ответа
Лучший ответ
Спасибо ! Я обнаружил, что для создания нового пользователя я должен войти в систему. Я подключил ультилистатор SYS с помощью команды
CONNECT SYS AS SYSDBA
Создайте моего пользователя с помощью команды
CREATE USER <username> IDENTIFIED BY <password>
И наконец я даю ему разрешение на создание собственной сессии
GRANT CREATE SESSION TO <username>;
Но как отключить пользователя SYS?
1
Jessy
9 Окт 2021 в 09:49
April 30, 2021
I got ” SP2-0640 Not connected. ” error in Oracle database.
SP2-0640 Not connected.
Details of error are as follows.
SP2-0640 Not connected. Cause: The PASSWORD command was issued when there was no connection to the Oracle instance. Action: Connect to the Oracle database before re-issuing the PASSWORD command.
Not connected
This SP2-0640 errors are related with the PASSWORD command was issued when there was no connection to the Oracle instance.
Connect to the Oracle database before re-issuing the PASSWORD command.
1)DBUA upgrade to 12.2 fails with below error which can be seen in catupgrd0.log file
get_instance_status_and_name: unexpected error in exec_DB_script output produced in exec_DB_script [ SQL*Plus: Release 12.2.0.1.0 Production on Thu Nov 9 13:02:32 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> ERROR: ORA-39710: The database mode conflicts with the connection type. SQL> SQL> SQL> 2 SP2-0640: Not connected SQL> SQL> SQL> ] end of output produced in exec_DB_script catconInit: unexpected error in get_instance_status_and_name End of catcon Errors
2)Manual upgrade fails with error:
get_instance_status_and_name: unexpected error in exec_DB_script output produced in exec_DB_script [ SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 1 14:11:17 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> ERROR: ORA-12560: TNS:protocol adapter error SQL> SQL> SQL> 2 SP2-0640: Not connected SQL> SQL> SQL> ] end of output produced in exec_DB_script catconInit: unexpected error in get_instance_status_and_name
You do not use operating system authentication to connect to the database.
When using DBUA,Providing SYSTEM username and password in “Select database” screen .
To solve this error, perform the following steps.
1)When running DBUA:
Leave “User Name” and “Password” fields blank if you have OS authentication to SYS user.
Or
Provide the “SYS” username and “<sys_password>” (in case if you are calling DBUA screen for non-oracle user).
2) For manual upgrade ,invoke the command and enter the passowrd when asked for:
dbupgrade -u SYS
Read the following post, because the following error is related with this.
ORA-39710: the database mode conflicts with the connection type
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )
1,548 views last month, 3 views today
I have 2 oracle db (ORCL and ORCL24) and I can’t connect to ORCL database
«Выполняется» = Started
my listener.ora
SID_LIST_LISTENER01 = (SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL24)
(ORACLE_HOME = G:appproduct12.2.0dbhome_1)
(SID_NAME = ORCL24)
) )
SID_LIST_LISTENER = (SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = G:appproduct12.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:G:appproduct12.2.0dbhome_1binoraclr12.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = G:appproduct12.2.0dbhome_1)
(SID_NAME = ORCL)
) )
LISTENER01 = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PC)(PORT = 1526)) )
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
) )
ADR_BASE_LISTENER01 = G:appproduct12.2.0dbhome_1log
ADR_BASE_LISTENER = G:appproduct12.2.0dbhome_1log
asked Dec 25, 2018 at 16:32
5
Load 7 more related questions
Show fewer related questions
Recommended Answers
It means the client side tool SQL *PLUS is not connected to the server or was disconnected because of server restart or network disconnect.
Jump to Post
All 5 Replies
debasisdas
580
Posting Genius
Featured Poster
15 Years Ago
It means the client side tool SQL *PLUS is not connected to the server or was disconnected because of server restart or network disconnect.
11 Years Ago
I was having the same problem but i sorted it out by doing the following:
1. Run SQL Command Line
2. Type Connect
3. Enter Username
4. Enter Pasword
Then you should get a message that the you are connected at this point you can access the database table. Thanks
10 Years Ago
thanx Macebooks..
I was here for the same problem and solved it.
Thanks a lottttt.:)
9 Years Ago
hi
my sqlplus get connection with user ‘SYS’,
but when i want to connect it with scott/tiger ,
it gives the message ‘the account is lock’,
when i unlock it it gives the error : sp2-0640: not connected
Reply to this topic
Be a part of the DaniWeb community
We’re a friendly, industry-focused community of developers, IT pros, digital marketers,
and technology enthusiasts meeting, networking, learning, and sharing knowledge.