I want to check SID and current database name.
I am using following query for checking oracle SID
select instance from v$thread;
bu
Type on sqlplus command prompt
sqlplus
SQL> select * from global_name;
then u will be see result on command prompt
SQL ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM
Here first one "ORCL" is database name,may be your system "XE" and other what was given on oracle downloading time.