Oracle connect to or SELECT FROM table in another database

Posted on 2012/01/18

0


You must first create a “Database Link”, which is a schema object that allows you to access objects in one database, from another. The example below assumes you have already created a database link that allows adequate permissions.

Let’s assume you have two Oracle database instances, one named PROD which contains your live production data, and DEV which contains your development and testing environment.

For example, if you were in working in DEV and trying to select data from your new live PROD:

SELECT * FROM mySchema.tbl_people@PROD
 

Posted in: Oracle, PL/SQL, SQL, SQLPlus