I only set ORACLE_SID=XE and added xe in tnsnames.ora.Looks like you're working in Client Home, if so you can't connect locally, it's the same as if you were on a different machine. You may try setting XE Home :
I can connect using sqlplus system/password@XE as sysdba, but sqlplus system/password is refused. sqlplus / as sysdba is also refused.
C:\>set ORACLE_HOME=<XE Oracle Home> C:\>set PATH=%ORACLE_HOME%\bin;%PATH% C:\>set ORACLE_SID=XE C:\>sqlplus / as sysdba
Yes that does sound like a rather unfortunate situation ;)I even can't do a startup mount.
The ORACLE_SID line may or may not be needed, it will take some testing to see what can work. I don't use Windows much so this might not be exactly or totally correct.
rem xeenv.bat rem set the XE ORACLE_HOME in front of PATH set PATH=C:\oraclexe\app\oracle\product\11.2.0\server\bin;%PATH% rem set ORACLE_SID=XE