0

Every time I want to connect with a user in Sqlplus I have to specify the database|sid name too,

SQL>connect scott/tiger@orcl

I have installed another database for other purpose but I removed it. Before the installation of second database I could connect without using @orcl but after I removed it I have to connect that way I said. How can I fix this issue?

2

What OS are you using?

Check what the environment ORACLE_SID is set to. Change it to the existing one and you won't be needing to specify the connection string anymore.

  • That should be it. Second database installation probably modified environment settings, changing ORACLE_SID to point to the second (and now, non-existant) database. – Sergi Porta Jun 25 '15 at 12:54
  • @dezso I'm using Windows 8.1 Enterprise 64bit.Where is the environment that I can edit it? – SajjaD Jun 27 '15 at 6:04
  • There is a registry key named ORACLE_SID in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME that its value was "testdb" and I changed it to "orcl".Now I can connect without using @orcl.thanks. – SajjaD Jul 7 '15 at 3:53
  • In oracle docs said that we can use this command too: set PATH=%ORACLE_HOME%\bin;%PATH% – SajjaD Jul 7 '15 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.