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

3

11 Answers

Try

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

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.

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.

1

Use this command, in command prompt

sqlplus userName/password@host/serviceName

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 iconIt 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

Enter SQL*Plus with:

sqlplus /nolog

And then:

connect sys@<SID> AS sysdba

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.

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.

Another possibility (esp. with multiple Oracle homes)

set ORACLE_SID=$SID

sqlplus /nolog

conn / as sysdba;

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

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

You Might Also Like