Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ The practical application of Oracle synonyms + dblink     - Digital jQuery scrolling effect (Programming)

- Java logging performance of those things (Programming)

- Five programming fallacy (Programming)

- Android SDK Manager can not update the domestic solutions (Linux)

- Linux Powerful command Awk Introduction (Linux)

- Use CutyCapt to convert HTML pages to png images on Linux (Linux)

- Linux firewall Iptables study notes (Linux)

- Linux simple commands (Linux)

- How ONLYOFFICE collaborative editing document on Linux (Linux)

- Shared directory settings between Linux and Linux (Linux)

- Linux find command usage practices (Linux)

- Ubuntu 14.04 set auto sleep time (Linux)

- Java transient keyword (Programming)

- What Java 8 fastest garbage collector (Programming)

- LVM basic concepts, management (Linux)

- Installation in lxml Python module (Linux)

- Analytical Ceph: handle network layer (Server)

- Linux Creating a new user error Creating mailbox file: File exists (Linux)

- MySQL DATE_FORMAT () function (Database)

- Questions about Linux compiler u-boot (Programming)

 
         
  The practical application of Oracle synonyms + dblink
     
  Add Date : 2018-11-21      
         
       
         
  The practical application of Oracle synonyms + dblink

Business need: the original database (10.2.0.4.0), the new database (11.2.0.3)
As the demand for procedural reasons, and now need a new library user is mapped directly to the user under the old library:

1. Back up the original library users
nohup exp scott / scott OWNER = scott BUFFER = 10240000 STATISTICS = none RESUMABLE = y FILE = scott_all_exp.dmp LOG = scott_all_exp.log &

2. Delete the original library users under the table
set linesize 180 pagesize 1000
SELECT 'DROP TABLE' || table_name || 'CASCADE CONSTRAINTS PURGE;' FROM user_tables;

Come to save SQL commands vi droptable.sql
Then SQL> @droptable

3. Create a new library to dblink in the original library
create public database link link167 connect to scott identified by scott using '(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.167) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = NEWDB)
    )
  ) ';

Test dblink Available:
select * from dual @ link167;

4. Create a synonym in the original library
create synonym MDRT_12E92 $ for MDRT_12E92 $ @ link167;

In the new database query user_tables get a list of table_name
set pagesize 1500
select table_name from user_tables;

Column editing command UE deal, vi saved to createsynonym.sql
Then SQL> @createsynonym
     
         
       
         
  More:      
 
- OpenJDK 7 compiled under Ubuntu 14.04.3 64-bit (Linux)
- Syncthing: Private Security Synchronization tool to synchronize files between computers / folder (Linux)
- Ubuntu prevent arp attacks (Linux)
- Oracle can not change the tablespace to backup mode in non-archive mode (Database)
- Using Maven to download Spring (Linux)
- awk Programming Model (Programming)
- Oracle utilized undo data recovery operations (Database)
- Simple and fast sorting (Programming)
- C # / iOS / Android Universal Encryption and decryption (Programming)
- Linux installed PCRE (Linux)
- Java implementation chain store binary tree (Programming)
- Subquery Oracle study notes (Database)
- Xshell key authentication mechanism using a remote login Linux (Linux)
- MySQL related statements (CRUD) (SQLyog software) (Database)
- Heartbeat cluster components Overview (Server)
- GAMIT10.5 install and update failed Solution (Linux)
- Linux environment to build next Cocos2dx-3.3.1 (Linux)
- Java inheritance initialization problem (Programming)
- Linux Getting Started Tutorial: How to set up a static MAC address on VMware ESXi virtual machine (Mobile)
- Linux5 install MySQL 5.6 (RPM mode) (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.