Is it possible to create a view in one database from another database in oracle when databases are different machine?
Yes, by using database links. For example, in db2:

create database link db1_link connect to myuser identified by mypassword using 'db1';
create view myview as select * from mytable@db1link;
select * from myview;


Where using 'db1' refers to a TNS entry, but it could be replaced with the actual TNS descriptor.