"ORA-01017: invalid username/password" : Why is that? What is the difference between the two :

SQLPLUS / AS SYSDBA


and

SQLPLUS
Enter user-name: SYSDBA
Enter password:


If I use the first command I get connected and see the prompt SQL&gt; but upon using the second command I always get ORA-01017: invalid username/password; logon denied , when I enter the correct password. Why is this ?

Also how do I get connected as the SYSDBA using the first command , when I didn't enter any password.

I am using Oracle Database 11g Express Edition Release 11.2.0.2.0
SYSDBA isn't a user but a way to connect to the DB.  

Connecting as sysdba is based on the OS authentication which means that as long as you connect to your machine with a user which is in the oradba group you will be connected with this user AS SYSDBA no metter what user/password you'll write (as long as you try to connect as sysdba of course)

Read more in this Tom Kyte's thread

So, this-

SQLPLUS / AS SYSDBA


and this

SQLPLUS a/b AS SYSDBA


and even this

SQLPLUS
Enter user-name: as SYSDBA
Enter user-name: a
Enter password: b


Are pretty much the same