Lets say I have a oracle database db1(actually user) in machine A and another database db2 in machine B. Is it possible to create view in db2 from db1.If possible how ?


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.