Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to different oracle instance as sysdba using sqlplus?

Tags:

oracle

sqlplus

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.

like image 632
jcubic Avatar asked Mar 12 '23 13:03

jcubic


1 Answers

Set the ORACLE_SID environment variable to orcl.

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

like image 90
sstan Avatar answered Mar 14 '23 12:03

sstan