How to Use Database Links to Copy Databases in Oracle

The Oracle database engine has a "link" feature that links an external database to your local Oracle database. You can use a linked database to copy database tables from one server to another using standard Oracle PL/SQL code. This feature when you need to transfer tables between two Oracle servers to move the data to a new server.

Instructions

    • 1

      Open the Oracle command-line utility on a computer that has a connection to both Oracle database servers.

    • 2

      Type the following code to link the external database to your primary database:

      CREATE PUBLIC DATABASE LINK external_database
      USING 'remote';

      The code above links "external_database" to the primary database. The link's alias is "remote." You use this alias to copy your tables.

    • 3

      Copy the table from the remote database to your local, primary database. The following code copies a "customers" table to the local database:

      select * from remote.customers into local_customers

      The content from the remote table is copied to the "local_customers" table.

Related Searches:

References

Comments

Related Ads

Featured