0
votes

I am new to oracle. I have oracle 11g installed on my PC (windows 10). I am trying to connect to the database and grant a privilege Create Session to a user 'ABC'. When I try to connect through cmd it keeps saying "TNS: no listener". When I go through Visual Studio, it keeps saying insufficient privileges. I, for the life of me, can't figure out what is wrong and what to do. Please help me out here.

EDIT: sqlplus sys/password@DBNAME as sysdba

sqlplus system/password@localhost:1521/DBNAME

2
Provide your connection string, command that you have used in command prompt to connect the database. - atokpas
Edited my question. I think I have tried almost everything that I could understand, from Google. - who-aditya-nawandar
Is your listener running on that port number(1521)? why happens if you just type sqlplus / as sysdba or sqlplus sys/password as sysdba? - atokpas
Also your first method is wrong it should as sqlplus sys/password@tnsname as sysdba not DBNAME. In order to do that you should have tnsnames created to point to the remote database service, - atokpas
I don't know what port number my listener is running on. What would be the tnsname? sqlplus sys/password as sysdba gives TNS: protocol adapter error and then asks for a username to connect. - who-aditya-nawandar

2 Answers

0
votes

Are you running VS as admin? If not, maybe VS doesn't have the privileges to access the listener.ora file in %ORACLE_HOME%\network\admin. Also, you could try this:

Oracle client ORA-12541: TNS:no listener

0
votes

Please check %ORACLE_HOME%\network\log\listener.log for hints as to what was wrong

you might have to re-adjust tnsnames.ora, listener.ora under %ORACLE_HOME%\network\admin

Brian