0

Can anyone tell me in detail,what is the difference between sqlplus sys/ as sysdba and sqlplus sys@xe as sysdba?For the records the database is installed on the same machine as the client.

  • One conn goes through the listener, the other doesn't and attaches directly. – Philᵀᴹ Jan 30 '13 at 19:51
3

sqlplus sys/ as sysdba connects directly to the database without using networking (TNS. This type of connection is called a bequeath connection.

sqlplus sys@xe as sysdba connects through the listener.

1

@xe defines the database where you are connecting to. Since it in your case seems to be the same as without defining it specifically, it points the connection to this same database.

No difference in privileges etc.

So, in practice, there is no difference in the result in your case.

  • 2
    Incorrect. @xe forces the connection through the listener. / as sysdba doesn't require a listener as it connects directly. – Philᵀᴹ Jan 30 '13 at 20:51
  • Since the connection ends up to same database with same privileges, I believe that making a quick jump at the listener is not that relevant for the asker. – grassroot Jan 30 '13 at 21:02
  • It does make a difference. You can't connect to an idle instance through the listener. This is needed e.g. in order to startup or shutdown the instance. – a_horse_with_no_name Jan 30 '13 at 22:49

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.