Home » RDBMS Server » Networking and Gateways » ORA-12514: TNS (Oracle 12c Release 2)
Re: ORA-12514: TNS [message #673450 is a reply to message #673419] Tue, 20 November 2018 06:23 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
petar97 wrote on Mon, 19 November 2018 09:35
sqlplus / as sysdba

It does not even look for username and password to connect as a system
Because when you supply a "username" of '/' (as in 'sqlplus / as sysdba') it uses OS authentication. If your OS username is a member of the os group 'DBA', then you are authenticated without a username or password.
Re: ORA-12514: TNS [message #673451 is a reply to message #673414] Tue, 20 November 2018 06:26 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
petar97 wrote on Mon, 19 November 2018 09:03
I have the impression that it will never end Smile

What should I do next?
On linux, 'ping', by default, will loop forever.
Kill it with ctl-c.

Next time, if you choose, you can tell it to terminate after 'n' number of packets. 'man ping' will show you how.
Re: ORA-12514: TNS [message #673452 is a reply to message #673421] Tue, 20 November 2018 06:30 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
petar97 wrote on Mon, 19 November 2018 10:08
ok, but why not work the way it worked
What did you discover when you researched TWO_TASK.

Please don't say that when TWO_TASK was pointed out and implicated, you had no curiosity to research it to understand why it plays a role.
Re: ORA-12514: TNS [message #673454 is a reply to message #673451] Tue, 20 November 2018 06:54 Go to previous messageGo to next message
petar97
Messages: 120
Registered: October 2018
Senior Member
thanks, so far I have not created a database, I use a user schema.

can you send me a link to manually create a database?
or you will help me here if you do not take away your free time
in Oracle documentation, it's not explained how to do it, I do not understand the SID setting, etc.

I do not use the database, how to run the instance

Re: ORA-12514: TNS [message #673455 is a reply to message #673452] Tue, 20 November 2018 06:57 Go to previous messageGo to next message
petar97
Messages: 120
Registered: October 2018
Senior Member
The setting of TWO_TASK overrides the ORACLE_SID.

Of course I have the curiosity to check out what I did
Re: ORA-12514: TNS [message #673461 is a reply to message #673454] Tue, 20 November 2018 08:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
petar97 wrote on Tue, 20 November 2018 04:54
thanks, so far I have not created a database, I use a user schema.

can you send me a link to manually create a database?
or you will help me here if you do not take away your free time
in Oracle documentation, it's not explained how to do it, I do not understand the SID setting, etc.

I do not use the database, how to run the instance

Be careful what you wish for.

https://docs.oracle.com/database/121/SQLRF/statements_5005.htm#SQLRF01204

http://lmgtfy.com/?q=oracle+%20dbca
Re: ORA-12514: TNS [message #673462 is a reply to message #673454] Tue, 20 November 2018 09:31 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
petar97 wrote on Tue, 20 November 2018 06:54
thanks, so far I have not created a database, I use a user schema.
You must have a database in order to use a 'user schema'. The schema is a logical construct within a database. No database = no schema.

Quote:
can you send me a link to manually create a database?
https://docs.oracle.com/database/121/NTQRF/create.htm#NTQRF050


Quote:
or you will help me here if you do not take away your free time
in Oracle documentation, it's not explained how to do it, I do not understand the SID setting, etc.
It is explained in the documentation. That's what I cited above. What docs are you reading that you say it is not explained?


Quote:
I do not use the database, how to run the instance
\

I don't understand that statement.
Re: ORA-12514: TNS [message #673463 is a reply to message #673455] Tue, 20 November 2018 09:43 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
petar97 wrote on Tue, 20 November 2018 06:57
The setting of TWO_TASK overrides the ORACLE_SID.

Of course I have the curiosity to check out what I did
But do you understand how TWO-TASK overrides ORACLE_SID? Your continued struggle with it indicates that you do not, which then indicates that any research you did on that was pretty superficial.

When you try to connect to a database without providing a connection string:

sqlplus / as sysdba
or
sqlplus username/password  (ie: sqlplus scott/tiger)
sqlplus will attempt to connect to a local database as specified by the value of ORACLE_SID. TNS is not involved. The listener is not involved. tnsnames.ora is never read.

If you supply a connect string:
sqlplus scott/tiger@mydb
then the request will be passed off to tns ... tnsames.ora will be read to find an entry for 'mydb' and that information will be used to route the request, through the network, to the listener. It makes no difference if the target listener happens to be on the same machine as the client; the request still goes through the full network stack.

Now, set the environment variable TWO_TASK. With that set, instead of using ORACLE_SID, sqlplus will treat the value of TWO_TASK as if it had been supplied as the connection string, and tns is again used.

So:

sqlplus scott/tiger@mydb

behaves exactly like

set TWO-TASK=mydb
sqlplus scott/tiger

You need to be familiar with how environment variables come to be set on your chosen operating system.

Previous Topic: ora-12224: tns:no hay ningun receptor
Next Topic: Remote Connection Problem
Goto Forum:
  


Current Time: Thu Mar 28 17:10:30 CDT 2024