You can get the database name from

select * from v$instance;

Sam