7

When I run sqlplus it connect to orcl2 instance but I need to connect to orcl I can connect to my normal user using this:

sqlplus user/passowrd@//localhost:1521/orcl

but how can I connect as sysdba? I've try:

sqlplus / as sysdba@orcl

but it connect to orcl2 instance.

5
  • 1
    sqlplus usr/pwd@orcl as sysdba, I think Commented Aug 3, 2016 at 13:14
  • Also, assuming that orcl is a valid sid, you can set the ORACLE_SID environment variable to orcl, then you should be able to do sqlplus / as sysdba Commented Aug 3, 2016 at 13:23
  • @sstan it work, you can add this as an answer. Commented Aug 3, 2016 at 13:27
  • Which one worked for you? :) Commented Aug 3, 2016 at 13:28
  • ORACLE_SID environment variable. Commented Aug 3, 2016 at 13:29

1 Answer 1

9

Set the ORACLE_SID environment variable to orcl.

Then sqlplus / as sysdba will connect to orcl as expected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.