[oracle] TNS Protocol adapter error while starting Oracle SQL*Plus

Whenever I try to login into SQL*Plus (11g Standar Edition Win 64) I get an error related to some connection error.

I try to login as sys as sysdba and provide the password.

All the services are started. I'm on Windows 7.

Any help would be appreciated.

enter image description here

This question is related to oracle oracle11g sqlplus

The answer is


The major issue might be the oracle database itself may not have started. So, you need to manually go via

run command -> services.msc

check for OracleXEService surely, it may be disabled

right click go to properties-> set it to Automatic and press Ok. Then just right click again and start.

This will start your database making you to connect to it

Finally, In sqlplus command line,

connect as sysdba

enter username as admin

then press enter, you'll be connected


Ensure the OracleService is running. I keep running into this error, but when I go into Services, find OracleServiceXE and manually start it, the problem is resolved. I have it set to start automatically, but sometimes it just seems to stop on its own; at least, I can't find anything I am doing to stop it.


Use this command, in command prompt

sqlplus userName/password@host/serviceName


Go to Start --> Run--> type " services.msc"

Select the OracleService name, Right Click, Start.

Wait for a while and then your service will start. Then go to your sql command line window and try to connect to your user. I hope you can do that now.


Make sure your oracle services are running automatically. Just press Win+R. Type services.msc in textbox then press O to find oracle services. Oracle services as shown in pic

In your PC name might be like OracleserviceXYZ. Right click on highlighted services. In this dialogue box select automatically and click on start


Another possibility (esp. with multiple Oracle homes)

set ORACLE_SID=$SID

sqlplus /nolog

conn / as sysdba;


You are getting ORA-12560: TNS:protocol adaptor error becuase you didn't start the Oracle database.

You can start Oracle database like this. From START-> select Oracle Database 11g Express Edition( 11g or what ever your database type.you can find this from All Programs). Then inside this folder there is a DB icon with green color spot.Start Database icon It is the Start Service icon.Click it.Then it will take some seconds and start the service. connection success

After getting the above message,again try to connect through the SQL plus command line by giving user name and password. enter image description here


Try typing all of this on the command line:

sqlplus / as sysdba

As what you are doing is starting sqlplus and then using sys as sysdba as the user-name which is incorrect as that is not a valid user. By using the above command Oracle is using your system login credentials to access the db. Also, I would confirm that the sqlplus executable you are running is the correct one by checking your path - ensure it is in the bin of the server installation directories.


Enter SQL*Plus with:

sqlplus /nolog

And then:

connect sys@<SID> AS sysdba

Try

sqlplus sys/<your password>@<your SID> as sysdba

You might have set oracle not to start automatically. Goto Start and search for Services. Scroll down and look for OracleServiceORCL (or OracleServiceSID). Double click and change startup type to automatic if it is set as manual.


Examples related to oracle

concat yesterdays date with a specific time ORA-28001: The password has expired how to modify the size of a column How to create a blank/empty column with SELECT query in oracle? Find the number of employees in each department - SQL Oracle Query to display all tablespaces in a database and datafiles When or Why to use a "SET DEFINE OFF" in Oracle Database How to insert date values into table error: ORA-65096: invalid common user or role name in oracle In Oracle SQL: How do you insert the current date + time into a table?

Examples related to oracle11g

Convert timestamp to date in Oracle SQL Query to display all tablespaces in a database and datafiles Oracle Installer:[INS-13001] Environment does not meet minimum requirements Forgot Oracle username and password, how to retrieve? Extract number from string with Oracle function How to solve : SQL Error: ORA-00604: error occurred at recursive SQL level 1 Add days Oracle SQL How to determine tables size in Oracle ORA-28000: the account is locked error getting frequently Oracle listener not running and won't start

Examples related to sqlplus

When or Why to use a "SET DEFINE OFF" in Oracle Database SQLPLUS error:ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory How do I resolve this "ORA-01109: database not open" error? How to echo text during SQL script execution in SQLPLUS PL/SQL ORA-01422: exact fetch returns more than requested number of rows how to pass variable from shell script to sqlplus Connect to Oracle DB using sqlplus sqlplus how to find details of the currently connected database session How to output oracle sql result into a file in windows?