10

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

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
Brian
  • 1,951
  • 16
  • 56
  • 101

11 Answers11

12

Try

sqlplus sys/<your password>@<your SID> as sysdba
Jon Egerton
  • 40,401
  • 11
  • 97
  • 129
9

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.

Rawesome
  • 91
  • 1
  • 1
4

Use this command, in command prompt

sqlplus userName/password@host/serviceName

Roshan
  • 177
  • 2
  • 9
4

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.

John Doyle
  • 7,475
  • 5
  • 33
  • 40
  • Do you get the same error if you use `tnsping `? What do you see if you use `lsnrctl status`? (Ignore my initial suggestion that using `sys as sysdba` is incorrect, it _is_ acceptable, your error is something else.) – John Doyle Jan 09 '12 at 14:45
3

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

SithuSena
  • 377
  • 4
  • 5
2

Enter SQL*Plus with:

sqlplus /nolog

And then:

connect sys@<SID> AS sysdba
Benoit
  • 76,634
  • 23
  • 210
  • 236
1

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.

Community
  • 1
  • 1
0

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.

CodeDevotion
  • 307
  • 2
  • 16
0

Another possibility (esp. with multiple Oracle homes)

set ORACLE_SID=$SID

sqlplus /nolog

conn / as sysdba;

access_granted
  • 1,807
  • 20
  • 25
0

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

Himanshu
  • 3,830
  • 2
  • 10
  • 29
0

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

Abhi
  • 73
  • 2
  • 9