DB Links

DB links are used in distributed Oracle environments to define a communication path between databases.The purpose of the link is toisolate SQL statements from the underlying physical network topology.If the location of remote database changes, only the link needs to be updated. To Create DB links CREATE [PUBLIC] DATABASE LINK USING 'xxx ' OR CREATE [PUBLIC] DATABASE LINK CONNECT TO CURRENT_USER USING 'xxx' To Drop DB links DROP DATABASE LINK ; //Code snippet starts create public database link CMPSPROD.WORLD connect to SYSTEM identified by cmpsprod using 'cmpsprod.world'; Insert into A (select * from A @ CMPSPROD.WORLD where ACOL='Value') Where A the table name and ACOL the column name in the table A. //Code snippet ends The above query selects all the records from Table A satisfying the where clause from remote Database and insert those records to the same table in the current database. Reference: http://www.oreillynet.com/pub/a/oreilly/oracle/news/oraclenet8_1200.html

Comments

Popular posts from this blog

Disable Search Restriction in Hybris

How to export product data from Hybris Apparel Store to csv?

A day of Blessings!!!!!!!!!