CREATE DATABASE LINK dblink_name
CONNECT TO remote_username
IDENTIFIED BY remote_password
USING 'tns_service_name';
The remote DB will then be accessible in the following way:
SELECT * FROM MY_TABLE@dblink_name;
To test a database link connection without needing to know any of the object names in the linked database, use the following query:
SELECT * FROM DUAL@dblink_name;
To explicitly specify a domain for the linked database service, the domain name is added to the USING
statement. For example:
USING 'tns_service_name.WORLD'
If no domain name is explicitly specified, Oracle uses the domain of the database in which the link is being created.
Oracle documentation for database link creation: